Skip to content

Absolute Thresholding vTool#

The Absolute Thresholding vTool allows you to segment images based on user-defined lower and upper thresholds.

The Absolute Thresholding vTool segments the input image into a region that contains only the pixels with gray values within the range specified by you. Use Absolute Thresholding on images where alternative thresholding methods like Auto Thresholding or Relative Thresholding don't lead to the desired results.

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

If you use the ROI Creator vTool to specify a region of interest before thresholding, the Absolute Thresholding vTool accepts the ROI data via its Roi input pin. In that case, thresholding is only performed on the region of interest which results in faster and more robust processing.

The Region output of the Absolute Thresholding vTool can also be used as Roi input for vTools with a Roi input pin. For more information, see the ROI Creator vTool topic.

Auto Thresholding vTool

How It Works#

Absolute Thresholding works best on images with a gray value distribution with clear gray value accumulations in the histogram, i.e., the gray values of the target object (the foreground pixels) are distinctly different from the gray values of the rest of the image (the background pixels).

Info

When configuring the vTool, specify the lower and upper threshold of the desired gray value range to include in the region. Check that the gray value distribution is constant and only shifts slightly left and right when applying the thresholds to a set of test images.

Below is a typical input image for Absolute Thresholding and the corresponding histogram:

Absolute Thresholding Input Image

Absolute Thresholding Histogram

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

Absolute Thresholding Segmentation Result

Configuring the vTool#

To configure the Absolute Thresholding vTool:

Absolute Thresholding vTool Settings

  1. In the Recipe Management pane in the vTool Settings area, click Open Settings or double-click the vTool.
    The Absolute Thresholding Basic dialog opens.
  2. Specify the lower and upper threshold of the desired gray value range.

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.

Roi#

Accepts a region of interest from the ROI Creator vTool or any other vTool that outputs regions or rectangles. Multiple rectangles or regions are merged internally to form a single region of interest.

  • Data type: RectangleF, RectangleF Array, Region, Region Array

Outputs#

Region#

Returns a single region that includes all pixels with gray values within the specified range.

  • Data type: Region

Typical Predecessors#

Typical Successors#