Trait opencv::prelude::ModelTraitConst
source · pub trait ModelTraitConst {
fn as_raw_Model(&self) -> *const c_void;
fn predict(
&self,
frame: &dyn ToInputArray,
outs: &mut dyn ToOutputArray
) -> Result<()> { ... }
fn get_network_(&self) -> Result<Net> { ... }
}Expand description
This class is presented high-level API for neural networks.
Model allows to set params for preprocessing input image. Model creates net from file with trained weights and config, sets preprocessing input and runs forward pass.
Required Methods§
fn as_raw_Model(&self) -> *const c_void
Provided Methods§
sourcefn predict(
&self,
frame: &dyn ToInputArray,
outs: &mut dyn ToOutputArray
) -> Result<()>
fn predict(
&self,
frame: &dyn ToInputArray,
outs: &mut dyn ToOutputArray
) -> Result<()>
Given the @p input frame, create input blob, run net and return the output @p blobs.
Parameters
- frame: The input image.
- outs:[out] Allocated output blobs, which will store results of the computation.