Threshold Tool
The Threshold Tool allows you to identify objects by defining a range of intensity values they share that distinguishes them from the background and noise. Using this method, you define the target range of intensities for each color channel (or you can define a single target range for the luminance channel), and Image-Pro selects and highlights all pixels matching that criteria. This tool is especially important for the Count/Size and Motion Tracking tools. These tools use the threshold segmentation results to identify unique clusters of highlighted pixels that can then be classified as found objects, and then outlined and counted.
The Threshold Tool panel displays a histogram of the pixel intensities in the active image.
Everything between the threshold min and max values appear in the threshold color (which is the current class color, you can change this from the threshold tool color picker). All pixels in the image that have values within this range appear in the class color.
Note: You can define more than one range to identify more than one class of objects. Additional range definitions will appear as shaded areas in different colors in the histogram.
To manually adjust the threshold range, position the mouse over either the minimum or maximum value of the range (the cursor is displayed as a double headed white arrow when positioned correctly). Click and drag the threshold marker to adjust the value. To move the threshold area as a block, position the mouse between the minimum and maximum values (the cursor is displayed as a black double headed arrow), then click and drag the entire range up or down the scale. As the threshold range is adjusted, the threshold overlay is automatically updated in the active image.
Image-Pro allows you to set up multiple ranges of intensities to identify different classes of objects in your image. This is done with the Class tools which are found above the histogram. The Class list box allows you to select any class that has already been defined. You can change the class name by editing it directly in the Class list box, you can change the class’s color and display settings, and you can delete a selected class.
The Add New Segmentation Class [+] button allows you to add a new class to the Class list box. When you click on the [+] button, a new undefined class is added to the Class list box. Simply define the correct start and end values for that class to define it.
The Delete Current Class[X] button deletes the currently selected class from the Class list box.
The Show button turns the color overlay in the active image on or off. Click on the arrow on the right-hand side of the Show button to display the following submenu:
Show All Classes: With option selected Image-Pro will show the color overlays for all the defined classes. If this option is not selected, only the currently selected class's overlay will be shown.
Allow Overlap: Select this option to allow classes to share intensity ranges. If this option is not selected, additional classes will not be allowed to use intensity values that are included in other classes.
Click the color button to the left of the Show tool set the display options for the currently selected class. A sub-menu opens from which you can set the display options of the segmented objects for the selected class (these options will be applied after the Count operation is executed):
Choose between the Class and Random radio buttons to assign colors to your class objects.
You can change the color assigned to a class from the color picker.
Filled: Select this check box to display class objects filled, leave it unchecked to only display the outlines of class objects. With filled selected you can set the opacity of the fill to values from 0 to 100% in 10% increments from the drop-down menu.
Border: Select this check box to display the border of objects at 100% opacity and with the Shape Options applied.
Line Width: Set the width lines in pixels.
Line Style: Choose from a selection of dashed, dotted, and solid line styles.
Point Shape: Select the style to be applied to points (this option is only relevant if your measurement options create points).
End Points: Choose from a selection of line end point options, including arrows, dots, and crossbars in various sizes (this option is only relevant if your measurement options create lines).
Mask: The Mask tool creates a binary image that represents the current threshold mask. All pixels within the current threshold range are represented as black in the mask image, and all pixels outside of the current threshold range are represented as white.
Log Y: Toggles the Y axis between expressing the 'Number of Pixels' scale in terms of integers or logarithms of integers. The latter provides a 'stretching' effect.
Reset: Resets all values of the Threshold tool to their defaults.
Set Global: This tool allows you to set the global threshold segmentation definition to the configuration and settings as they currently appear in the Threshold dialog box. The global threshold segmentation definition exists in the application memory and can be instantly applied to other images by using the Apply Global tool (described below).
Apply Global: This tool allows you to apply the threshold segmentation definition settings that are currently stored as the global threshold segmentation to the currently active image. This provides an easy way to transferring the threshold segmentation definition settings defined for one image to another image. Note that the global threshold segmentation definition is stored per session only; the information is lost when Image-Pro is shut down. If you want to be able to recall threshold segmentation definitions across session, use the Save Threshold Segmentation tool (described below).
Auto Threshold Bright: If this button is selected, the threshold range is configured to find bright objects. The low end of the range can be changed manually, but the high end is fixed at the Range Max of the current image type (255 for 8-bit image). To adjust the low end of the range, position the mouse over the left side of the threshold range (the cursor appears as a double headed white arrow when positioned correctly), then click and drag it to the desired location. As the threshold range is adjusted, the threshold overlay is automatically updated in the active image.
Auto Threshold Dark: If this button is selected, the threshold range is configured to find dark objects. The high end of the range can be changed manually, but the low end is fixed at 0. To adjust the high end of the range, position the mouse over the right side of the threshold range (the cursor appears as a double headed white arrow when positioned correctly), then click and drag it to the desired location. As the threshold range is adjusted, the threshold overlay is automatically updated in the active image.
When Auto Bright or Auto Dark modes are selected, an additional Bias control is displayed that controls automatic threshold bias (see Bias Control of Segmentation options).
Range Picker: Use this tool to automatically generate a threshold range based on pixels clicked on in the active image. To use this tool:
- Click the Reset button to clear the current Threshold range.
- Click on the arrow to the right of the Range Picker tool and select the size of the pixel neighborhood you want to use (for example 3x3 or 7x7). This determines whether, when you click on the image, you sample a single pixel or a whole neighborhood of pixels.
- Position the cursor (which now looks like an eyedropper) over the pixels in the image that you want to use as your sample.
- Repeat the previous step for as many samples as you need to extend the range to achieve the desired results.
Mode: This control allows you to select how the image should be interpreted for thresholding:
- Mono: Select this option to create a threshold based on a grayscale interpretation of the image.
- HSI: Select this option to interpret the image using the HSI (Hue/Saturation/Intensity) color model. This allows you to create a threshold based on just the Hue, Saturation, or Intensity channels of the image.
- HSL: Select this option to interpret the image using the HSL (Hue/Saturation/Lightness) color model. This allows you to create a threshold based on just the Hue, Saturation, or Lightness channels of the image.
- RGB: Select this option to interpret the image using the RGB (Red/Green/Blue) color model. This allows you to create a threshold based on just the Red, Green, or Blue channels of the image.
Start: This spin box displays and allows you to edit the low value of the threshold range.
End: This spin box displays and allows you to edit the high value of the threshold range.
Threshold tool settings can be saved and loaded as measurement options files in the Measurements tool group on the Count/Size ribbon. When saving measurements options, all your current settings including measurement types, splitting and ranges options are saved along with your Threshold settings. Measurement options can be restored as part of a Macro, allowing you to apply your measurements options to multiple datasets when Batch Processing.