Skip to content

nonmax_suppression_dirNonmaxSuppressionDirNonmaxSuppressionDirnonmax_suppression_dirnonmax_suppression_dirđź”—

Short descriptionđź”—

nonmax_suppression_dirNonmaxSuppressionDirNonmaxSuppressionDirnonmax_suppression_dirnonmax_suppression_dir — Suppress non-maximum points on an edge using a direction image.

Signatuređź”—

nonmax_suppression_dir( image ImgAmp, image ImgDir, out image ImageResult, string Mode )void NonmaxSuppressionDir( const HObject& ImgAmp, const HObject& ImgDir, HObject* ImageResult, const HTuple& Mode )static void HOperatorSet.NonmaxSuppressionDir( HObject imgAmp, HObject imgDir, out HObject imageResult, HTuple mode )def nonmax_suppression_dir( img_amp: HObject, img_dir: HObject, mode: str ) -> HObject

Herror nonmax_suppression_dir( const Hobject ImgAmp, const Hobject ImgDir, Hobject* ImageResult, const char* Mode )

Herror T_nonmax_suppression_dir( const Hobject ImgAmp, const Hobject ImgDir, Hobject* ImageResult, const Htuple Mode )

HImage HImage::NonmaxSuppressionDir( const HImage& ImgDir, const HString& Mode ) const

HImage HImage::NonmaxSuppressionDir( const HImage& ImgDir, const char* Mode ) const

HImage HImage::NonmaxSuppressionDir( const HImage& ImgDir, const wchar_t* Mode ) const (Windows only)

HImage HImage.NonmaxSuppressionDir( HImage imgDir, string mode )

Descriptionđź”—

nonmax_suppression_dirNonmaxSuppressionDir suppresses all points in the regions of the image ImgAmpimgAmpimg_amp whose gray values are not local (directed) maxima. ImgDirimgDirimg_dir is a direction image giving the direction perpendicular to the local maximum (Unit: 2 degrees, i.e., 50 degrees are coded as 25 in the image). Such images are returned, for example, by edges_imageEdgesImage. Two modes of operation can be selected:

  • 'nms'"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 gray value of the point to be tested, it is suppressed (i.e., removed from the input region. The corresponding gray value remains unchanged).

  • 'inms'"inms" Like 'nms'"nms". However, the two gray values for the test are obtained by interpolation from four adjacent points.

Execution informationđź”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

Parametersđź”—

ImgAmpimgAmpimg_amp (input_object) singlechannelimage(-array) → object (byte / uint2 / real)HObject (byte / uint2 / real)HImage (byte / uint2 / real)HObject (byte / uint2 / real)Hobject (byte / uint2 / real)

Amplitude (gradient magnitude) image.

ImgDirimgDirimg_dir (input_object) singlechannelimage(-array) → object (direction)HObject (direction)HImage (direction)HObject (direction)Hobject (direction)

Direction image.

ImageResultimageResultimage_result (output_object) image(-array) → object (byte / uint2 / real)HObject (byte / uint2 / real)HImage (byte / uint2 / real)HObject (byte / uint2 / real)Hobject * (byte / uint2 / real)

Image with thinned edge regions.

Modemodemode (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Select non-maximum-suppression or interpolating NMS.

Default: 'nms'"nms"
List of values: 'inms', 'nms'"inms", "nms"

Resultđź”—

nonmax_suppression_dirNonmaxSuppressionDir returns 2 (H_MSG_TRUE) if all parameters are correct. The behavior with respect to the input images and output regions can be determined by setting the values of the flags 'no_object_result'"no_object_result", 'empty_region_result'"empty_region_result", and 'store_empty_region'"store_empty_region" with set_systemSetSystem. If necessary, an exception is raised.

Combinations with other operatorsđź”—

Combinations

Possible predecessors

edges_imageEdgesImage, sobel_dirSobelDir, frei_dirFreiDir

Possible successors

thresholdThreshold, hysteresis_thresholdHysteresisThreshold

Alternatives

nonmax_suppression_ampNonmaxSuppressionAmp

See also

skeletonSkeleton

Referencesđź”—

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 Lines in Images”; Report, AI-TR-720; M.I.T. Artificial Intelligence Lab., Cambridge; 1983.

Moduleđź”—

Foundation