FeatureJ: Edges


General Description

This plugin enables one to detect edges in images. The underlying algorithm is an implementation of Canny edge detection [1,2], which involves computation of the gradient magnitude, suppression of locally non-maximum gradient magnitudes, and (hysteresis) thresholding.

Edges Dialog

Dialog Description

Compute gradient magnitude image. Gradient magnitude computation and thresholding are completely separated operations in this plugin. Being able to switch them on or off independently enables one to first compute the gradient magnitude image (without applying thresholding) and then to experiment with different thresholds (without having to recompute the gradient magnitude). If the size of the image is one in the z-dimension (a single slice), the plugin computes 2D edges, otherwise it computes 3D edges (for every time frame and channel in a 5D image).

Smoothing scale. The smoothing scale is equal to the standard deviation of the Gaussian derivative kernels used for computing the gradient magnitude image and must be larger than zero. See the algorithmic details in the description of the Derivatives dialog for boundary conditions in setting this parameter. If physically isotropic Gaussian image smoothing is to be applied (which can be specified in the Options dialog), then in each dimension the scale is divided by the sampling interval in that dimension (the pixel width/height/depth as specified in ImageJ > Image > Properties).

Suppress non-maximum gradients. At many places in the gradient magnitude image the gray-value will not be a local maximum in the direction of the gradient vector. Selecting this option causes all of these non-maximum gradient magnitudes to be put to zero. Since this operation requires knowledge of the gradient vector, it can be applied only in combination with gradient magnitude computation.

Lower/Higher threshold value. Separating relevant from irrelevant responses can be done by means of thresholding. Two different threshold values can be specified. If only one of them is specified (it does not matter which one), the algorithm applies hard thresholding using the specified value, meaning that gray-values larger than or equal to that threshold are put to 255 and all others to zero. If both thresholds are specified, the algorithm applies hysteresis thresholding, meaning that all gray-values larger than or equal to the higher threshold are put to 255, all gray-values less than the lower threshold are put to zero, and elements (pixels/voxels) with a gray-value larger than or equal to the lower threshold are put to 255 only if they are connected to elements with a gray-value larger than or equal to the higher threshold through elements all with a gray-value larger than or equal to the lower threshold. If none of the thresholds is specified (empty text fields), thresholding is skipped altogether.


Algorithmic Details

Determining whether or not a gradient magnitude value is a local maximum in the direction of the gradient vector obviously requires interpolation of gradient magnitude values. In this implementation of the algorithm, linear interpolation is used for that purpose. Furthermore, when carrying out hysteresis thresholding, the algorithm uses 8-connectivity in 2D, and 26-connectivity in 3D.


References

[1]J. Canny. A Computational Approach to Edge Detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 8, no. 6, 1986, pp. 679-698.
[2]M. Sonka, V. Hlavac, R. Boyle. Image Processing, Analysis, and Machine Vision. 2nd ed., PWS Publishing, Pacific Grove, CA, 1999.
Copyright © 1996 - 2012 Erik Meijering