Smart Segmentation Dialog Box
Smart Segmentation allows Image-Pro to automatically detect objects of interest in an image based on reference objects that you define.
Object segmentation is done by providing reference objects of interest to Image-Pro and by adjusting the "recipe" of image analysis options that control how Image-Pro will find similar objects in the image. Typical uses for this feature include:
The typical steps for segmenting images are as follows:
- Use the Draw tools in the Select and Count area to mark representative objects for the various classes of objects in the image, as follows:
Select a drawing tool from Select Objects and mark reference objects in the image. A reference object can be any object that is representative of the class of objects you want to find.
Mark each reference object by drawing an outline around it or on it.
Tip: The Brush Tool allows you to easily make freehand area selections. After selecting the Brush Tool, hold down the CTRL key and use your mouse scroll wheel to change the diameter of the brush. Set the diameter to a size that allows you to easily mark objects whilst avoiding areas of background. Hold down the left mouse button to add the area beneath the brush to an area.
If there is more than one class of objects you want to find, add a new class name to the Class list box. Click on the Add New Class button and edit the default class name with a more meaningful name.
The new class appears in the Class list box, and the color selection for Select Objects is automatically changed to a different color.Mark reference objects of the second class in the image, as described in steps (a) and (b) above.
Repeat steps (c) and (d) for each object class you want to segment in the image.
- Mark representative portions of the background in the image, as follows:
Next to Background in the Smart Segmentation dialog box, select a drawing tool to mark the image background.
Mark the background by drawing an outline on representative background portions of the image. If you wish to measure the background as a class, select the Include As Class check-box. You can edit the name of the background class if you wish.
-
Set your recipe options in the Recipe Options area of the Smart Segmentation dialog box.
By activating and deactivating recipe channels, you can experiment with combinations of object properties to refine the segmentation results. For more information, see Recipe Options below. -
Click on Show to display a mask over the image showing the objects included in all classes given the current set of recipe options and reference object selections.
-
Adjust your reference object selections and recipe options until the segmentation results are correct. As you make these adjustments, the mask automatically updates.
-
Click Count.
Recipe Options
Channels
There are three standard "channel groups" that you can adjust for the purposes of refining your smart segmentation results: the Color, Background, and Morphological Filter groups. There is an additional option to define custom channels. The different channels and customization options are described below:
Color: The Color channels use the color and grayscale characteristics of the reference objects to uniquely identify other objects of interest. If your objects of interest have any uniquely identifying colors or intensities, consider using options from this channel. Open the drop-down menu and select the color channels that you want Image-Pro to use.
Put a checkmark next to each color channel that is useful for distinguishing objects of interest from the background. Select "Gray" to have Image-Pro use the luminance channel.
Backg: The Background channels use Image-Pro’s background subtraction and correction features to help isolate objects of interest in the image from the background. If the background in your images is relatively distinct from the objects, consider using these options. Select the background correction/subtraction options you want to use from the Backg drop-down menu:
- Dark Background: Use this option if the image is evenly illuminated and the luminance channel intensities of the objects are always greater than those of the background.
- Bright Background: Use this option if the image is evenly illuminated and the luminance channel intensities of the objects are always less than those of the background.
- Bright Objects: Use this option if the image is unevenly illuminated and the luminance channel intensities of the objects are always greater than those of the background in their own pixel neighborhoods.
- Dark Objects: Use this option if the image is unevenly illuminated and the luminance channel intensities of the objects are always less than those of the background in their own pixel neighborhoods.
Morpho: The Morphological Filters channels allow you to use various sharpening, edge detection, and other filtering techniques to make your objects stand out more distinctly against the background. Consider using one or more of the following filters:
- Low Pass: Softens an image by eliminating high-frequency information. It is useful for removing noise.
- Edge: Sharpens an image, making edges of objects more distinct.
- Erode: Erodes the edges of bright objects and enlarges the edges of dark objects.
- Dilate: Enlarges the edges of bright objects and erodes the edges of dark objects.
- Max: Creates a 'max' image from the original, calculated as the difference between the eroded image and the original.
- Min: Creates a 'min' image from the original, calculated as the difference between the dilated image and the original.
- Range: Creates an image that is the difference between the eroded image and the dilated image.
- Low Pass Erode: Combines the noise reduction of the Low Pass filter with the edge enhancement of the Erode filter.
The size of the filter for Morpho and Backg channels is defined by the Size spin box and should correspond to the approximate area of the objects of interest in pixels.
Custom: The Custom tool allows you to create custom morphological channels. These channels can be created from a list of convolution and morphological filters, background operations, arithmetical operations, and histogram stats. You can customize every channel with specific parameters. With the Morpho and Backg channels, all filters use the same size according to whatever is specified in the Size spin box. Also, all filters operate on the luminance channel (Gray) and only one pass of the filter is applied. When you create a custom morphological channel, you can be specific about the dimensions of the kernel size (height and width), and you can be specific about what channel it should be applied to, the number of passes and other parameters.
To add a custom channel, click on the Custom tool and select Add New Channel. The Custom Recipe Channel dialog box is displayed:
- Channel Type: Select the filter you want to use for your custom channel.
- Input: Select the color channel you want to the filter applied to. Select "Gray" to apply it to the luminance channel.
- Caption: Type the name you want to use to label this custom channel.
- Parameters specific for each channel, such as Width, Height, Passes for filters, Operation and Value for Operations, Stats for Histogram stats...
Using Custom channels, you can implement image processing steps the same way as they could be defined in macros, adding channels one by one and connecting outputs to inputs, you can set Input of the as next channel to the output of the previous channel.
Options
Auto Weight: When Auto Weight is on, Image-Pro 'weighs' channels based on their significance as calculated from the reference objects. When the option is off, all channels are given the same weight. Switch this option off if your objects of interest must be segmented using a discontinuous range.
Top: When the Top option is off (default), all channels enabled through the Color tool (described above) are included into the segmentation process. You can limit the number of channels, however, by activating the Top option and selecting the number of most significant channels from the top of the list. For example, if "3" is selected, Image-Pro uses only the top three channels.
Accumulated: This control is only relevant if you have identified more than one reference object for a given class. It tells Image-Pro how you want multiple reference objects in one class treated. When the option is on, the recipe is created based on the accumulated value (mean, deviation) calculated from all reference objects selected for the given class. When off, every reference object is used as a segmentation target for that class. Switch it off if to create segmentation where a single class can include a discontinued range of measurements, for example when the background is gray and the object can be either bright or dark (the default is off).
All: Click this button to select all segmentation channels.
Reset: Resets image recipe and removes all reference objects from the image.
Clear: Removes accumulated reference objects loaded from recipe or applied from global. Reference objects on the current image will stay.
Filter: Filter out insignificant channels. Tip: Use this button when learning stage is finished. The channels with zero weight or outside the top list will be excluded from the recipe to speed up processing and reduce memory consumption.
Record: Records current recipe to macro script. This button is enabled only during macro recording and can be used to save all recipe parameters to a macro, so they can optionally be modified manually or programmatically.
Recipe Summary
The pane shows the summary of the recipe including the number of reference objects and segmentation classes and the list of active segmentation channels. Each segmentation channel displayed its “Weight” the channels are sorted by weight, the channel with most significant weight is shown at the top.
Train and Save
Global: You can set the active recipe to Global using the Set Global button. The global recipe can be applied to the active image using Apply Global button. The Global recipe can be used for segmenting similar images using the same recipe.
Saving Smart Segmentation Recipes
Smart Segmentation recipes 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 Smart Segmentation recipe. Measurement options can be restored as part of a Macro, allowing you to apply your measurements options to multiple datasets when Batch Processing.