Operator Reference

nonmax_suppression_dirnonmax_suppression_dirNonmaxSuppressionDirNonmaxSuppressionDirnonmax_suppression_dir (Operator)

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

Signature

nonmax_suppression_dir(ImgAmp, ImgDir : ImageResult : Mode : )

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)

void NonmaxSuppressionDir(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)

static void HOperatorSet.NonmaxSuppressionDir(HObject imgAmp, HObject imgDir, out HObject imageResult, HTuple mode)

HImage HImage.NonmaxSuppressionDir(HImage imgDir, string mode)

def nonmax_suppression_dir(img_amp: HObject, img_dir: HObject, mode: str) -> HObject

Description

nonmax_suppression_dirnonmax_suppression_dirNonmaxSuppressionDirNonmaxSuppressionDirnonmax_suppression_dir suppresses all points in the regions of the image ImgAmpImgAmpImgAmpimgAmpimg_amp whose gray values are not local (directed) maxima. ImgDirImgDirImgDirimgDirimg_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_imageedges_imageEdgesImageEdgesImageedges_image. Two modes of operation can be selected:

'nms'"nms""nms""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""inms""inms""inms"

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

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Automatically parallelized on tuple level.

Parameters

ImgAmpImgAmpImgAmpimgAmpimg_amp (input_object)  singlechannelimage(-array) objectHImageHObjectHObjectHobject (byte / uint2 / real)

Amplitude (gradient magnitude) image.

ImgDirImgDirImgDirimgDirimg_dir (input_object)  singlechannelimage(-array) objectHImageHObjectHObjectHobject (direction)

Direction image.

ImageResultImageResultImageResultimageResultimage_result (output_object)  image(-array) objectHImageHObjectHObjectHobject * (byte / uint2 / real)

Image with thinned edge regions.

ModeModeModemodemode (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Select non-maximum-suppression or interpolating NMS.

Default: 'nms' "nms" "nms" "nms" "nms"

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

Result

nonmax_suppression_dirnonmax_suppression_dirNonmaxSuppressionDirNonmaxSuppressionDirnonmax_suppression_dir 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""no_object_result""no_object_result""no_object_result", 'empty_region_result'"empty_region_result""empty_region_result""empty_region_result""empty_region_result", and 'store_empty_region'"store_empty_region""store_empty_region""store_empty_region""store_empty_region" with set_systemset_systemSetSystemSetSystemset_system. If necessary, an exception is raised.

Possible Predecessors

edges_imageedges_imageEdgesImageEdgesImageedges_image, sobel_dirsobel_dirSobelDirSobelDirsobel_dir, frei_dirfrei_dirFreiDirFreiDirfrei_dir

Possible Successors

thresholdthresholdThresholdThresholdthreshold, hysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThresholdhysteresis_threshold

Alternatives

nonmax_suppression_ampnonmax_suppression_ampNonmaxSuppressionAmpNonmaxSuppressionAmpnonmax_suppression_amp

See also

skeletonskeletonSkeletonSkeletonskeleton

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