|
virtual CV_WRAP void | setParams (const SimpleBlobDetector::Params ¶ms)=0 |
|
virtual CV_WRAP SimpleBlobDetector::Params | getParams () const =0 |
|
virtual CV_WRAP String | getDefaultName () const CV_OVERRIDE |
|
virtual CV_WRAP const std::vector< std::vector< cv::Point > > & | getBlobContours () const |
|
virtual | ~Feature2D () |
|
virtual CV_WRAP void | detect (InputArray image, CV_OUT std::vector< KeyPoint > &keypoints, InputArray mask=noArray()) |
| Detects keypoints in an image (first variant) or image set (second variant). More...
|
|
virtual CV_WRAP void | detect (InputArrayOfArrays images, CV_OUT std::vector< std::vector< KeyPoint > > &keypoints, InputArrayOfArrays masks=noArray()) |
|
virtual CV_WRAP void | compute (InputArray image, CV_OUT CV_IN_OUT std::vector< KeyPoint > &keypoints, OutputArray descriptors) |
| Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant). More...
|
|
virtual CV_WRAP void | compute (InputArrayOfArrays images, CV_OUT CV_IN_OUT std::vector< std::vector< KeyPoint > > &keypoints, OutputArrayOfArrays descriptors) |
|
virtual CV_WRAP void | detectAndCompute (InputArray image, InputArray mask, CV_OUT std::vector< KeyPoint > &keypoints, OutputArray descriptors, bool useProvidedKeypoints=false) |
|
virtual CV_WRAP int | descriptorSize () const |
|
virtual CV_WRAP int | descriptorType () const |
|
virtual CV_WRAP int | defaultNorm () const |
|
CV_WRAP void | write (const String &fileName) const |
|
CV_WRAP void | read (const String &fileName) |
|
virtual void | write (FileStorage &) const CV_OVERRIDE |
| Stores algorithm parameters in a file storage. More...
|
|
virtual CV_WRAP void | read (const FileNode &) CV_OVERRIDE |
| Reads algorithm parameters from a file storage. More...
|
|
virtual CV_WRAP bool | empty () const CV_OVERRIDE |
| Return true if detector object is empty. More...
|
|
CV_WRAP void | write (FileStorage &fs, const String &name) const |
|
void | write (const Ptr< FileStorage > &fs, const String &name) const |
|
| Algorithm () |
|
virtual | ~Algorithm () |
|
virtual CV_WRAP void | clear () |
| Clears the algorithm state. More...
|
|
CV_WRAP void | write (FileStorage &fs, const String &name) const |
|
void | write (const Ptr< FileStorage > &fs, const String &name=String()) const |
|
virtual CV_WRAP void | save (const String &filename) const |
|
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 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 ( ) 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.