Skip to content

Auto Thresholding vTool#

The Auto Thresholding vTool allows you to segment images with a binary gray value distribution.

The Auto Thresholding vTool segments the input image into a region that contains either light or dark pixels. As no further parameters have to be set, Auto Thresholding is a simple to use segmentation method.

The Auto Thresholding vTool accepts an image via the Image input pin and outputs a single region via the Region output pin.

Auto Thresholding vTool

How It Works#

Auto Thresholding works best on images with a binary gray value distribution that results in two prominent peaks in the histogram.

Below is a typical input image for Auto Thresholding:

Auto Thresholding Input image

The corresponding histogram looks like this:

Auto Thresholding Histogram

You can see the two distinct accumulations of pixels. An internal algorithm determines the optimum threshold for separating the dark from the light pixels. The threshold will be placed somewhere in the middle between the two peaks in the histogram. In this example, the threshold is at a gray value of 107.

To configure the vTool, you just have to select whether you want the dark or the light pixels in your output region.

The following image shows the output region after the thresholding operation:

Auto Thresholding Segmentation Result

Configuring the vTool#

To configure the Auto Thresholding vTool:

Auto Thresholding vTool Settings

  1. In the Recipe Management pane in the vTool Settings area, click Open Settings or double-click the vTool.
    The Auto Thresholding dialog opens.
  2. Select the desired polarity of the output region.

You can view the result of the thresholding in a pin data view. Here, you can select which outputs to display.

Inputs#

Image#

Accepts images directly from a Camera vTool or from a vTool that outputs images, e.g., the Image Format Converter vTool.

  • Data type: Image
  • Image format: 8-bit to 16-bit mono or color images. Color images are converted internally to mono images.

Outputs#

Region#

Returns a single region that includes all pixels of the polarity selected.

  • Data type: Region

Typical Predecessors#

Typical Successors#

Back to top