SWFD - Sliding Window Fractal Dimension

Juan Ruiz de Miras. University of Granada - SPAIN. 2025.

Last update: May - 2025

Discriminating between original paintings and replicas is a challenging task. In recent years, the fractal dimension (FD) has been used as a quantitative measure to analyze differences between similar paintings. However, previous FD tools require binarization or grayscale analysis and manual selection of painting areas. Here we present SWFD, a novel color-FD-based method for differentiating original paintings from replicas, which uses a sliding window approach and color-FD computation techniques.

You can download the C++/CUDA source code of the SWFD algorithm by clicking here.

Once unzipped the file swfd.zip, you will find the following files:

Unzip the datasets.zip file in the same folder where test.cpp is located, what creates the folders datasets/cleveland/ and datasets/princeton/ containing the BMP files with the paintings to be analyzed.

REQUERIMENTS for compilation and execution

Hardware: Computer with a CUDA capable GPU (https://developer.nvidia.com/cuda-gpus)
Software:

COMPILATION AND RUNNING

The test.cpp file can be compiled with the following command: nvcc -O3 -o test external/dbc-rgb.cu swfd.cpp test.cpp

The test_openmp.cpp file can be compiled with the following command:

  • Windows: nvcc -O3 -o test_openmp external/dbc-rgb.cu swfd.cpp -Xcompiler "/openmp" test_openmp.cpp
  • Linux: nvcc -O3 -o test_openmp external/dbc-rgb.cu swfd.cpp -Xcompiler "-fopenmp" test_openmp.cpp

    Run the files test or test_openmp to process the datasets. Results of analyzing each painting are saved in the CSV files:
    FD and correlation values in the CSV files with the FD results correspond to each patch within each painting
    Time values in the CSV files with the time results correspond to each painting

    CITATION

    If SWFD has been useful for your research, please, cite as:
    "Fractal Dimension-Based Methodology for Discriminating Original Paintings from Replicas"
    Juan Ruiz de Miras and Domingo Martín
    Symmetry 17(5), 2025
    https://doi.org/10.3390/sym17050703

    CONTACT AND SUGGESTIONS

    For contact information click
    here

    FUNDING

    This software is part of the I+D+i project PID2020-118638RB-I00 granted by MCIN/AEI/10.13039/501100011033/