Image J binarization, skeletonizing and fractalizing

Hi there!
I want to process an imageJ file for quantitvative fractal analysis within a vascular network and have no clue how to do it. You find some of the original pictures and how we tried to process them:
IMG_0990 IMG_0988 IMG_0987

We want to binarize the total picture with a grey value threshold to capture most of the areas between the small vessels. Next step would be to skeletonize the picture, subtract bigger vessels and “empty spaces” (artefacts like bands or zysts), split the skeleteonized black/white picture into fractals and count them (e.g. number of areas with a certain size). We would like to create 3 zones within the picture: 1.5mm diameter circle around the avascular center, 2.5mm diameter around the circle and the picture in toto, calculate the fractals within the ring-shaped area resulting from both circles and oppose it to the picture in toto (subtracted by the area inside the outer circle), similar to the circles we tried to impose into the picture (without the outmost 5.5mm circle).

Here is a medical paper where the group merely describes what they did but not exactly how (methods, quantitative determination of local capillary vessel density around microvascular lesions on optical coherence tomography, page 20-21):
Macular Telangiectasia Type 1 Capillary Density and Microvascular Abnormalities Assessed by Optical Coherence Tomography Angiography.pdf (6.4 MB)

Hi Martin,
I have the impression that your initial segmentation is not working properly. A good segmentation is essential before you extract additional features.

Have you specified the proper color of your foreground/background. The skeletonise should provide relatively few lines, at least one should observe a line for the main vessels. This I do not see.

Could you upload the example image, the segmented and skeletonized image? If the images are too large use for example google drive and post the link.



I am getting confused. You want to quantify the spaces without vessels? This is different from the article you attached, where they quantify the area occupied by small vessels with respect to the total area.

What exactly do you mean by fractalizing and calculating fractals? Mathematically one can define a fractal dimension of a network, is this what you mean? Could you provide disambiguation and explain what the biologist understand with fractals?

Continuing the discussion from Image J binarization, skeletonizing and fractalizing:

Hi Antonio,

I will try to make myself clearer and try to explain better.

We have a 2 dimensional picture with 255 grey values:

They derive from the same place within the center of the retina in different layers (because of course the retina is a 3 dimensional tissue) - so they are overlays of the same vascular network the so called superficial capillary plexus (SCP) and the deep capillary plexus (DCP)

They are 6x6 mm and have a transversaal resolution betweem 9-18 microm/pixel depending on the scan quality.

The disease we investigate is unilateral, develops in the DCP extending to the SCP. Its major hallmark is a loss of capillaries around the center of the retina - the foveolar avascular zone. So theoretically, there must be a difference between the density of the vascular network around the center of the fovea of the ill and the healthy eye (which was proven by the study you read). We use a newer technology and believe that there is not only a difference between the affected and the contralateral eye but we think (it looks like) there is a difference between the “healthy” eye and a sample of unaffected patients.

In order to express this difference, we try to come up with our own algorithm by a different technology of much higher resolution. Nevertheless, the principle is similar. We want to binarize the original picture with a threshold ideal to catch most of the smallest vessels and their intervascular spaces:


Next step is to skeletonize the whole picture into as many intervascular spaces as detectable based on the binarized vessels - this is where we made the first mistake I believe:


If you take a look at the foveal center and compare it to the binarized picture above, there should not be any small “fractals” at all. Also, we want to get rid of the bigger vessels, and other artefacts, which would manpiulate our data. We couldn’t do that properly:


We wanna measure the number and size of areas split by the vessels (simplified: the more numerous and the smaller, the higher density) and compare the density in areas of interest

The goal would be a relative number of the density within the ring-shaped area as opposed to the density of the whole picture. In theory, this relation should be smaller the monre “normal” the vascular density within the ring is.

We were not able to quantify the number and size of small “fractals” within certain areas as tried below:


Does it become more meaningful to you now?

I’m sorry if I have problems with the explanation, I am a trained ophthalmologist with an interest in imaging but no clue about I.T. If you do have an impression on what I mean, it would make most sense if I wrote to you tomorrow someday whenever suits you best. I will try to get in touch with my brother, who is more of a computer guy. Is that ok with u?

Thanks a lot anyway, it seems like a typical “M.D.” scientist problem, but we tried everything including to contact the other study group without success.

Hi Martin,
is the image you uploaded best quality or downsampled?
First of all, I think that you segment the background instead of the vessels. If you want to segment vessels you need to specify the ‘dark-background’ option.

A skeletonization of the background is not a proxy of areas separated by vessels and skeletonization of a large area can give many branches as you see in the middle of the image (this is the result of segmentation of background + skeletonization)

Skeletonization is an erosion operation in all direction until you reach a single pixel.

Even if you can identify all the areas free of vessels and estimate their size, these areas may be interconnected so you can get very large areas even with many vessels. In my opinion a density of small vessels per area would be a better metric.

Hi Antonio,

What do you mean by density of small vessels? The number of vessels/area? How would you define the vessels if not by binarization and skeletonization?

You are correct, you need to define a threshold of the background (like it was done in the paper and we tried to do with the the grey values)…they set it to 122.5 (50%).

Yes, the center should be without any branches according to the picture (which is best quality I believe but will have look at it tomorrow at work). Any suggestions on a different more suitable approach?



Hi Antonio,

the pics are already best quality - the standard is set to low quality due to acquisition time (we are talking about clinical feasibility)….do you think this is a major problem for processing?

Whatelse could I do in your opinion to get as many of the small vessels and their intersections out of such pictures as possible to estimate the density of vessels within a predefined area (the mentioned ring around the center) and the whole picture?