Struct cv::objdetect::CascadeClassifier [−][src]
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]
&self,
mat: &Mat,
scale_factor: f32,
min_neighbors: c_int,
min_size: Size2i,
max_size: Size2i
) -> Vec<Rect>
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]
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>,