threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixthreshold_sub_pix (Operator)

Name

threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixthreshold_sub_pix — Extract level crossings from an image with subpixel accuracy.

Signature

threshold_sub_pix(Image : Border : Threshold : )

Herror threshold_sub_pix(const Hobject Image, Hobject* Border, double Threshold)

Herror T_threshold_sub_pix(const Hobject Image, Hobject* Border, const Htuple Threshold)

void ThresholdSubPix(const HObject& Image, HObject* Border, const HTuple& Threshold)

HXLDCont HImage::ThresholdSubPix(const HTuple& Threshold) const

HXLDCont HImage::ThresholdSubPix(double Threshold) const

static void HOperatorSet.ThresholdSubPix(HObject image, out HObject border, HTuple threshold)

HXLDCont HImage.ThresholdSubPix(HTuple threshold)

HXLDCont HImage.ThresholdSubPix(double threshold)

def threshold_sub_pix(image: HObject, threshold: Union[float, int]) -> HObject

Description

threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixThresholdSubPixthreshold_sub_pix extracts the level crossings at the level ThresholdThresholdThresholdThresholdthresholdthreshold of the input image ImageImageImageImageimageimage with subpixel accuracy. The extracted level crossings are returned as XLD-contours in BorderBorderBorderBorderborderborder. In contrast to the operator thresholdthresholdThresholdThresholdThresholdthreshold, threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixThresholdSubPixthreshold_sub_pix does not return regions, but the lines that separate regions with a gray value less than ThresholdThresholdThresholdThresholdthresholdthreshold from regions with a gray value greater than ThresholdThresholdThresholdThresholdthresholdthreshold.

For the extraction, the input image is regarded as a surface, in which the gray values are interpolated bilinearly between the centers of the individual pixels. Consistent with the surface thus defined, level crossing lines are extracted for each pixel and linked into topologically sound contours. This means that the level crossing contours are correctly split at junction points. If the image contains extended areas of constant gray value ThresholdThresholdThresholdThresholdthresholdthreshold, only the border of such areas is returned as level crossings.

Execution Information

Parameters

ImageImageImageImageimageimage (input_object)  singlechannelimage objectHImageHObjectHImageHobject (byte / int1 / int2 / uint2 / int4 / real)

Input image.

BorderBorderBorderBorderborderborder (output_object)  xld_cont-array objectHXLDContHObjectHXLDContHobject *

Extracted level crossings.

ThresholdThresholdThresholdThresholdthresholdthreshold (input_control)  number HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Threshold for the level crossings.

Default value: 128

Suggested values: 0.0, 10.0, 30.0, 64.0, 128.0, 200.0, 220.0, 255.0

Example (HDevelop)

read_image(Image,'fabrik')
threshold_sub_pix(Image,Border,35)
dev_display(Border)

Example (C)

/* Detection zero crossings of the Laplacian-of-Gaussian of aerial image */
read_image(&Image,"fabrik");
threshold_sub_pix(Laplace,&Border,35);
disp_xld(Border,WindowHandle);

Example (HDevelop)

read_image(Image,'fabrik')
threshold_sub_pix(Image,Border,35)
dev_display(Border)

Example (HDevelop)

read_image(Image,'fabrik')
threshold_sub_pix(Image,Border,35)
dev_display(Border)

Example (HDevelop)

read_image(Image,'fabrik')
threshold_sub_pix(Image,Border,35)
dev_display(Border)

Result

threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixThresholdSubPixthreshold_sub_pix usually returns the value TRUE. If necessary, an exception is raised.

Alternatives

thresholdthresholdThresholdThresholdThresholdthreshold

See also

zero_crossing_sub_pixzero_crossing_sub_pixZeroCrossingSubPixZeroCrossingSubPixZeroCrossingSubPixzero_crossing_sub_pix

Module

2D Metrology