![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/Vision/BlobDetector.h>
Detects locally connected regions ("blobs") in grayscale or RGB images. More...
Detects locally connected regions ("blobs") in grayscale or RGB images.
The detector sweeps a range of intensity thresholds on a grayscale version of the input image. At each threshold it binarizes the image, extracts connected components, and applies optional geometric and color filters. Components that appear at similar locations across multiple consecutive thresholds are merged; only blobs observed at least minRepeatability times are returned. Stable detections are reported as sub-pixel centers with an estimated diameter and the contour from the strongest observation.
This implementation follows the multi-threshold blob detection approach used in OpenCV's SimpleBlobDetector, including inertia- and convexity-based filtering.
Classes | |
| struct | Params |
| Configuration parameters for BlobDetector. More... | |
| struct | Blob |
| Result of blob detection for a single stable region. More... | |
Public Member Functions | |
| BlobDetector (const BlobDetector::Params ¶meters=BlobDetector::Params()) | |
| Construct a blob detector with the given parameters. | |
| void | detect (const TypedImage< unsigned char > *image, std::vector< Blob > &keypoints) const |
| Detect blobs in image and append results to keypoints. | |
Protected Member Functions | |
| void | findBlobs (TypedImage< unsigned char > *image, TypedImage< unsigned char > *binaryImage, std::vector< Blob > ¢ers) const |
| Extract blob candidates from a single binarized image at the current threshold. | |
| void ImFusion::BlobDetector::detect | ( | const TypedImage< unsigned char > * | image, |
| std::vector< Blob > & | keypoints ) const |
Detect blobs in image and append results to keypoints.
image may be single-channel grayscale or three-channel RGB; RGB input is converted to grayscale internally. On success, keypoints is cleared and filled with stable blobs that satisfy the configured filters and repeatability criteria.
| image | Input image. Must not be null. |
| keypoints | Output vector receiving detected blobs. |