Struct opencv::dnn::LayerParams

source ·
pub struct LayerParams { /* private fields */ }
Expand description

This class provides all data needed to initialize layer.

It includes dictionary with scalar params (which can be read by using Dict interface), blob params #blobs and optional meta information: #name and #type of layer instance.

Implementations§

Trait Implementations§

source§

impl Boxed for LayerParams

source§

unsafe fn from_raw(ptr: *mut c_void) -> Self

Wrap the specified raw pointer Read more
source§

fn into_raw(self) -> *mut c_void

Return an the underlying raw pointer while consuming this wrapper. Read more
source§

fn as_raw(&self) -> *const c_void

Return the underlying raw pointer. Read more
source§

fn as_raw_mut(&mut self) -> *mut c_void

Return the underlying mutable raw pointer Read more
source§

impl DictTrait for LayerParams

source§

fn as_raw_mut_Dict(&mut self) -> *mut c_void

source§

unsafe fn ptr_mut(&mut self, key: &str) -> Result<DictValue>

If the @p key in the dictionary then returns pointer to its value, else returns NULL.
source§

fn set_str(&mut self, key: &str, value: &str) -> Result<String>

Sets new @p value for the @p key, or adds new key-value pair into the dictionary.
source§

fn set(&mut self, key: &str, value: &DictValue) -> Result<DictValue>

Sets new @p value for the @p key, or adds new key-value pair into the dictionary.
source§

fn set_f64(&mut self, key: &str, value: &f64) -> Result<f64>

Sets new @p value for the @p key, or adds new key-value pair into the dictionary.
source§

fn set_i64(&mut self, key: &str, value: &i64) -> Result<i64>

Sets new @p value for the @p key, or adds new key-value pair into the dictionary.
source§

fn erase(&mut self, key: &str) -> Result<()>

Erase @p key from the dictionary.
source§

impl DictTraitConst for LayerParams

source§

fn as_raw_Dict(&self) -> *const c_void

source§

fn has(&self, key: &str) -> Result<bool>

Checks a presence of the @p key in the dictionary.
source§

unsafe fn ptr(&self, key: &str) -> Result<DictValue>

If the @p key in the dictionary then returns pointer to its value, else returns NULL. Read more
source§

fn get(&self, key: &str) -> Result<DictValue>

If the @p key in the dictionary then returns its value, else an error will be generated.
source§

impl Drop for LayerParams

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl From<LayerParams> for Dict

source§

fn from(s: LayerParams) -> Self

Converts to this type from the input type.
source§

impl LayerParamsTrait for LayerParams

source§

fn as_raw_mut_LayerParams(&mut self) -> *mut c_void

source§

fn set_blobs(&mut self, val: Vector<Mat>)

List of learned parameters stored as blobs.
source§

fn set_name(&mut self, val: &str)

Name of the layer instance (optional, can be used internal purposes).
source§

fn set_type(&mut self, val: &str)

Type name which was used for creating layer by layer factory (optional).
source§

impl LayerParamsTraitConst for LayerParams

source§

fn as_raw_LayerParams(&self) -> *const c_void

source§

fn blobs(&self) -> Vector<Mat>

List of learned parameters stored as blobs.
source§

fn name(&self) -> String

Name of the layer instance (optional, can be used internal purposes).
source§

fn typ(&self) -> String

Type name which was used for creating layer by layer factory (optional).
source§

impl Send for LayerParams

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.