Struct cv::objdetect::CascadeClassifier[][src]

pub struct CascadeClassifier { /* fields omitted */ }

Cascade classifier class for object detection.

Implementations

impl CascadeClassifier[src]

pub fn new() -> CascadeClassifier[src]

Creates a cascade classifier, uninitialized. Before use, call load.

pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, Error>[src]

Creates a cascade classifier using the model specified.

pub fn load<P: AsRef<Path>>(&self, path: P) -> Result<(), Error>[src]

Loads the classifier model from a path.

pub fn detect_multiscale(&self, mat: &Mat) -> Vec<Rect>[src]

The default detection uses scale factor 1.1, minNeighbors 3, no min size or max size.

pub fn detect_with_params(
    &self,
    mat: &Mat,
    scale_factor: f32,
    min_neighbors: c_int,
    min_size: Size2i,
    max_size: Size2i
) -> Vec<Rect>
[src]

Detects the object using parameters specified.

  • mat - Matrix of the type CV_8U containing an image where objects are detected.
  • scale_factor - Parameter specifying how much the image size is reduced at each image scale.
  • min_neighbors - Parameter specifying how many neighbors each candidate rectangle should have to retain it.
  • min_size - Minimum possible object size. Objects smaller than that are ignored.
  • max_size - Maximum possible object size. Objects larger than that are ignored

OpenCV has a parameter (flags) that’s not used at all.

Trait Implementations

impl Debug for CascadeClassifier[src]

impl Drop for CascadeClassifier[src]

impl ObjectDetect for CascadeClassifier[src]

impl Send for CascadeClassifier[src]

We can safely send the classifier (a mutable pointer) to a different thread

Auto Trait Implementations

impl RefUnwindSafe for CascadeClassifier

impl !Sync for CascadeClassifier

impl Unpin for CascadeClassifier

impl UnwindSafe for CascadeClassifier

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.