I am working on Liver ultrasound images and want to extract fractal dimension. Need to know how to binarize the image so that best fractal value comes out. Binarization of image is critical part. Please help
You can read the image as a 2D matrix where each element represents the pixel color value. Then you have two options 1) Use the pixel value as a the 3rd dimension and perform fractal analysis in 3D or 2) Use the pixel value as the mass at that x,y coordinate and perform fixed-mass analysis in 2D.
Here is a sample Matlab code that reads a gray-scale mammogram image and plots it as a 3D scatter. You can then use the resulting point distribution in a fractal dimension estimation. I prefer the 2nd option because for mammograms the color represents the tissue density hence it is more analogous with the fixed-mass estimation interpretation.
the script will convert the gray-scale mammogram image to a binary image. I indicate the matrix of the images, 'level' argument is the threshold value, you can use the script: