ClassesClasses | | Operators

bin_thresholdbin_thresholdBinThresholdBinThreshold (Operator)

Name

bin_thresholdbin_thresholdBinThresholdBinThreshold — Segment an image using an automatically determined threshold.

Warning

bin_thresholdbin_thresholdBinThresholdBinThresholdBinThreshold is obsolete and is only provided for reasons of backward compatibility. New applications should use the operator binary_thresholdbinary_thresholdBinaryThresholdBinaryThresholdBinaryThreshold instead.

Signature

bin_threshold(Image : Region : : )

Herror bin_threshold(const Hobject Image, Hobject* Region)

Herror T_bin_threshold(const Hobject Image, Hobject* Region)

void BinThreshold(const HObject& Image, HObject* Region)

HRegion HImage::BinThreshold() const

static void HOperatorSet.BinThreshold(HObject image, out HObject region)

HRegion HImage.BinThreshold()

Description

bin_thresholdbin_thresholdBinThresholdBinThresholdBinThreshold 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_thresholdAutoThresholdAutoThresholdAutoThreshold. 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.

Execution Information

Parameters

ImageImageImageImageimage (input_object)  singlechannelimage(-array) objectHImageHImageHobject (byte / uint2 / real)

Input image.

RegionRegionRegionRegionregion (output_object)  region(-array) objectHRegionHRegionHobject *

Dark regions of the image.

Example (HDevelop)

read_image (Image, 'letters')
bin_threshold (Image, Seg)
connection (Seg, Connected)

Example (C)

read_image(&Image,"letters");
bin_threshold(Image,&Seg);
connection(Seg,&Connected);
set_shape(WindowHandle,"rectangle1");
set_colored(WindowHandle,6);
disp_region(Connected,WindowHandle);

Example (HDevelop)

read_image (Image, 'letters')
bin_threshold (Image, Seg)
connection (Seg, Connected)

Example (HDevelop)

read_image (Image, 'letters')
bin_threshold (Image, Seg)
connection (Seg, Connected)

Example (HDevelop)

read_image (Image, 'letters')
bin_threshold (Image, Seg)
connection (Seg, Connected)

Module

Foundation


ClassesClasses | | Operators