[][src]Struct opencv::dnn::KeypointsModel

pub struct KeypointsModel { /* fields omitted */ }

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

Methods

impl KeypointsModel[src]

pub fn as_raw_KeypointsModel(&self) -> *mut c_void[src]

pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self[src]

impl KeypointsModel[src]

pub fn new(model: &str, config: &str) -> Result<KeypointsModel>[src]

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: ""

pub fn new_1(network: &dyn NetTrait) -> Result<KeypointsModel>[src]

Create model from deep learning network.

Parameters

  • network: Net object.

pub fn estimate(
    &mut self,
    frame: &dyn ToInputArray,
    thresh: f32
) -> Result<VectorOfPoint2f>
[src]

Given the @p input frame, create input blob, run net

Parameters

  • frame: The input image.
  • thresh: minimum confidence threshold to select a keypoint

Returns

a vector holding the x and y coordinates of each detected keypoint

C++ default parameters

  • thresh: 0.5

Trait Implementations

impl Drop for KeypointsModel[src]

impl ModelTrait for KeypointsModel[src]

impl NetTrait for KeypointsModel[src]

impl Send for KeypointsModel[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.