The program transforms an input image using the differential box counting algorithm to a fractal dimension (FD) image, i.e. each pixel has its own FD. Then the user can select any region of interest in the generated FD image to estimate the corresponding mean, standard deviation and lacunarity.
Many thanks Nicolas for the interesting remark!
The code gives an estimation of the roughness of the image surface, and this results in sometimes not having an exact fractal dimension (FD) value. This is mainly due to how the FD is estimated via the box-counting algorithm, i.e. a region is specified around each pixel, and a parametric FD image map is estimaed for each corresponding pixel in the original image. However, experimenting with the scaling factor to how far an image can be probed for self-similarity can assist for a more accurate estimation of the FD. For more information, please see Fig. 2 in the following article: http://core.ac.uk/download/pdf/2709596.pdf.
I tried few things out of curiosity and I found something intriguing. I created an input image of a uniform red square, expecting a resulting fractal dimension of 2. The output FD was 1,92 with very small standard variation (10^-12). Is there a problem with my understanding of fractal dimensions?
By the way, the code is very nice!
nicely done ..thanks a lot...
@Rajkumar Why to use this for signal processing? There are algorithms based on kNN, Higuchi's method and Multi-resolution box count that can perform much better for time series data.
can this algorithm be used for signal processing? if yes then how?
Thanks Martin, and I'm happy you found the script useful.
Yes as you guessed, the standard deviation mainly depends on the type of image you anslyse. That is, the more homogeneous the texture in the image is, the more homogeneous the Fractal dimension becomes, and thus the lower the standard deviation; and vice versa. To check, try to apply the script to images with different textures (e.g. rough and fine) and compare your results.
Thanks for useful script.
But the estimate of fractal dimension has large standard deviation in many case when I used this script. Is it a proprerty of box-method or it depends on source image?
Thank for respond.