Analyse the directionality of nanofibers



Salut Jan!

[…] your measurements will be highly biased by the fibers in the foreground […]

Absolute correct and an important aspect.




Thank You very much. This helps a lot. I see in the articles where they state various quantitative results like angular deviation ,mean vector angle etc. to show the alignment. I know some of that data can be generated using directionality plugin in ImageJ. But is that data sufficient for the publication purpose. It will be great help if you can suggest something.

Thank you


Thank you Very much. I get your point but i guess most of the algorithms work this way where they focus on foreground of image. It will be very kind if you can suggest what kind of control i can keep?

Also I tried doing the same analysis using directionality plugin of Image J and it gives me direction, dispersion, amount and goodness. What will be the good parameter to see the alignment dispersion or goodness?( I mean if we have to say that this sample has more aligned fibers as compared to other one what parameter we should consider) ?


Good day Rama Krishna Sharma,

I fear you should first understand what “orientation histogram” means before you think of further descriptors.

BTW and as I’ve mentioned before, the orientation histograms generated by the “directionality”-plugin are a bit problematic.

Here are two papers that explain the theory and computation of “orientation salience functions”:




Also, I tested the Directionality plugin in a couple of images and while I can see that in the images where the alignment is more prominent the distribution of directions becomes sharper (narrower gaussian fit), I don’t know how to say whether there are significant differences between different sets of images.


Good Day Herbie

Thank you. I would definitely look into the articles which you have suggested.


Good day Rama Krishna Sharma,

with regard to the “directionality”-plugin:
I’ve never understood the Gaussian fit and why it may be applied.
Do you have an explanation.

Please compare the results obtained with the “directionality”-plugin to the result I’ve previously posted and make sure you understand the idea of orientation histograms" per se.




Really nice figures, @Herbie! How did you create them? I should like to reproduce them locally, and try that approach on some of our collagen data.


Good day Curtis,

most if not all one needs to know about Orientation Salience Functions—theoretical and algorithmic aspects—is explained in the above cited papers. Algorithmic realization with high precision isn’t trivial but the steps are well explained and a link to an ImageJ-plugin is given. However, the latter doesn’t do all of the job …

Be aware that the approach acts globally or regionally but not locally as “Structure Tensor”-analyses do.




Hi @Herbie,

What software or function did you use to develop the orientation salience functions for those fibres in the images above? I am trying to do something very similar for analysing collagen. If possible, do you have a link you could provide?

Thank you.


I’ve attached a sample image. After converting this sample to an 8-bit image, orientation J displays a dominant fibre direction of approx -30 or (+150) degrees which is incorrect. We would expect the dominant fibre direction to be closer to -60 or (+120) degrees in this case (ignoring the collagen crimp and focusing on the directionality of the fibres).



Good day Greg!

What software or function did you use to develop the orientation salience functions

The processing scheme consists of a quite elaborate combination of a custom written ImageJ-plugin that is cited in the 2013-report and an ImageJ-macro. For details please study the report.

In order to obtain proper results, profound knowledge of signal and systems theory is required to construct a clean processing scheme.

A big problem with orientation analyses are oriented background fluctuations that are analyzed as well. This can be avoided by applying a properly designed high-pass filter.

Regarding the provided sample image, I’m not quite sure if it arrived savely. Actually, I don’t think so.

Please post an unprocessed image in the original TIF- or PNG-format.
You may also post images as Zip-archives or make them accessible via a dropbox-like service.




Hi Herbie,

I am viewing collagen through the depth of biological tissue and so have many z-stacks of images that need to be analysed.

I attach a dropbox link to an unprocessed image of the collagen fibres, please refer to the original message about the expected orientation angle.

I have attempted to analyse the mages but have noticed inconsistent and unreliable results from image to image. Hope you can help.

Very much appreciated.



Good day Greg,

thanks for making a sample image accessible!

The problem with this image is, that it is unsuited for scientific analyses beacuse itr shows heavy over-exposure (saturation) as you can see from its histogram:.(The number of pixels with value 255 should be low!)
(Histogram of the green channel because the red and blue channels are empty.)

In spite of this severe short-coming, I’ve run four orientation analyses of this image, i.e. of the following windowed version of it.

Concerning the spatial frequency content of your sample image, the situation is as mentioned before, it contains coarse structures that are differently oriented when compared to the fine structures. Therefore, I did four analyses with different high-pass filters applied.

  1. No high-pass (DC-removal only)
  2. High-pass with equivalent cut-off at 2.5% of the Nyquist-frequency
  3. High-pass with equivalent cut-off at 5.0% of the Nyquist-frequency
  4. High-pass with equivalent cut-off at 10% of the Nyquist-frequency

Please note that the orientation angle goes from 0deg to 180deg, starting with the horizontal orientation (0deg) and increasing counter-clockwise.


  1. What the plots have in common is that they show the dominant orientation between 112 and 120 degrees.
  2. When comparing the unfiltered result with the others, we see that there must be at least three differently oriented low-frequency (spatially coarse) structures, with orientation angles of about 90 and 150 degrees and one not far below the dominant orientation.
  3. The slightly high-pass filtered result (2.5%) shows the latter more clearly. Furthermore, it demonstrates that the 150deg-structure in fact are two neighbouring ones, at about 140deg and 150deg.
  4. The medium high-pass filtered result (5.0%) shows that the structure leading to the 90deg peak is filtered away. The dominant orientation clearly stands out (rather sharp peak) at about 113 degrees.
  5. In my opinion, further high-pass filtering doesn’t provide better insights.
  6. From my point of view and with regard to the provided sample image, the optimum high-pass filter cut-off frequency is around 5% of the Nyquist-frequency

If you are interested in what I judge being the collagen fibers in your sample image, then they show a dominant orientation salience at about 113 degrees from the horizontal orientation (with the angle increasing counter clockwise).




Hi Herbie,

Really helpful response, very much appreciated! Would you be willing to discuss this topic further via email? I can provide my email if so.



Would you be willing to discuss this topic further via email?

This depends on what you exactly want to discuss because in general even details may appear interesting for the general audience. However, if you are interested in professional consultancy it is more convenient to negotiate off-forum.

Off-forum communication is possible via the Message-option, if you click on my Avatar.




Hello rsharma,
As to your inquiries, the directionality plug in works fine, and the data supplied by it is quality for publishing as long as the software, method used…etc.etc.
rsharma_Data.csv (3.3 KB)

Also it uses the entire usable image, not just the chunk in the middle and the histogram is self explainatory. The thick lines are the data and the thin blue line is the goodness of fit.



please be so kind and study the literature before you judge non-trivial methods of image analysis.

Directionality when using the Fourier-approach is by no means the optimum solution for global or regional orientation analyses. My report explains in detail why global or regional orientation analyses are by no means a trivial affair when applied to digitized images.

Greg’s data needs to be carefully analyzed and in my above reply I explain why this is so important. The Directionality-plugin doesn’t provide high-pass filtering but this is not the only deficit.




Hi Herbie,

Thanks for the report, it makes for a great read.

I have since attempted to recreate the results you obtained for the image I provided you with. I have made use of the plugins mentioned in the report, however, where I’m having difficulty is the method you applied for DC-removal and high-pass with an equivalent cut-off of Nyquist frequency.

Would you be able to discuss this further in terms of what function or plugin was used for each? I have a large number of images similar to the one provided that need to be analysed and would love to be able to reproduce such accuracy.


Image windowing ("Tukey"-type) with DC-removal

Good day Greg,

I don’t think you will be able to recreate code in days that took me weeks …

it makes for a great read.

If you’ve studied the report, you may have realized that the first step (at least it is necessary for the power-spectral and autocorrelation approach) is image windowing. I use a round disc-shaped window with cosine slopes. The default is 80% flat.

The second step (for the power-spectral and autocorrelation approach) is to increase the resolution of the final representation (power-spectrum or autocorrelation-function). DC-removal and high-pass filtering come later.

The way I’ve implemented the DC-removal is quite involved because (for the purpose of comparison) I had to do it in the spatial domain to make it equal for the three approaches (the projection approach doesn’t involve any Fourier-transformation). For the power-spectral and autocorrelation approach DC-removal simply means blocking the central pixel of the Fourier power-spectrum.

High-pass filtering (for the power-spectral and autocorrelation approach only) is done by circular functions that are inverse to the window function but of course they are applied to the Fourier-spectrum. Not perfectly correct, I call the equivalent cut-off frequency the one defined by the point of inflexion of the cosine slope. For evident reasons, high-pass filtering is not considered in the report.

Please note that, as described in the report, the angular resolution is only valid for images that have been correctly sampled according to the Shannon-criterion.
This definitely doesn’t hold true for your over-exposed sample image!
As mentioned before, such images are unsuited for any kind of scientific image analyses, orientation analyses included. They suffer from artifacts that can’t be removed!