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

threshold_sub_pixthreshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPix (Operator)

Name

threshold_sub_pixthreshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPix — 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)

Herror threshold_sub_pix(Hobject Image, Hobject* Border, const HTuple& Threshold)

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

void HOperatorSetX.ThresholdSubPix(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*Border, [in] VARIANT Threshold)

IHXLDContX* HImageX.ThresholdSubPix([in] VARIANT Threshold)

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

HXLDCont HImage.ThresholdSubPix(HTuple threshold)

HXLDCont HImage.ThresholdSubPix(double threshold)

Description

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

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 ThresholdThresholdThresholdThresholdthreshold, only the border of such areas is returned as level crossings.

Parallelization

Parameters

ImageImageImageImageimage (input_object)  singlechannelimage objectHImageHImageHImageXHobject (byte / int1 / int2 / uint2 / int4 / real)

Input image.

BorderBorderBorderBorderborder (output_object)  xld_cont-array objectHXLDContHXLDContArrayHXLDContXHobject *

Extracted level crossings.

ThresholdThresholdThresholdThresholdthreshold (input_control)  number HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (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)
disp_xld(Border,WindowHandle)

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 (C++)

/* Detection zero crossings of the Laplacian-of-Gaussian of aerial image */
HWindow Window(0,0,512,512);
HImage Image("fabrik");
HXLDContArray Border = Image.ThresholdSubPix(35);
Border.Display(Window);

Example (HDevelop)

read_image(Image,'fabrik')
threshold_sub_pix(Image,Border,35)
disp_xld(Border,WindowHandle)

Example (HDevelop)

read_image(Image,'fabrik')
threshold_sub_pix(Image,Border,35)
disp_xld(Border,WindowHandle)

Result

threshold_sub_pixthreshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPix usually returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Alternatives

thresholdthresholdthresholdThresholdThreshold

See also

zero_crossing_sub_pixzero_crossing_sub_pixzero_crossing_sub_pixZeroCrossingSubPixZeroCrossingSubPix

Module

2D Metrology


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