[][src]Trait opencv::dpm::DPMDetector

pub trait DPMDetector {
    pub fn as_raw_DPMDetector(&self) -> *const c_void;
pub fn as_raw_mut_DPMDetector(&mut self) -> *mut c_void; pub fn is_empty(&self) -> Result<bool> { ... }
pub fn detect(
        &mut self,
        image: &mut Mat,
        objects: &mut Vector<DPMDetector_ObjectDetection>
    ) -> Result<()> { ... }
pub fn get_class_names(&self) -> Result<Vector<String>> { ... }
pub fn get_class_count(&self) -> Result<size_t> { ... } }

This is a C++ abstract class, it provides external user API to work with DPM.

Required methods

Loading content...

Provided methods

pub fn is_empty(&self) -> Result<bool>[src]

pub fn detect(
    &mut self,
    image: &mut Mat,
    objects: &mut Vector<DPMDetector_ObjectDetection>
) -> Result<()>
[src]

Find rectangular regions in the given image that are likely to contain objects of loaded classes (models) and corresponding confidence levels.

Parameters

  • image: An image.
  • objects: The detections: rectangulars, scores and class IDs.

pub fn get_class_names(&self) -> Result<Vector<String>>[src]

Return the class (model) names that were passed in constructor or method load or extracted from models filenames in those methods.

pub fn get_class_count(&self) -> Result<size_t>[src]

Return a count of loaded models (classes).

Loading content...

Implementations

impl<'_> dyn DPMDetector + '_[src]

pub fn create(
    filenames: &Vector<String>,
    class_names: &Vector<String>
) -> Result<Ptr<dyn DPMDetector>>
[src]

Load the trained models from given .xml files and return cv::Ptr<DPMDetector>.

Parameters

  • filenames: A set of filenames storing the trained detectors (models). Each file contains one model. See examples of such files here /opencv_extra/testdata/cv/dpm/VOC2007_Cascade/.
  • classNames: A set of trained models names. If it's empty then the name of each model will be constructed from the name of file containing the model. E.g. the model stored in "/home/user/cat.xml" will get the name "cat".

C++ default parameters

Implementors

Loading content...