Trait opencv::hub_prelude::DetectionModelTrait[][src]

pub trait DetectionModelTrait: DetectionModelTraitConst + ModelTrait {
    fn as_raw_mut_DetectionModel(&mut self) -> *mut c_void;

    fn set_nms_across_classes(&mut self, value: bool) -> Result<DetectionModel> { ... }
fn get_nms_across_classes(&mut self) -> Result<bool> { ... }
fn detect(
        &mut self,
        frame: &dyn ToInputArray,
        class_ids: &mut Vector<i32>,
        confidences: &mut Vector<f32>,
        boxes: &mut Vector<Rect>,
        conf_threshold: f32,
        nms_threshold: f32
    ) -> Result<()> { ... } }

Required methods

Provided methods

nmsAcrossClasses defaults to false, such that when non max suppression is used during the detect() function, it will do so per-class. This function allows you to toggle this behaviour.

Parameters
  • value: The new value for nmsAcrossClasses

Getter for nmsAcrossClasses. This variable defaults to false, such that when non max suppression is used during the detect() function, it will do so only per-class

Given the @p input frame, create input blob, run net and return result detections.

Parameters
  • frame: The input image.
  • classIds:[out] Class indexes in result detection.
  • confidences:[out] A set of corresponding confidences.
  • boxes:[out] A set of bounding boxes.
  • confThreshold: A threshold used to filter boxes by confidences.
  • nmsThreshold: A threshold used in non maximum suppression.
C++ default parameters
  • conf_threshold: 0.5f
  • nms_threshold: 0.0f

Implementors