Skip to content

Calculating the Hausdorff Dimension of a 2D image

Notifications You must be signed in to change notification settings

RicardoFT1/BoxCount

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Box-counting 2D images to compute the fractal dimension

Implementation of Hausdorff dimension estimation using the box-counting method.

An example of the computation process can be seen below.

Usage and restrictions

  • The algorithm marks non-white pixels as one and white pixels as zero.
  • To be more precise about the result, it only accepts NxN images as input.

Example usage,

from ImageFractalDimension import ImageFractalDimension

image_name = 'sierpinski_512x512.png'
image_size = 512

image = ImageFractalDimension(image_name, image_size)
print(image.fractal_dim)
image.graph()

Output:

Imgur

About

Calculating the Hausdorff Dimension of a 2D image

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%