[−][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.
Methods
impl SimpleBlobDetector
[src]
pub fn as_raw_SimpleBlobDetector(&self) -> *mut c_void
[src]
pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self
[src]
impl SimpleBlobDetector
[src]
pub fn create(
parameters: SimpleBlobDetector_Params
) -> Result<PtrOfSimpleBlobDetector>
[src]
parameters: SimpleBlobDetector_Params
) -> Result<PtrOfSimpleBlobDetector>
C++ default parameters
- parameters: SimpleBlobDetector::Params()
pub fn get_default_name(&self) -> Result<String>
[src]
Trait Implementations
impl AlgorithmTrait for SimpleBlobDetector
[src]
fn as_raw_Algorithm(&self) -> *mut c_void
[src]
fn clear(&mut self) -> Result<()>
[src]
fn write(&self, fs: &mut FileStorage) -> Result<()>
[src]
fn write_1(&self, fs: &PtrOfFileStorage, name: &str) -> Result<()>
[src]
fn read(&mut self, _fn: &FileNode) -> Result<()>
[src]
fn empty(&self) -> Result<bool>
[src]
fn save(&self, filename: &str) -> Result<()>
[src]
fn get_default_name(&self) -> Result<String>
[src]
impl Feature2DTrait for SimpleBlobDetector
[src]
fn as_raw_Feature2D(&self) -> *mut c_void
[src]
fn detect(
&mut self,
image: &dyn ToInputArray,
keypoints: &mut VectorOfKeyPoint,
mask: &dyn ToInputArray
) -> Result<()>
[src]
&mut self,
image: &dyn ToInputArray,
keypoints: &mut VectorOfKeyPoint,
mask: &dyn ToInputArray
) -> Result<()>
fn detect_multiple(
&mut self,
images: &dyn ToInputArray,
keypoints: &mut VectorOfVectorOfKeyPoint,
masks: &dyn ToInputArray
) -> Result<()>
[src]
&mut self,
images: &dyn ToInputArray,
keypoints: &mut VectorOfVectorOfKeyPoint,
masks: &dyn ToInputArray
) -> Result<()>
fn compute(
&mut self,
image: &dyn ToInputArray,
keypoints: &mut VectorOfKeyPoint,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
[src]
&mut self,
image: &dyn ToInputArray,
keypoints: &mut VectorOfKeyPoint,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
fn compute_multiple(
&mut self,
images: &dyn ToInputArray,
keypoints: &mut VectorOfVectorOfKeyPoint,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
[src]
&mut self,
images: &dyn ToInputArray,
keypoints: &mut VectorOfVectorOfKeyPoint,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
fn detect_and_compute(
&mut self,
image: &dyn ToInputArray,
mask: &dyn ToInputArray,
keypoints: &mut VectorOfKeyPoint,
descriptors: &mut dyn ToOutputArray,
use_provided_keypoints: bool
) -> Result<()>
[src]
&mut self,
image: &dyn ToInputArray,
mask: &dyn ToInputArray,
keypoints: &mut VectorOfKeyPoint,
descriptors: &mut dyn ToOutputArray,
use_provided_keypoints: bool
) -> Result<()>
fn descriptor_size(&self) -> Result<i32>
[src]
fn descriptor_type(&self) -> Result<i32>
[src]
fn default_norm(&self) -> Result<i32>
[src]
fn write(&self, file_name: &str) -> Result<()>
[src]
fn read(&mut self, file_name: &str) -> Result<()>
[src]
fn write_1(&self, unnamed_arg: &mut FileStorage) -> Result<()>
[src]
fn read_1(&mut self, unnamed_arg: &FileNode) -> Result<()>
[src]
fn empty(&self) -> Result<bool>
[src]
fn get_default_name(&self) -> Result<String>
[src]
fn write_2(&self, fs: &PtrOfFileStorage, name: &str) -> Result<()>
[src]
impl Send for SimpleBlobDetector
[src]
impl Drop for SimpleBlobDetector
[src]
Auto Trait Implementations
impl !Sync for SimpleBlobDetector
impl Unpin for SimpleBlobDetector
impl UnwindSafe for SimpleBlobDetector
impl RefUnwindSafe for SimpleBlobDetector
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,