The MV Blob Counter filter counts all blobs (objects or contours) within an image. The filter contains two filters for blobs. One filter excludes all blobs outside a minimum and maximum size. The second filter excludes all blobs whose seven "hu invariants" are outside a minimum and maximum value. Hu invariants are proved to be invariants to the image scale, rotation, and reflection except the seventh one, whose sign is changed by reflection. Use the invariants to detect objects within a video stream.
New interfaces (IMVBlobCounter2 and IMVBlobCounter3) extend the filter to provide detailed information about the recognized blobs, including size, position, angle, bounding rectangle and average blob color.
This MontiVision DirectShow Filter is used in combination with the MontiVision Smart Control in the BlobCounter and FindObject Sample Applications.
| File: | blobcounter.ax |
| CLSID: | CLSID_MVBlobCounter |
Supported Interfaces
Supported COM Events
The filter supports following events through the IMVFilterEvents interface. Look at the filter events page for more information.
| Event |
Value |
Description |
| MV_ALGORITHM_START_EVENT |
0 |
A filter starts processing a video frame or sample. |
| MV_ALGORITHM_END_EVENT |
1 |
A filter finishes processing a video frame or sample. |
Supported I/O Pins
| I/O Pin | Corresponding method | Discription |
| Count [int 32] |
IMVBlobCounter::get_BlobCount | Blob count from the current image. |
|
Threshold |
IMVBlobPreProcessing::put_SegmentationThreshold | Segmentation threshold. |
MV Blob Counter Property Pages
Uses the IMVBlobCounter configuration interface.

Blob counter filter property page
| External | Use only external contours. All contours (blobs) within an other blob are ignored. |
| List | All blobs are arranged in on list. |
| Two level | The blobs are arranged into a two level list. All external blobs are in the first level. All other blobs are in the second level. The filter counts all first level blobs. |
| Tree | Same as Two level option, but internal all blobs are arranged in a tree. |
| Draw Contour | Draw blob contour into the output image. |
| use convex hull | Use the convex hull. |
| use approximate contour | Use an approximation algorithm to reduce the contour complexity. |
| accurency | Accuracy value for the approximation algorithm. |
| Draw | Draw count result into the output image. |
| x | X-position for the output text. |
| y | Y-position for the output text |
| Evaluate blob contour properties | Enables the calculation of the blob contour properties provided by the IMVBlobFinder2 interface. |
| Calculate Average Color | Calculates the average color value for every blob. |
| Redraw Blobs | Redraws the blobs using their average color. |
| enable contour filter | Enable the contour filter |
| contour size | Enable size contour filter |
| width | Minimum and maximum value for the contour width. |
| height | Minimum and maximum value for the contour height. |
| hu invariants | Enable hu invariants contour filter. |
| hu 1 to hu 7 | Minimum and maximum value for the seven hu invariants. |
| Segmentation Threshold | Threashold value for image segmentation. |
| Draw Segmentation | The output image cotains the result after segmentation and edge detection. |
| Edge Detection | Select the algorithm for edge detection. |
| Blob Type | Find dark or bright blobs. |