threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixthreshold_sub_pix (算子)
名称
threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixthreshold_sub_pix — 以亚像素精度从图像中提取级交叉点。
签名
def threshold_sub_pix(image: HObject, threshold: Union[float, int]) -> HObject
描述
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.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
ImageImageImageImageimageimage (输入对象) singlechannelimage → objectHImageHObjectHImageHobject (byte / int1 / int2 / uint2 / int4 / real)
输入图像。
BorderBorderBorderBorderborderborder (输出对象) xld_cont-array → objectHXLDContHObjectHXLDContHobject *
Extracted level crossings.
ThresholdThresholdThresholdThresholdthresholdthreshold (输入控制) number → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Threshold for the level crossings.
默认值:
128
建议值:
0.0, 10.0, 30.0, 64.0, 128.0, 200.0, 220.0, 255.0
示例(HDevelop)
read_image(Image,'fabrik')
threshold_sub_pix(Image,Border,35)
dev_display(Border)
示例(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);
示例(HDevelop)
read_image(Image,'fabrik')
threshold_sub_pix(Image,Border,35)
dev_display(Border)
示例(HDevelop)
read_image(Image,'fabrik')
threshold_sub_pix(Image,Border,35)
dev_display(Border)
示例(HDevelop)
read_image(Image,'fabrik')
threshold_sub_pix(Image,Border,35)
dev_display(Border)
结果
threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixThresholdSubPixthreshold_sub_pix usually returns the value 2 (
H_MSG_TRUE)
。如有必要,则抛出异常。
替代
thresholdthresholdThresholdThresholdThresholdthreshold
另见
zero_crossing_sub_pixzero_crossing_sub_pixZeroCrossingSubPixZeroCrossingSubPixZeroCrossingSubPixzero_crossing_sub_pix
模块
二维计量