[−][src]Struct opencv::dnn::KeypointsModel
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]
pub fn estimate(
&mut self,
frame: &dyn ToInputArray,
thresh: f32
) -> Result<VectorOfPoint2f>
[src]
&mut self,
frame: &dyn ToInputArray,
thresh: f32
) -> Result<VectorOfPoint2f>
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]
fn as_raw_Model(&self) -> *mut c_void
[src]
fn set_input_size(&mut self, size: Size) -> Result<Model>
[src]
fn set_input_size_1(&mut self, width: i32, height: i32) -> Result<Model>
[src]
fn set_input_mean(&mut self, mean: Scalar) -> Result<Model>
[src]
fn set_input_scale(&mut self, scale: f64) -> Result<Model>
[src]
fn set_input_crop(&mut self, crop: bool) -> Result<Model>
[src]
fn set_input_swap_rb(&mut self, swap_rb: bool) -> Result<Model>
[src]
fn set_input_params(
&mut self,
scale: f64,
size: Size,
mean: Scalar,
swap_rb: bool,
crop: bool
) -> Result<()>
[src]
&mut self,
scale: f64,
size: Size,
mean: Scalar,
swap_rb: bool,
crop: bool
) -> Result<()>
fn predict(
&mut self,
frame: &dyn ToInputArray,
outs: &mut dyn ToOutputArray
) -> Result<()>
[src]
&mut self,
frame: &dyn ToInputArray,
outs: &mut dyn ToOutputArray
) -> Result<()>
impl NetTrait for KeypointsModel
[src]
fn as_raw_Net(&self) -> *mut c_void
[src]
fn empty(&self) -> Result<bool>
[src]
fn dump(&mut self) -> Result<String>
[src]
fn dump_to_file(&mut self, path: &str) -> Result<()>
[src]
fn add_layer(
&mut self,
name: &str,
_type: &str,
params: &mut LayerParams
) -> Result<i32>
[src]
&mut self,
name: &str,
_type: &str,
params: &mut LayerParams
) -> Result<i32>
fn add_layer_to_prev(
&mut self,
name: &str,
_type: &str,
params: &mut LayerParams
) -> Result<i32>
[src]
&mut self,
name: &str,
_type: &str,
params: &mut LayerParams
) -> Result<i32>
fn get_layer_id(&mut self, layer: &str) -> Result<i32>
[src]
fn get_layer_names(&self) -> Result<VectorOfString>
[src]
fn get_layer(&mut self, layer_id: &DictValue) -> Result<PtrOfLayer>
[src]
fn get_layer_inputs(
&mut self,
layer_id: &DictValue
) -> Result<VectorOfPtrOfLayer>
[src]
&mut self,
layer_id: &DictValue
) -> Result<VectorOfPtrOfLayer>
fn connect_first_second(&mut self, out_pin: &str, inp_pin: &str) -> Result<()>
[src]
fn connect(
&mut self,
out_layer_id: i32,
out_num: i32,
inp_layer_id: i32,
inp_num: i32
) -> Result<()>
[src]
&mut self,
out_layer_id: i32,
out_num: i32,
inp_layer_id: i32,
inp_num: i32
) -> Result<()>
fn set_inputs_names(&mut self, input_blob_names: &VectorOfString) -> Result<()>
[src]
fn forward(&mut self, output_name: &str) -> Result<Mat>
[src]
fn forward_layer(
&mut self,
output_blobs: &mut dyn ToOutputArray,
output_name: &str
) -> Result<()>
[src]
&mut self,
output_blobs: &mut dyn ToOutputArray,
output_name: &str
) -> Result<()>
fn forward_first_outputs(
&mut self,
output_blobs: &mut dyn ToOutputArray,
out_blob_names: &VectorOfString
) -> Result<()>
[src]
&mut self,
output_blobs: &mut dyn ToOutputArray,
out_blob_names: &VectorOfString
) -> Result<()>
fn forward_all(
&mut self,
output_blobs: &mut VectorOfVectorOfMat,
out_blob_names: &VectorOfString
) -> Result<()>
[src]
&mut self,
output_blobs: &mut VectorOfVectorOfMat,
out_blob_names: &VectorOfString
) -> Result<()>
fn set_halide_scheduler(&mut self, scheduler: &str) -> Result<()>
[src]
fn set_preferable_backend(&mut self, backend_id: i32) -> Result<()>
[src]
fn set_preferable_target(&mut self, target_id: i32) -> Result<()>
[src]
fn set_input(
&mut self,
blob: &dyn ToInputArray,
name: &str,
scalefactor: f64,
mean: Scalar
) -> Result<()>
[src]
&mut self,
blob: &dyn ToInputArray,
name: &str,
scalefactor: f64,
mean: Scalar
) -> Result<()>
fn set_param(
&mut self,
layer: &DictValue,
num_param: i32,
blob: &Mat
) -> Result<()>
[src]
&mut self,
layer: &DictValue,
num_param: i32,
blob: &Mat
) -> Result<()>
fn get_param(&mut self, layer: &DictValue, num_param: i32) -> Result<Mat>
[src]
fn get_unconnected_out_layers(&self) -> Result<VectorOfint>
[src]
fn get_unconnected_out_layers_names(&self) -> Result<VectorOfString>
[src]
fn get_layers_shapes(
&self,
net_input_shapes: &VectorOfVectorOfint,
layers_ids: &mut VectorOfint,
in_layers_shapes: &mut VectorOfVectorOfVectorOfint,
out_layers_shapes: &mut VectorOfVectorOfVectorOfint
) -> Result<()>
[src]
&self,
net_input_shapes: &VectorOfVectorOfint,
layers_ids: &mut VectorOfint,
in_layers_shapes: &mut VectorOfVectorOfVectorOfint,
out_layers_shapes: &mut VectorOfVectorOfVectorOfint
) -> Result<()>
fn get_layer_shapes(
&self,
net_input_shapes: &VectorOfVectorOfint,
layer_id: i32,
in_layer_shapes: &mut VectorOfVectorOfint,
out_layer_shapes: &mut VectorOfVectorOfint
) -> Result<()>
[src]
&self,
net_input_shapes: &VectorOfVectorOfint,
layer_id: i32,
in_layer_shapes: &mut VectorOfVectorOfint,
out_layer_shapes: &mut VectorOfVectorOfint
) -> Result<()>
fn get_flops(&self, net_input_shapes: &VectorOfVectorOfint) -> Result<i64>
[src]
fn get_flops_1(
&self,
layer_id: i32,
net_input_shapes: &VectorOfVectorOfint
) -> Result<i64>
[src]
&self,
layer_id: i32,
net_input_shapes: &VectorOfVectorOfint
) -> Result<i64>
fn get_layer_types(&self, layers_types: &mut VectorOfString) -> Result<()>
[src]
fn get_layers_count(&self, layer_type: &str) -> Result<i32>
[src]
fn get_memory_consumption(
&self,
net_input_shapes: &VectorOfVectorOfint,
weights: &mut size_t,
blobs: &mut size_t
) -> Result<()>
[src]
&self,
net_input_shapes: &VectorOfVectorOfint,
weights: &mut size_t,
blobs: &mut size_t
) -> Result<()>
fn get_memory_consumption_for_layer(
&self,
layer_id: i32,
net_input_shapes: &VectorOfVectorOfint,
weights: &mut size_t,
blobs: &mut size_t
) -> Result<()>
[src]
&self,
layer_id: i32,
net_input_shapes: &VectorOfVectorOfint,
weights: &mut size_t,
blobs: &mut size_t
) -> Result<()>
fn get_memory_consumption_for_layers(
&self,
net_input_shapes: &VectorOfVectorOfint,
layer_ids: &mut VectorOfint,
weights: &mut VectorOfsize_t,
blobs: &mut VectorOfsize_t
) -> Result<()>
[src]
&self,
net_input_shapes: &VectorOfVectorOfint,
layer_ids: &mut VectorOfint,
weights: &mut VectorOfsize_t,
blobs: &mut VectorOfsize_t
) -> Result<()>
fn enable_fusion(&mut self, fusion: bool) -> Result<()>
[src]
fn get_perf_profile(&mut self, timings: &mut VectorOfdouble) -> Result<i64>
[src]
impl Send for KeypointsModel
[src]
Auto Trait Implementations
impl RefUnwindSafe for KeypointsModel
impl !Sync for KeypointsModel
impl Unpin for KeypointsModel
impl UnwindSafe for KeypointsModel
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,