[][src]Trait opencv::aruco::prelude::DictionaryTrait

pub trait DictionaryTrait {
    pub fn as_raw_Dictionary(&self) -> *const c_void;
pub fn as_raw_mut_Dictionary(&mut self) -> *mut c_void; pub fn bytes_list(&mut self) -> Mat { ... }
pub fn set_bytes_list(&mut self, val: Mat) { ... }
pub fn marker_size(&self) -> i32 { ... }
pub fn set_marker_size(&mut self, val: i32) { ... }
pub fn max_correction_bits(&self) -> i32 { ... }
pub fn set_max_correction_bits(&mut self, val: i32) { ... }
pub fn identify(
        &self,
        only_bits: &Mat,
        idx: &mut i32,
        rotation: &mut i32,
        max_correction_rate: f64
    ) -> Result<bool> { ... }
pub fn get_distance_to_id(
        &self,
        bits: &dyn ToInputArray,
        id: i32,
        all_rotations: bool
    ) -> Result<i32> { ... }
pub fn draw_marker(
        &self,
        id: i32,
        side_pixels: i32,
        _img: &mut dyn ToOutputArray,
        border_bits: i32
    ) -> Result<()> { ... } }

Dictionary/Set of markers. It contains the inner codification

bytesList contains the marker codewords where

  • bytesList.rows is the dictionary size
  • each marker is encoded using nbytes = ceil(markerSize*markerSize/8.)
  • each row contains all 4 rotations of the marker, so its length is 4*nbytes

bytesList.ptr(i)[k*nbytes + j] is then the j-th byte of i-th marker, in its k-th rotation.

Required methods

Loading content...

Provided methods

pub fn bytes_list(&mut self) -> Mat[src]

pub fn set_bytes_list(&mut self, val: Mat)[src]

pub fn marker_size(&self) -> i32[src]

pub fn set_marker_size(&mut self, val: i32)[src]

pub fn max_correction_bits(&self) -> i32[src]

pub fn set_max_correction_bits(&mut self, val: i32)[src]

pub fn identify(
    &self,
    only_bits: &Mat,
    idx: &mut i32,
    rotation: &mut i32,
    max_correction_rate: f64
) -> Result<bool>
[src]

Given a matrix of bits. Returns whether if marker is identified or not. It returns by reference the correct id (if any) and the correct rotation

pub fn get_distance_to_id(
    &self,
    bits: &dyn ToInputArray,
    id: i32,
    all_rotations: bool
) -> Result<i32>
[src]

Returns the distance of the input bits to the specific id. If allRotations is true, the four posible bits rotation are considered

C++ default parameters

  • all_rotations: true

pub fn draw_marker(
    &self,
    id: i32,
    side_pixels: i32,
    _img: &mut dyn ToOutputArray,
    border_bits: i32
) -> Result<()>
[src]

Draw a canonical marker image

C++ default parameters

  • border_bits: 1
Loading content...

Implementors

impl DictionaryTrait for Dictionary[src]

impl DictionaryTrait for PtrOfDictionary[src]

Loading content...