Struct opencv::objdetect::Dictionary
source · pub struct Dictionary { /* private fields */ }
Expand description
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.
Implementations§
source§impl Dictionary
impl Dictionary
pub fn default() -> Result<Dictionary>
sourcepub fn new(
bytes_list: &Mat,
_marker_size: i32,
maxcorr: i32
) -> Result<Dictionary>
pub fn new(
bytes_list: &Mat,
_marker_size: i32,
maxcorr: i32
) -> Result<Dictionary>
C++ default parameters
- maxcorr: 0
sourcepub fn get_byte_list_from_bits(bits: &Mat) -> Result<Mat>
pub fn get_byte_list_from_bits(bits: &Mat) -> Result<Mat>
Transform matrix of bits to list of bytes in the 4 rotations
Trait Implementations§
source§impl Boxed for Dictionary
impl Boxed for Dictionary
source§impl DictionaryTrait for Dictionary
impl DictionaryTrait for Dictionary
fn as_raw_mut_Dictionary(&mut self) -> *mut c_void
fn set_bytes_list(&mut self, val: Mat)
fn set_marker_size(&mut self, val: i32)
fn set_max_correction_bits(&mut self, val: i32)
source§fn read_dictionary(&mut self, fn_: &FileNode) -> Result<bool>
fn read_dictionary(&mut self, fn_: &FileNode) -> Result<bool>
Read a new dictionary from FileNode. Read more
source§fn write_dictionary(&mut self, fs: &mut FileStorage, name: &str) -> Result<()>
fn write_dictionary(&mut self, fs: &mut FileStorage, name: &str) -> Result<()>
Write a dictionary to FileStorage, format is the same as in readDictionary(). Read more
source§impl DictionaryTraitConst for Dictionary
impl DictionaryTraitConst for Dictionary
fn as_raw_Dictionary(&self) -> *const c_void
fn bytes_list(&self) -> Mat
fn marker_size(&self) -> i32
fn max_correction_bits(&self) -> i32
source§fn identify(
&self,
only_bits: &Mat,
idx: &mut i32,
rotation: &mut i32,
max_correction_rate: f64
) -> Result<bool>
fn identify(
&self,
only_bits: &Mat,
idx: &mut i32,
rotation: &mut i32,
max_correction_rate: f64
) -> Result<bool>
Given a matrix of bits. Returns whether if marker is identified or not. Read more
source§fn get_distance_to_id(
&self,
bits: &dyn ToInputArray,
id: i32,
all_rotations: bool
) -> Result<i32>
fn get_distance_to_id(
&self,
bits: &dyn ToInputArray,
id: i32,
all_rotations: bool
) -> Result<i32>
Returns the distance of the input bits to the specific id. Read more
source§fn generate_image_marker(
&self,
id: i32,
side_pixels: i32,
_img: &mut dyn ToOutputArray,
border_bits: i32
) -> Result<()>
fn generate_image_marker(
&self,
id: i32,
side_pixels: i32,
_img: &mut dyn ToOutputArray,
border_bits: i32
) -> Result<()>
Generate a canonical marker image Read more