bin_thresholdbin_thresholdBinThresholdBinThresholdbin_threshold (算子名称)
名称
bin_thresholdbin_thresholdBinThresholdBinThresholdbin_threshold — Segment an image using an automatically determined
threshold.
警告
bin_thresholdbin_thresholdBinThresholdBinThresholdBinThresholdbin_threshold is obsolete and is only provided for
reasons of backward compatibility. New applications should use
该算子 binary_thresholdbinary_thresholdBinaryThresholdBinaryThresholdBinaryThresholdbinary_threshold instead.
参数签名
Herror bin_threshold(const Hobject Image, Hobject* 区域)
Herror T_bin_threshold(const Hobject Image, Hobject* 区域)
def bin_threshold(image: HObject) -> HObject
描述
bin_thresholdbin_thresholdBinThresholdBinThresholdBinThresholdbin_threshold segments a single-channel gray value image
using an automatically determined threshold. First, the relative
histogram of the gray values is determined. Then, relevant minima
are extracted from the histogram, which are used as parameters for a
thresholding operation. In order to reduce the number of minima,
the histogram is smoothed with a Gaussian, as in
auto_thresholdauto_thresholdAutoThresholdAutoThresholdAutoThresholdauto_threshold. The mask size is enlarged until there
is only one minimum in the smoothed histogram. The selected region
contains the pixels with gray values from 0 to the minimum or for real images
from the smallest value to the respective minimum. This
operator is, for example useful for the segmentation of dark
characters on a light paper.
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 在元组级别自动并行化。
- Automatically parallelized on internal data level.
参数表
ImageImageImageImageimageimage (input_object) singlechannelimage(-array) → objectHImageHObjectHImageHobject (byte / uint2 / real)
Input image.
区域区域区域区域区域区域 (output_object) region(-array) → objectHRegionHObjectHRegionHobject *
Dark regions of the image.
例程 (HDevelop)
read_image (Image, 'letters')
bin_threshold (Image, Seg)
connection (Seg, Connected)
例程 (C)
read_image(&Image,"letters");
bin_threshold(Image,&Seg);
connection(Seg,&Connected);
set_shape(WindowHandle,"rectangle1");
set_colored(WindowHandle,6);
disp_region(Connected,WindowHandle);
例程 (HDevelop)
read_image (Image, 'letters')
bin_threshold (Image, Seg)
connection (Seg, Connected)
例程 (HDevelop)
read_image (Image, 'letters')
bin_threshold (Image, Seg)
connection (Seg, Connected)
例程 (HDevelop)
read_image (Image, 'letters')
bin_threshold (Image, Seg)
connection (Seg, Connected)
模块
Foundation