Struct opencv::dnn::KeypointsModel
source · pub struct KeypointsModel { /* private fields */ }
Expand description
This class represents high-level API for keypoints models
KeypointsModel allows to set params for preprocessing input image. KeypointsModel creates net from file with trained weights and config, sets preprocessing input, runs forward pass and returns the x and y coordinates of each detected keypoint
Implementations§
source§impl KeypointsModel
impl KeypointsModel
sourcepub fn new(model: &str, config: &str) -> Result<KeypointsModel>
pub fn new(model: &str, config: &str) -> Result<KeypointsModel>
Create keypoints model from network represented in one of the supported formats. An order of @p model and @p config arguments does not matter.
Parameters
- model: Binary file contains trained weights.
- config: Text file contains network configuration.
C++ default parameters
- config: “”
sourcepub fn new_1(network: &Net) -> Result<KeypointsModel>
pub fn new_1(network: &Net) -> Result<KeypointsModel>
Trait Implementations§
source§impl Boxed for KeypointsModel
impl Boxed for KeypointsModel
source§impl Clone for KeypointsModel
impl Clone for KeypointsModel
source§impl Drop for KeypointsModel
impl Drop for KeypointsModel
source§impl From<KeypointsModel> for Model
impl From<KeypointsModel> for Model
source§fn from(s: KeypointsModel) -> Self
fn from(s: KeypointsModel) -> Self
Converts to this type from the input type.
source§impl KeypointsModelTrait for KeypointsModel
impl KeypointsModelTrait for KeypointsModel
source§impl KeypointsModelTraitConst for KeypointsModel
impl KeypointsModelTraitConst for KeypointsModel
fn as_raw_KeypointsModel(&self) -> *const c_void
source§impl ModelTrait for KeypointsModel
impl ModelTrait for KeypointsModel
fn as_raw_mut_Model(&mut self) -> *mut c_void
source§fn set_input_size_1(&mut self, width: i32, height: i32) -> Result<Model>
fn set_input_size_1(&mut self, width: i32, height: i32) -> Result<Model>
Set input size for frame. Read more
source§fn set_input_mean(&mut self, mean: Scalar) -> Result<Model>
fn set_input_mean(&mut self, mean: Scalar) -> Result<Model>
Set mean value for frame. Read more
source§fn set_input_scale(&mut self, scale: f64) -> Result<Model>
fn set_input_scale(&mut self, scale: f64) -> Result<Model>
Set scalefactor value for frame. Read more
source§fn set_input_swap_rb(&mut self, swap_rb: bool) -> Result<Model>
fn set_input_swap_rb(&mut self, swap_rb: bool) -> Result<Model>
Set flag swapRB for frame. Read more
source§fn set_input_params(
&mut self,
scale: f64,
size: Size,
mean: Scalar,
swap_rb: bool,
crop: bool
) -> Result<()>
fn set_input_params( &mut self, scale: f64, size: Size, mean: Scalar, swap_rb: bool, crop: bool ) -> Result<()>
Set preprocessing parameters for frame. Read more
fn get_network__1(&mut self) -> Result<Net>
source§impl ModelTraitConst for KeypointsModel
impl ModelTraitConst for KeypointsModel
fn as_raw_Model(&self) -> *const c_void
source§fn 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. Read more
fn get_network_(&self) -> Result<Net>
impl Send for KeypointsModel
Auto Trait Implementations§
impl RefUnwindSafe for KeypointsModel
impl !Sync for KeypointsModel
impl Unpin for KeypointsModel
impl UnwindSafe for KeypointsModel
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more