HALCON Reference Manual 10.0.2
Table of Contents / Segmentation / Edges ClassesClassesClasses | | | Operators

hysteresis_thresholdhysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThreshold (Operator)

Name

hysteresis_thresholdhysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThreshold — Perform a hysteresis threshold operation on an image.

Signature

hysteresis_threshold(Image : RegionHysteresis : Low, High, MaxLength : )

Herror hysteresis_threshold(const Hobject Image, Hobject* RegionHysteresis, const Hlong Low, const Hlong High, const Hlong MaxLength)

Herror T_hysteresis_threshold(const Hobject Image, Hobject* RegionHysteresis, const Htuple Low, const Htuple High, const Htuple MaxLength)

Herror hysteresis_threshold(Hobject Image, Hobject* RegionHysteresis, const HTuple& Low, const HTuple& High, const HTuple& MaxLength)

HRegion HImage::HysteresisThreshold(const HTuple& Low, const HTuple& High, const HTuple& MaxLength) const

HRegionArray HImageArray::HysteresisThreshold(const HTuple& Low, const HTuple& High, const HTuple& MaxLength) const

void HOperatorSetX.HysteresisThreshold(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*RegionHysteresis, [in] VARIANT Low, [in] VARIANT High, [in] VARIANT MaxLength)

IHRegionX* HImageX.HysteresisThreshold(
[in] VARIANT Low, [in] VARIANT High, [in] Hlong MaxLength)

static void HOperatorSet.HysteresisThreshold(HObject image, out HObject regionHysteresis, HTuple low, HTuple high, HTuple maxLength)

HRegion HImage.HysteresisThreshold(HTuple low, HTuple high, int maxLength)

HRegion HImage.HysteresisThreshold(int low, int high, int maxLength)

Description

hysteresis_thresholdhysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThreshold performs a hysteresis threshold operation (introduced by Canny) on an image. All points in the input image ImageImageImageImageimage having a gray value larger than or equal to HighHighHighHighhigh are immediately accepted (“secure” points). Conversely, all points with gray values less than LowLowLowLowlow are immediately rejected. “Potential” points with gray values between both thresholds are accepted if they are connected to “secure” points by a path of “potential” points having a length of at most MaxLengthMaxLengthMaxLengthMaxLengthmaxLength points. This means that “secure” points influence their surroundings (hysteresis).

Attention

For images of type byte, uint2, or int4 the lower threshold must be LowLowLowLowlow > 0.

Parallelization

Parameters

ImageImageImageImageimage (input_object)  image(-array) objectHImageHImageHImageXHobject (byte / uint2 / int4 / real)

Input image.

RegionHysteresisRegionHysteresisRegionHysteresisRegionHysteresisregionHysteresis (output_object)  region(-array) objectHRegionHRegionHRegionXHobject *

Segmented region.

LowLowLowLowlow (input_control)  number HTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double)

Lower threshold for the gray values.

Default value: 30

Suggested values: 5, 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100

HighHighHighHighhigh (input_control)  number HTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double)

Upper threshold for the gray values.

Default value: 60

Suggested values: 5, 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130

Restriction: High >= Low

MaxLengthMaxLengthMaxLengthMaxLengthmaxLength (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Maximum length of a path of “potential” points to reach a “secure” point.

Default value: 10

Suggested values: 1, 2, 3, 5, 7, 10, 12, 14, 17, 20, 25, 30, 35, 40, 50

Typical range of values: 1 ≤ MaxLength MaxLength MaxLength MaxLength maxLength

Minimum increment: 1

Recommended increment: 5

Restriction: MaxLength > 1

Result

hysteresis_thresholdhysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThreshold 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_systemset_systemSetSystemSetSystem. If necessary, an exception is raised.

Alternatives

dyn_thresholddyn_thresholddyn_thresholdDynThresholdDynThreshold, thresholdthresholdthresholdThresholdThreshold, class_2dim_supclass_2dim_supclass_2dim_supClass2dimSupClass2dimSup, fast_thresholdfast_thresholdfast_thresholdFastThresholdFastThreshold

See also

edges_imageedges_imageedges_imageEdgesImageEdgesImage, sobel_dirsobel_dirsobel_dirSobelDirSobelDir, background_segbackground_segbackground_segBackgroundSegBackgroundSeg

References

J. Canny, “Finding Edges and Lines in Images”; Report, AI-TR-720, M.I.T. Artificial Intelligence Lab., Cambridge, MA, 1983.

Module

Foundation


Table of Contents / Segmentation / Edges ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH