hysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThresholdhysteresis_threshold (算子)

名称

hysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThresholdhysteresis_threshold — 对图像执行滞后阈值运算。

签名

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)

void HysteresisThreshold(const HObject& Image, HObject* RegionHysteresis, const HTuple& Low, const HTuple& High, const HTuple& MaxLength)

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

HRegion HImage::HysteresisThreshold(Hlong Low, Hlong High, Hlong MaxLength) const

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)

def hysteresis_threshold(image: HObject, low: Union[int, float], high: Union[int, float], max_length: int) -> HObject

描述

hysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThresholdHysteresisThresholdhysteresis_threshold performs a hysteresis threshold operation (introduced by Canny) on an image. All points in the input image ImageImageImageImageimageimage having a gray value larger than or equal to HighHighHighHighhighhigh are immediately accepted (“secure” points). Conversely, all points with gray values less than LowLowLowLowlowlow 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 MaxLengthMaxLengthMaxLengthMaxLengthmaxLengthmax_length points. This means that “secure” points influence their surroundings (hysteresis).

注意

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

执行信息

参数

ImageImageImageImageimageimage (输入对象)  singlechannelimage(-array) objectHImageHObjectHImageHobject (byte / uint2 / int4 / real)

输入图像。

RegionHysteresisRegionHysteresisRegionHysteresisRegionHysteresisregionHysteresisregion_hysteresis (输出对象)  region(-array) objectHRegionHObjectHRegionHobject *

Segmented region.

LowLowLowLowlowlow (输入控制)  number HTupleUnion[int, float]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)

Lower threshold for the gray values.

默认值: 30

建议值: 5, 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100

HighHighHighHighhighhigh (输入控制)  number HTupleUnion[int, float]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)

Upper threshold for the gray values.

默认值: 60

建议值: 5, 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130

限制: High >= Low

MaxLengthMaxLengthMaxLengthMaxLengthmaxLengthmax_length (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

默认值: 10

建议值: 1, 2, 3, 5, 7, 10, 12, 14, 17, 20, 25, 30, 35, 40, 50

值范围: 1 ≤ MaxLength MaxLength MaxLength MaxLength maxLength max_length

最小增量: 1

建议增量: 5

结果

hysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThresholdHysteresisThresholdhysteresis_threshold 在所有参数正确时返回 2 ( H_MSG_TRUE )。 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""no_object_result", 'empty_region_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""store_empty_region" with set_systemset_systemSetSystemSetSystemSetSystemset_system。如有必要,则抛出异常。

替代

dyn_thresholddyn_thresholdDynThresholdDynThresholdDynThresholddyn_threshold, thresholdthresholdThresholdThresholdThresholdthreshold, class_2dim_supclass_2dim_supClass2dimSupClass2dimSupClass2dimSupclass_2dim_sup, fast_thresholdfast_thresholdFastThresholdFastThresholdFastThresholdfast_threshold

另见

edges_imageedges_imageEdgesImageEdgesImageEdgesImageedges_image, sobel_dirsobel_dirSobelDirSobelDirSobelDirsobel_dir, background_segbackground_segBackgroundSegBackgroundSegBackgroundSegbackground_seg

参考文献

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

模块

基础