Skip to content

Fiji/ImageJ plugins — Directional Image Analysis (2D)

Daniel Sage · Center for Imaging and Biomedical Imaging Group, Ecole Polytechnique Fédérale de Lausanne (EPFL)

Operator

How short can an honest gradient-structure-tensor operator be? gst_operator.py computes the three OrientationJ features with separable Gaussian derivatives in the space domain — no Fourier transform, no spline prefilter, no boundary handling beyond mirroring — in sixty lines of NumPy:

from gst_operator import features
C, E, theta = features(image, sigma=2.0, sigma_gradient=1.0)

Two widths control everything: sigma_gradient for the derivative, sigma for the tensor window. C is the coherency in [0, 1], E the gradient energy, theta the orientation of the structures in radians, counter-clockwise from the horizontal — the OrientationJ convention.

The three features it returns

Run on one image, the operator returns the coherency, the energy and the orientation — the same three maps the Analysis command produces, from the same tensor:

Files

file content
gst_operator.py the operator: Gaussian kernels, gradient, structure tensor, features
gst_operator.ipynb the validation: exactness, agreement with the plugin, accuracy versus structure size
agreement.csv per-image angular difference and feature correlations