Class for extracting blobs from an image.
The class implements a simple algorithm for extracting blobs from an
image:
- Convert the source image to binary images by applying thresholding
with several thresholds from
MinThreshold
(inclusive) to
MaxThreshold
(exclusive) with distance ThresholdStep
between
neighboring thresholds.
- Extract connected components from every binary image by
cv.findContours and calculate their centers.
- Group centers from several binary images by their coordinates. Close
centers form one group that corresponds to one blob, which is
controlled by the
MinDistBetweenBlobs
parameter.
- From the groups, estimate final centers of blobs and their radiuses
and return as locations and sizes of keypoints.
This class performs several filtrations of returned blobs. You should
set FilterBy*
to true/false to turn on/off corresponding filtration.
Available filtrations:
- By color. This filter compares the intensity of a binary image at
the center of a blob to
BlobColor
. If they differ, the blob is
filtered out. Use BlobColor = 0
to extract dark blobs and
BlobColor = 255
to extract light blobs.
- By area. Extracted blobs have an area between
MinArea
(inclusive)
and MaxArea
(exclusive).
- By circularity. Extracted blobs have circularity
(
(4*pi*area)/(perimeter*perimeter)
) between MinCircularity
(inclusive) and MaxCircularity
(exclusive).
- By ratio of the minimum inertia to maximum inertia. Extracted
blobs have this ratio between
MinInertiaRatio
(inclusive) and
MaxInertiaRatio
(exclusive).
- By convexity. Extracted blobs have convexity
(area / area of blob convex hull) between
MinConvexity
(inclusive)
and MaxConvexity
(exclusive).
Default values of parameters are tuned to extract dark circular blobs.
|
addlistener |
Add listener for event. |
|
clear |
Clears the algorithm state |
|
delete |
Destructor |
|
detect |
Detects keypoints in an image or image set. |
|
empty |
Checks if detector object is empty. |
|
eq |
== (EQ) Test handle equality. |
|
findobj |
Find objects matching specified conditions. |
|
findprop |
Find property of MATLAB handle object. |
|
ge |
>= (GE) Greater than or equal relation for handles. |
|
getDefaultName |
Returns the algorithm string identifier |
|
gt |
> (GT) Greater than relation for handles. |
Sealed
|
isvalid |
Test handle validity. |
|
le |
<= (LE) Less than or equal relation for handles. |
|
load |
Loads algorithm from a file or a string |
|
lt |
< (LT) Less than relation for handles. |
|
ne |
~= (NE) Not equal relation for handles. |
|
notify |
Notify listeners of event. |
|
save |
Saves the algorithm parameters to a file |
|
typeid |
Name of the C++ type (RTTI) |