Comparison of three ImageJ-tools for global orientation analysis

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Comparison of three ImageJ-tools for global orientation analysis

Herbie
Dear ImageJ-listers and experts!

To my knowledge, there are three currently maintained ImageJ-tools (plugins
or macros) that can perform *global* orientation analyses of images:

1. OrientationJ v2.0.4 and v16.01.2018  (macro-recordable ImageJ-plugin)
<http://bigwww.epfl.ch/demo/orientation/#soft>

2. Directionality v2.3.0  (macro-recordable ImageJ-plugin)
<https://imagej.net/Directionality>

3. Easy Orientation v2.0.0  (macro-wrapper of ImageJ-plugins)
<https://www.gluender.de/Miscellanea/MiscTexts/UtilitiesText.html#Gl-2019-2>

Since 2013 I've received quite some requests and seen quite some posts on
the list and the forum, dealing with the question
"What ImageJ-tools are best suited for *global* orientation analyses?"
I've tried to answer and I've commented on this question in numerous
contributions but they are scattered over several places. So here is the
missing compilation...

Before I start with quantitative comparisons, I should like to sketch the
approaches (source code has not been inspected for this purpose):

-----------------------------------------------------------------------
General:
--------

1. OrientationJ approach (tool: "Orientation Distribution")____________
-- In the first place, this plugin is meant for local orientation analyses
based on "Structure Tensors". Global results (orientation histograms) are
obtained by combining (weighted) results of the local analyses which is
performed by the tool "Orientation Distribution".
-- OrientationJ lets one choose from six kinds of "Structure Tensors". Their
Gaussian windowed area of local operation can be specified (sigma). In the
present context of global analyses, the "Fourier"-scheme and a Gaussian of
sigma=1 lead to relative good results.
-- The weighting of the locally obtained orientations during the process of
their combination mainly depends on the parameter "Minimum Coherence". In
the present context, 70% was found to be reasonable and is suggested by the
authors as well. ("Min. Energy" = 10%)
-- The angular range of analysis is always 180deg (-90 to +89; -89.5 to
89.5) with fixed angular resolution of 1deg.
-- The scaling of the histogram values remains unexplained.
-- In the histograms 0deg stands for the horizontal and the angle increases
counter-clockwise.
-- "Orientation Distribution" accepts images of rectangular support.
-- "OrientationJ" is easily installed on ImageJ and Fiji.

2. Directionality approaches (both methods)____________________________
(a) Method: "Local Gradient Orientation"
-- In this mode the plugin computes global orientation histograms from
results of local analyses, in a similar fashion as the tool "Orientation
Distribution" described above.
-- Only a single local operator of fixed size is available.
(b) Method: "Fourier components"
-- In this mode the plugin computes global orientation histograms from
results of (regional?) Fourier power-spectral analyses.
-- The image or regions appear to be windowed and each power spectrum is
summed in several blurred double-sectors centered on the spectral origin.
Sums of rotated double-sectors give the histogram values, with the rotation
angles plus 90deg as the histogram abscissa.
-- The radial shape of the double-sectors realize a highpass of fixed
transfer function.
(a) & (b)
-- The angular range of analysis and the angular resolution can be set by
the user. The latter is done by specifying the desired number of histogram
values.
-- The scaling of the histogram values is as usual: The summed values add to
one.
-- In the histograms 0deg stands for the horizontal and the angle increases
counter-clockwise.
-- "Directionality" accepts images of rectangular support.
-- "Directionality" comes with Fiji and is difficult to install on ImageJ.

3. Easy Orientation approach (tool: "Easy Orientation Analysis")_______
-- The approach is related to that of "Directionality (b)". It works purely
global and is mathematically well-founded.*
-- The image is windowed by a defined function and its DC-component is
suppressed.
-- The Fourier power-spectrum is summed along straight lines through its
origin. The number of rotated lines depends on the image size and is
individually determined according to the angular sampling theorem.**
-- The power-spectral analysis is not restricted by any additional filters,
although a highpass of a user-set cutoff frequency can optionally be
applied.
-- The angular range of analysis is always 180deg (0 to 180-delta) with
image size-specific best angular resolution according to the angular
sampling theorem.
-- The scaling of the histogram values is as usual: The summed values add to
one.
-- In the histograms 0deg stands for the horizontal and the angle increases
counter-clockwise.
-- "Easy Orientation Analysis" always analyzes the largest square-sized and
central area of an image.
-- "Easy Orientation" is easily installed on ImageJ and Fiji.
-- About verification and validation of this tool, please read:
<http://imagej.1557.x6.nabble.com/info-on-directionality-plugin-tp5022022p5022074.html>

  *<www.gluender.de/Writings/WritingsTexts/HardText.html#Gl-1986-2>
**<http://www.gluender.de/Writings/WritingsTexts/HardText.html#Gl-2013-1>
-----------------------------------------------------------------------

Again:
"What ImageJ-tools are best suited for global orientation analyses?"

This question isn't easy to answer but what can be done, is to apply the
above ImageJ-tools to the same test image,
-- judge the quality of the result,
-- estimate the relative speed of execution, and
-- take into account individual features (see above).

It appears obvious that there isn't a single test image that is suited for
this task, i.e. that can represent all kinds of images *and* leads to
results that can be judged objectively.

Images for which the latter is possible, are those with (concentric)
circular structures. Ideally, such images should show independence of
orientation, i.e. a "flat" histogram.

I've decided to use a radial chirp, i.e. a gray-level zone-plate having an
256x256 support (canvas). The maximum fundamental spatial frequency of this
zone-plate is 2/3 of the Nyquist-frequency. For this image support the best
angular resolution is obtained for 402 angles per 180deg or 403 angles per
181deg.

-- Attached please find a ZIP-archive that contains the zone-plate image and
six result plots (histograms).
-- The relative deviation of the histogram values from their mean is denoted
as "Coefficient of Variation" (CV) in percent. Ideally it should be zero.
-- Execution times (T) in seconds are measured for a 1024x1024 zone-plate
with the display of the histogram plot and the table of histogram values. Of
course the times are machine-dependent, i.e. only the relations are of
importance.

Configuration for 1. and 3.:
ImageJ 1.52p; Java 1.8.0_172; dedicated RAM 5 GB, 8 threads
Configuration for 2.:
Fiji 2.0.0-rc-69/1.52p; Java 1.8.0_202; dedicated RAM 5 GB, 8 threads


-----------------------------------------------------------------------
Results:
--------

1. tool: "Orientation Distribution"____________________________________
I've considered two versions of this tool that, with the same parameter
settings (see screen-shots), resulted in fairly different histograms:
(a) OrientationJ-v204_OJ-Histogram.png
(b) OrientationJ-v16012018_S-Distribution.png

(a) CV =  5.13 % (180 values;   T ≈  1.060 s (180 values);
(b) CV =  1.58 % (180 values;   T ≈  0.950 s (180 values);

Comments:
-- Reasons for the different results of the two versions are unclear.
-- Regarding the execution times one should bear in mind that they are for
computations of 180 values *only*.
-- It is by no means clear which parameter setting gives optimum global
results and why.


2. tool: "Directionality"______________________________________________
I've set the angular range of analysis to the default (-90 to 90) and the
number of histogram values to 403 and for (b) additionally to 181. The
resulting histograms are:
(a) Directionality-230_LocalGradientOrient-Histogram_403.png
(b) Directionality-230_FourierComponents-Histogram_403.png
    Directionality-230_FourierComponents-Histogram_181.png

(a) CV = 40.16 % (403 values);  T ≈  0.275 s (1609 values);
(b) CV = 27.97 % (403 values);  T ≈ 64.5   s (1609 values);*
    CV = 12.19 % (181 values);  T ≈  7.1   s (181 values);

*needs more than 5 GB of dedicated RAM (runs with 9 GB)

Comments:
-- Reasons for the poor CVs are unclear.
-- Reasons for the enormous processing time and memory consumption of
approach (b) are unclear but may be caused by sub-optimum source code.
-- The appearance of the original histograms (not shown here) is
questionable. Every bin appears to have a distracting gray shadow and it is
difficult to obtain a display size that provides a regular (gap-less)
bin-arrangement. The fitted curve makes little sense.


3. tool: "Easy Orientation Analysis"___________________________________
The number of histogram values is automatically set according to the angular
sampling theorem. No highpass is applied. The resulting histograms is:
    EasyOrientation-200_Orientation Salience.png

    CV =  0.068 % (402 values); T ≈  1.020 s (1608 values);

Comment:
-- For many natural images the cutoff frequency of an optional highpass is
crucial. "Easy Orientation Analysis" provides this option and the companion
tool "Orientation Highpass Test" facilitates the choice of an adequate
cutoff.
-----------------------------------------------------------------------

As always, please perform your own tests and form your own opinion about the
tools.

Regards

Herbie



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Comparison of three ImageJ-tools for global orientation analysis

Herbie
Attached please find the missing ZIP-archive with the histogram-results.
Histograms.zip
<http://imagej.1557.x6.nabble.com/file/t380516/Histograms.zip>  


Herbie wrote

> Dear ImageJ-listers and experts!
>
> To my knowledge, there are three currently maintained ImageJ-tools
> (plugins
> or macros) that can perform *global* orientation analyses of images:
>
> 1. OrientationJ v2.0.4 and v16.01.2018  (macro-recordable ImageJ-plugin)
> &lt;http://bigwww.epfl.ch/demo/orientation/#soft&gt;
>
> 2. Directionality v2.3.0  (macro-recordable ImageJ-plugin)
> &lt;https://imagej.net/Directionality&gt;
>
> 3. Easy Orientation v2.0.0  (macro-wrapper of ImageJ-plugins)
> &lt;https://www.gluender.de/Miscellanea/MiscTexts/UtilitiesText.html#Gl-2019-2&gt;
>
> Since 2013 I've received quite some requests and seen quite some posts on
> the list and the forum, dealing with the question
> "What ImageJ-tools are best suited for *global* orientation analyses?"
> I've tried to answer and I've commented on this question in numerous
> contributions but they are scattered over several places. So here is the
> missing compilation...
>
> Before I start with quantitative comparisons, I should like to sketch the
> approaches (source code has not been inspected for this purpose):
>
> -----------------------------------------------------------------------
> General:
> --------
>
> 1. OrientationJ approach (tool: "Orientation Distribution")____________
> -- In the first place, this plugin is meant for local orientation analyses
> based on "Structure Tensors". Global results (orientation histograms) are
> obtained by combining (weighted) results of the local analyses which is
> performed by the tool "Orientation Distribution".
> -- OrientationJ lets one choose from six kinds of "Structure Tensors".
> Their
> Gaussian windowed area of local operation can be specified (sigma). In the
> present context of global analyses, the "Fourier"-scheme and a Gaussian of
> sigma=1 lead to relative good results.
> -- The weighting of the locally obtained orientations during the process
> of
> their combination mainly depends on the parameter "Minimum Coherence". In
> the present context, 70% was found to be reasonable and is suggested by
> the
> authors as well. ("Min. Energy" = 10%)
> -- The angular range of analysis is always 180deg (-90 to +89; -89.5 to
> 89.5) with fixed angular resolution of 1deg.
> -- The scaling of the histogram values remains unexplained.
> -- In the histograms 0deg stands for the horizontal and the angle
> increases
> counter-clockwise.
> -- "Orientation Distribution" accepts images of rectangular support.
> -- "OrientationJ" is easily installed on ImageJ and Fiji.
>
> 2. Directionality approaches (both methods)____________________________
> (a) Method: "Local Gradient Orientation"
> -- In this mode the plugin computes global orientation histograms from
> results of local analyses, in a similar fashion as the tool "Orientation
> Distribution" described above.
> -- Only a single local operator of fixed size is available.
> (b) Method: "Fourier components"
> -- In this mode the plugin computes global orientation histograms from
> results of (regional?) Fourier power-spectral analyses.
> -- The image or regions appear to be windowed and each power spectrum is
> summed in several blurred double-sectors centered on the spectral origin.
> Sums of rotated double-sectors give the histogram values, with the
> rotation
> angles plus 90deg as the histogram abscissa.
> -- The radial shape of the double-sectors realize a highpass of fixed
> transfer function.
> (a) & (b)
> -- The angular range of analysis and the angular resolution can be set by
> the user. The latter is done by specifying the desired number of histogram
> values.
> -- The scaling of the histogram values is as usual: The summed values add
> to
> one.
> -- In the histograms 0deg stands for the horizontal and the angle
> increases
> counter-clockwise.
> -- "Directionality" accepts images of rectangular support.
> -- "Directionality" comes with Fiji and is difficult to install on ImageJ.
>
> 3. Easy Orientation approach (tool: "Easy Orientation Analysis")_______
> -- The approach is related to that of "Directionality (b)". It works
> purely
> global and is mathematically well-founded.*
> -- The image is windowed by a defined function and its DC-component is
> suppressed.
> -- The Fourier power-spectrum is summed along straight lines through its
> origin. The number of rotated lines depends on the image size and is
> individually determined according to the angular sampling theorem.**
> -- The power-spectral analysis is not restricted by any additional
> filters,
> although a highpass of a user-set cutoff frequency can optionally be
> applied.
> -- The angular range of analysis is always 180deg (0 to 180-delta) with
> image size-specific best angular resolution according to the angular
> sampling theorem.
> -- The scaling of the histogram values is as usual: The summed values add
> to
> one.
> -- In the histograms 0deg stands for the horizontal and the angle
> increases
> counter-clockwise.
> -- "Easy Orientation Analysis" always analyzes the largest square-sized
> and
> central area of an image.
> -- "Easy Orientation" is easily installed on ImageJ and Fiji.
> -- About verification and validation of this tool, please read:
> &lt;http://imagej.1557.x6.nabble.com/info-on-directionality-plugin-tp5022022p5022074.html&gt;
>
>   *&lt;www.gluender.de/Writings/WritingsTexts/HardText.html#Gl-1986-2&gt;
> **&lt;http://www.gluender.de/Writings/WritingsTexts/HardText.html#Gl-2013-1&gt;
> -----------------------------------------------------------------------
>
> Again:
> "What ImageJ-tools are best suited for global orientation analyses?"
>
> This question isn't easy to answer but what can be done, is to apply the
> above ImageJ-tools to the same test image,
> -- judge the quality of the result,
> -- estimate the relative speed of execution, and
> -- take into account individual features (see above).
>
> It appears obvious that there isn't a single test image that is suited for
> this task, i.e. that can represent all kinds of images *and* leads to
> results that can be judged objectively.
>
> Images for which the latter is possible, are those with (concentric)
> circular structures. Ideally, such images should show independence of
> orientation, i.e. a "flat" histogram.
>
> I've decided to use a radial chirp, i.e. a gray-level zone-plate having an
> 256x256 support (canvas). The maximum fundamental spatial frequency of
> this
> zone-plate is 2/3 of the Nyquist-frequency. For this image support the
> best
> angular resolution is obtained for 402 angles per 180deg or 403 angles per
> 181deg.
>
> -- Attached please find a ZIP-archive that contains the zone-plate image
> and
> six result plots (histograms).
> -- The relative deviation of the histogram values from their mean is
> denoted
> as "Coefficient of Variation" (CV) in percent. Ideally it should be zero.
> -- Execution times (T) in seconds are measured for a 1024x1024 zone-plate
> with the display of the histogram plot and the table of histogram values.
> Of
> course the times are machine-dependent, i.e. only the relations are of
> importance.
>
> Configuration for 1. and 3.:
> ImageJ 1.52p; Java 1.8.0_172; dedicated RAM 5 GB, 8 threads
> Configuration for 2.:
> Fiji 2.0.0-rc-69/1.52p; Java 1.8.0_202; dedicated RAM 5 GB, 8 threads
>
>
> -----------------------------------------------------------------------
> Results:
> --------
>
> 1. tool: "Orientation Distribution"____________________________________
> I've considered two versions of this tool that, with the same parameter
> settings (see screen-shots), resulted in fairly different histograms:
> (a) OrientationJ-v204_OJ-Histogram.png
> (b) OrientationJ-v16012018_S-Distribution.png
>
> (a) CV =  5.13 % (180 values;   T ≈  1.060 s (180 values);
> (b) CV =  1.58 % (180 values;   T ≈  0.950 s (180 values);
>
> Comments:
> -- Reasons for the different results of the two versions are unclear.
> -- Regarding the execution times one should bear in mind that they are for
> computations of 180 values *only*.
> -- It is by no means clear which parameter setting gives optimum global
> results and why.
>
>
> 2. tool: "Directionality"______________________________________________
> I've set the angular range of analysis to the default (-90 to 90) and the
> number of histogram values to 403 and for (b) additionally to 181. The
> resulting histograms are:
> (a) Directionality-230_LocalGradientOrient-Histogram_403.png
> (b) Directionality-230_FourierComponents-Histogram_403.png
>     Directionality-230_FourierComponents-Histogram_181.png
>
> (a) CV = 40.16 % (403 values);  T ≈  0.275 s (1609 values);
> (b) CV = 27.97 % (403 values);  T ≈ 64.5   s (1609 values);*
>     CV = 12.19 % (181 values);  T ≈  7.1   s (181 values);
>
> *needs more than 5 GB of dedicated RAM (runs with 9 GB)
>
> Comments:
> -- Reasons for the poor CVs are unclear.
> -- Reasons for the enormous processing time and memory consumption of
> approach (b) are unclear but may be caused by sub-optimum source code.
> -- The appearance of the original histograms (not shown here) is
> questionable. Every bin appears to have a distracting gray shadow and it
> is
> difficult to obtain a display size that provides a regular (gap-less)
> bin-arrangement. The fitted curve makes little sense.
>
>
> 3. tool: "Easy Orientation Analysis"___________________________________
> The number of histogram values is automatically set according to the
> angular
> sampling theorem. No highpass is applied. The resulting histograms is:
>     EasyOrientation-200_Orientation Salience.png
>
>     CV =  0.068 % (402 values); T ≈  1.020 s (1608 values);
>
> Comment:
> -- For many natural images the cutoff frequency of an optional highpass is
> crucial. "Easy Orientation Analysis" provides this option and the
> companion
> tool "Orientation Highpass Test" facilitates the choice of an adequate
> cutoff.
> -----------------------------------------------------------------------
>
> As always, please perform your own tests and form your own opinion about
> the
> tools.
>
> Regards
>
> Herbie
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html





--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html