Suppress non-maximum points on an edge.
nonmax_suppression_dir suppresses all points in the regions of the image ImgAmp for which the gray values are no local (directed) maximum. ImgDir is a direction image giving the direction perpendicular for the local maximum (Unit: 2 degrees, i.e., 50 degrees are coded as 25 in the image). Such images are returned by edges__, for example. Two modes of operation can be selected:
'nms' Each point in the image is tested whether its gray value is a local maximum perpendicular to its direction. In this mode only the two neighbors closest to the given direction are examined. If one of the two gray values is greater than the point to be tested, it is suppressed (i.e., removed from the input region; the corresponding gray value remains unchanged). 'inms' Like 'nms'; however, the two gray values for the test are obtained by interpolation from four adjacent points.
ImgAmp (input_object) |
image(-array) -> object |
Amplitude (gradient magnitude) image. |
ImgDir (input_object) |
image(-array) -> object |
Direction image. |
ImageResult (output_object) |
image(-array) -> object |
Image with thinned edge regions. |
Mode (input_control) |
string -> string |
Select non-maximum-suppression or interpolating NMS. | |
Default value: 'nms' | |
List of values: 'nms', 'inms' |
nonmax_suppression_dir returns TRUE if all parameters are correct. The behaviour with respect to the input images and output regions can be determined by setting the values of the flags 'no_object_result', 'empty_region_result', and 'store_empty_region' with set_system. If necessary, an exception is raised.
threshold__, hysteresis_threshold__
nonmax_suppression_amp, grey_skeleton__, max1__
S.Lanser: "Detektion von Stufenkanten mittels rekursiver Filter nach Deriche"; Diplomarbeit; Technische Universität München, Institut für Informatik, Lehrstuhl Prof. Radig; 1991.
J.Canny: "Finding Edges and Rows in Images"; Report, AI-TR-720; M.I.T. Artificial Intelligence Lab., Cambridge; 1983.