FeatureJ: Edges


General Description

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

Edges Dialog

Description of Dialog Components

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 you to first compute the gradient magnitude image (without applying thresholding) and then to experiment with different thresholds (without having to recompute the gradient magnitude every time). If the size of the image is unity in the z-dimension (single slice), the plugin computes 2D edges. Otherwise it computes 3D edges. The edge detection operation is carried out 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 kernel used for computing the gradient magnitude image and must be larger than or equal to zero. If you have indicated in the Options dialog that you would like to apply (physically) isotropic Gaussian image smoothing, then in each dimension the scale is divided by the sampling interval in that dimension (that is, 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, 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, they are used together in hysteresis fashion, 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), the thresholding operation 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 - 2010 Erik Meijering