Struct opencv::features2d::SimpleBlobDetector[][src]

pub struct SimpleBlobDetector { /* fields omitted */ }
Expand description

Class for extracting blobs from an image. :

The class implements a simple algorithm for extracting blobs from an image:

  1. 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.
  2. Extract connected components from every binary image by findContours and calculate their centers.
  3. 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.
  4. 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 (inline formula) 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.

Implementations

C++ default parameters
  • parameters: SimpleBlobDetector::Params()

Trait Implementations

Clears the algorithm state

Reads algorithm parameters from a file storage

Stores algorithm parameters in a file storage

simplified API for language bindings Stores algorithm parameters in a file storage Read more

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs). Read more

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string. Read more

Wrap the specified raw pointer Read more

Return an the underlying raw pointer while consuming this wrapper. Read more

Return the underlying raw pointer. Read more

Return the underlying mutable raw pointer Read more

Executes the destructor for this type. Read more

Detects keypoints in an image (first variant) or image set (second variant). Read more

Detects keypoints in an image (first variant) or image set (second variant). Read more

Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant). Read more

Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant). Read more

Detects keypoints and computes the descriptors Read more

Return true if detector object is empty

C++ default parameters Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.