Trait opencv::xobjdetect::prelude::WBDetector
source · [−]pub trait WBDetector: WBDetectorConst {
fn as_raw_mut_WBDetector(&mut self) -> *mut c_void;
fn read(&mut self, node: &FileNode) -> Result<()> { ... }
fn train(&mut self, pos_samples: &str, neg_imgs: &str) -> Result<()> { ... }
fn detect(
&mut self,
img: &Mat,
bboxes: &mut Vector<Rect>,
confidences: &mut Vector<f64>
) -> Result<()> { ... }
}
Required Methods
fn as_raw_mut_WBDetector(&mut self) -> *mut c_void
Provided Methods
sourcefn train(&mut self, pos_samples: &str, neg_imgs: &str) -> Result<()>
fn train(&mut self, pos_samples: &str, neg_imgs: &str) -> Result<()>
Train WaldBoost detector
Parameters
- pos_samples: Path to directory with cropped positive samples
- neg_imgs: Path to directory with negative (background) images
sourcefn detect(
&mut self,
img: &Mat,
bboxes: &mut Vector<Rect>,
confidences: &mut Vector<f64>
) -> Result<()>
fn detect(
&mut self,
img: &Mat,
bboxes: &mut Vector<Rect>,
confidences: &mut Vector<f64>
) -> Result<()>
Detect objects on image using WaldBoost detector
Parameters
- img: Input image for detection
- bboxes: Bounding boxes coordinates output vector
- confidences: Confidence values for bounding boxes output vector
Implementations
sourceimpl dyn WBDetector + '_
impl dyn WBDetector + '_
sourcepub fn create() -> Result<Ptr<dyn WBDetector>>
pub fn create() -> Result<Ptr<dyn WBDetector>>
Create instance of WBDetector