The BlobAnalysis step allows you to identify and count the number of connected regions of pixels within an image, then calculate selected features of those regions. The regions are commonly known as blobs. Blobs are areas of touching pixels that are in the same logical pixel state. This pixel state is called the foreground state, while the alternate state is called the background state.
In many applications, we are interested only in blobs whose features satisfy certain criteria. Since computation is time-consuming, blob analysis is often performed as an elimination process whereby only blobs of interest are considered in further analysis. The steps involved in feature extraction are:
Analyze an image and exclude or delete blobs that don't meet the determined criteria.
Analyze the remaining blobs with the BlobAnalysis step to extract further features and determine their criteria.
Repeat these steps, as necessary, until you have all the blob measurement results you need.
Reducing the raw data to just a few feature measurements generally produces more comprehensible and useful results.
The BlobAnalysis step has 2 major identification modes: individual analysis of blobs and analysis of groups of blobs.
When analyzing individual blobs, the most common operation is the counting of blobs based on a binarized image, an image which contains only black and white pixels. To do so, the BlobAnalysis step offers a thresholding option to separate objects in the foreground from the background.
The other major identification mode is the analysis of groups of blobs based on labeled images. By using labeled images, you are able to discriminate blobs with the same pixel value.
Filtering in the BlobAnalysis step is based on the concept of inclusion and exclusion. Blobs which satisfy a condition are then added to an inclusion or exclusion list. You can filter blobs based on features (for example, mean pixel value), on their status (whether they are currently in the inclusion or exclusion list) or which edge they are touching (for example, exclude blobs that are touching an edge of the region or image). Note that the filter units are in pixels unless the image is calibrated, then calibrated units are used.
To obtain the best possible results, a source image with good contrast and uniform illumination is recommended. This will make the calculation of features and filtering more accurate.
A binarized image (only black or white pixels) is sufficient to determine features such as the shape and size. However, in some application, you might be interested in features which require a gray image, such as the average value of the pixels. In this case, you can specify the source of the gray image as the source image (if it has not been binarized), a thresholded copy of the source image, or an image that you specify. Note that the position of a blob and its size are expressed in pixels unless the image is calibrated, then world coordinates and world units are used, respectively.
You are also able to use the calculation results from a previous BlobAnalysis step and use those results as the input of a subsequent step. For example, this allows you to filter blobs based on a certain criteria and calculate the features of the filtered blobs in a second BlobAnalysis step.