Perform a hysteresis threshold operation on an image.
hysteresis_threshold__ performs a hysteresis threshold operation (due to Canny) on an image. All points in the input image Image having a gray value larger than High are immediately accepted (``secure'' points). Conversely, all points with gray values less than Low 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 MaxLength points. This means that ``secure'' points influence their surroundings (hysteresis). The gray values of the input images remain unchanged. Only the regions of the image may get smaller.
Image (input_object) |
image(-array) -> object : byte |
Image to be segmented. |
RegionHysteresis (output_object) |
region(-array) -> object |
Segmentation result. |
Low (input_control) |
integer -> integer |
Lower threshold for the gray values. | |
Default value: 30 | |
Suggested values: 5, 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100 | |
Range of values: 0 <= Low <= 255 (lin) | |
Minimum increment: 1 | |
Recommended increment: 5 | |
Restriction: (0 < Low) && (Low < 255) |
High (input_control) |
integer -> integer |
Lower 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 | |
Range of values: 0 <= High <= 255 (lin) | |
Minimum increment: 1 | |
Recommended increment: 5 | |
Restriction: ((0 < High) && (High < 255)) && (High > Low) |
MaxLength (input_control) |
integer -> integer |
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 | |
Range of values: 1 <= MaxLength <= 1000 (lin) | |
Minimum increment: 1 | |
Recommended increment: 5 | |
Restriction: MaxLength > 1 |
hysteresis_threshold__ 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.
dyn_threshold__, threshold__, class_2dim__
edges__, sobel_amp, background_seg
J. Canny, "Finding Edges and Lines in Images"; Report, AI-TR-720, M.I.T. Artificial Intelligence Lab., Cambridge, MA, 1983.