Trait opencv::hub_prelude::DPMDetector
source · [−]pub trait DPMDetector: DPMDetectorConst {
fn as_raw_mut_DPMDetector(&mut self) -> *mut c_void;
fn detect(
&mut self,
image: &mut Mat,
objects: &mut Vector<DPMDetector_ObjectDetection>
) -> Result<()> { ... }
}
Required Methods
fn as_raw_mut_DPMDetector(&mut self) -> *mut c_void
Provided Methods
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.
Implementations
sourceimpl dyn DPMDetector + '_
impl dyn DPMDetector + '_
sourcepub fn create(
filenames: &Vector<String>,
class_names: &Vector<String>
) -> Result<Ptr<dyn DPMDetector>>
pub fn create(
filenames: &Vector<String>,
class_names: &Vector<String>
) -> Result<Ptr<dyn DPMDetector>>
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
- class_names: std::vectorstd::string()