[][src]Trait opencv::prelude::ClassificationModelTrait

pub trait ClassificationModelTrait: ModelTrait {
    pub fn as_raw_ClassificationModel(&self) -> *const c_void;
pub fn as_raw_mut_ClassificationModel(&mut self) -> *mut c_void; pub fn classify(
        &mut self,
        frame: &dyn ToInputArray,
        class_id: &mut i32,
        conf: &mut f32
    ) -> Result<()> { ... } }

This class represents high-level API for classification models.

ClassificationModel allows to set params for preprocessing input image. ClassificationModel creates net from file with trained weights and config, sets preprocessing input, runs forward pass and return top-1 prediction.

Required methods

Loading content...

Provided methods

pub fn classify(
    &mut self,
    frame: &dyn ToInputArray,
    class_id: &mut i32,
    conf: &mut f32
) -> Result<()>
[src]

Given the @p input frame, create input blob, run net and return top-1 prediction.

Parameters

  • frame: The input image.

Overloaded parameters

Loading content...

Implementors

Loading content...