Skip to content

brian-xu/FractalDimension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fractal Dimension of 2D Images

This algorithm calculates the fractal dimension of a 2D image using a modified box-counting approach as described by Wen-Li Lee and Kai-Sheng Hsieh.

Usage

import numpy as np
import cv2
from FractalDimension import fractal_dimension

#test data
image = cv2.imread('image.png', 0)

fd = fractal_dimension(image)
print(f"Fractal dimension of the image: {fd}")

Note: OpenCV is not a strict requirement, but the image is expected to be formatted identically to OpenCV's grayscale representation.

Releases

No releases published

Packages

No packages published

Languages