6.13.2.3   Threshold Operation

The image from which the histogram was computed is segmented with a threshold operation using the selected minimum and maximum gray value.

With the three combo boxes Color, Draw, and Line Width in the Input and Output section of the window you can specify how the segmentation results are displayed (see also Colored, Draw, and Line Width).

If you want to select threshold parameters for a single image, display the image in the active graphics window and open the histogram tool. For optimum visualization of the segmentation results, set the visualization color to a color different from black or white. Set Operation to Threshold and interactively drag the two vertical bars until you achieve the desired segmentation result. The parameters of the threshold operation can now be read off the two vertical lines.

There are two possibilities to select threshold parameters displaying the segmentation for an original image, derived from another image.

You can either display the derived image, open the histogram tool, deselect Input Window, display the original image, and then select the appropriate thresholds. This way, only one window is needed for the visualization.

Or, you can display the derived image in one graphics window and the original image in another. Activate the first graphics window image, and make sure Input Window is checked so that the corresponding gray value histogram is calculated. Afterwards, Input Window can be turned off to prevent the histogram from being updated. In the gray histogram window set Output Window to the window ID of the second graphics window and select your thresholds.

Multiple Threshold Operations
If multiple operations are visualized at the same time, the display depends on the combo box below the table of operations:
If none is selected, the results of the different threshold operations are displayed independently.
If union is selected, the results are combined to a single region.
If intersection is selected, only the common pixels from all results are visualized.

Connected Regions

Clicking Connection displays the connected regions of the selected gray values in the style specified with Color, Draw, and Line Width.

This display mode is similar to a plain threshold operation. Additionally, it performs a connection operation. The separate regions can only be distinguished if Color is set to colored 3, colored 6, or colored 12.

Click the button Insert Code to generate HDevelop code that performs the currently visualized threshold operation(s) in your program. The code is inserted at the IC.

The resulting regions of the threshold (and connection) operation can be used as input to the feature histogram window or the feature inspection window if the gray histogram window is kept open. These windows are described in the next sections.