[−][src]Struct opencv::features2d::SimpleBlobDetector
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.
Implementations
impl SimpleBlobDetector
[src]
pub fn as_raw_SimpleBlobDetector(&self) -> *const c_void
[src]
pub fn as_raw_mut_SimpleBlobDetector(&mut self) -> *mut c_void
[src]
impl SimpleBlobDetector
[src]
pub fn create(
parameters: SimpleBlobDetector_Params
) -> Result<Ptr<SimpleBlobDetector>>
[src]
parameters: SimpleBlobDetector_Params
) -> Result<Ptr<SimpleBlobDetector>>
C++ default parameters
- parameters: SimpleBlobDetector::Params()
Trait Implementations
impl AlgorithmTrait for SimpleBlobDetector
[src]
pub fn as_raw_Algorithm(&self) -> *const c_void
[src]
pub fn as_raw_mut_Algorithm(&mut self) -> *mut c_void
[src]
pub fn clear(&mut self) -> Result<()>
[src]
pub fn write(&self, fs: &mut FileStorage) -> Result<()>
[src]
pub fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
[src]
pub fn read(&mut self, fn_: &FileNode) -> Result<()>
[src]
pub fn empty(&self) -> Result<bool>
[src]
pub fn save(&self, filename: &str) -> Result<()>
[src]
pub fn get_default_name(&self) -> Result<String>
[src]
impl Boxed for SimpleBlobDetector
[src]
pub unsafe fn from_raw(ptr: *mut c_void) -> Self
[src]
pub fn into_raw(self) -> *mut c_void
[src]
pub fn as_raw(&self) -> *const c_void
[src]
pub fn as_raw_mut(&mut self) -> *mut c_void
[src]
impl Drop for SimpleBlobDetector
[src]
impl Feature2DTrait for SimpleBlobDetector
[src]
pub fn as_raw_Feature2D(&self) -> *const c_void
[src]
pub fn as_raw_mut_Feature2D(&mut self) -> *mut c_void
[src]
pub fn detect(
&mut self,
image: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
mask: &dyn ToInputArray
) -> Result<()>
[src]
&mut self,
image: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
mask: &dyn ToInputArray
) -> Result<()>
pub fn detect_multiple(
&mut self,
images: &dyn ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
masks: &dyn ToInputArray
) -> Result<()>
[src]
&mut self,
images: &dyn ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
masks: &dyn ToInputArray
) -> Result<()>
pub fn compute(
&mut self,
image: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
[src]
&mut self,
image: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
pub fn compute_multiple(
&mut self,
images: &dyn ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
[src]
&mut self,
images: &dyn ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
pub fn detect_and_compute(
&mut self,
image: &dyn ToInputArray,
mask: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut dyn ToOutputArray,
use_provided_keypoints: bool
) -> Result<()>
[src]
&mut self,
image: &dyn ToInputArray,
mask: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut dyn ToOutputArray,
use_provided_keypoints: bool
) -> Result<()>
pub fn descriptor_size(&self) -> Result<i32>
[src]
pub fn descriptor_type(&self) -> Result<i32>
[src]
pub fn default_norm(&self) -> Result<i32>
[src]
pub fn write(&self, file_name: &str) -> Result<()>
[src]
pub fn read(&mut self, file_name: &str) -> Result<()>
[src]
pub fn write_1(&self, unnamed: &mut FileStorage) -> Result<()>
[src]
pub fn read_1(&mut self, unnamed: &FileNode) -> Result<()>
[src]
pub fn empty(&self) -> Result<bool>
[src]
pub fn get_default_name(&self) -> Result<String>
[src]
pub fn write_2(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
[src]
impl Send for SimpleBlobDetector
[src]
impl SimpleBlobDetectorTrait for SimpleBlobDetector
[src]
pub fn as_raw_SimpleBlobDetector(&self) -> *const c_void
[src]
pub fn as_raw_mut_SimpleBlobDetector(&mut self) -> *mut c_void
[src]
pub fn get_default_name(&self) -> Result<String>
[src]
Auto Trait Implementations
impl RefUnwindSafe for SimpleBlobDetector
[src]
impl !Sync for SimpleBlobDetector
[src]
impl Unpin for SimpleBlobDetector
[src]
impl UnwindSafe for SimpleBlobDetector
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,