Trait opencv::objdetect::DictionaryTraitConst
source · pub trait DictionaryTraitConst {
fn as_raw_Dictionary(&self) -> *const c_void;
fn bytes_list(&self) -> Mat { ... }
fn marker_size(&self) -> i32 { ... }
fn max_correction_bits(&self) -> i32 { ... }
fn identify(
&self,
only_bits: &Mat,
idx: &mut i32,
rotation: &mut i32,
max_correction_rate: f64
) -> Result<bool> { ... }
fn get_distance_to_id(
&self,
bits: &dyn ToInputArray,
id: i32,
all_rotations: bool
) -> Result<i32> { ... }
fn generate_image_marker(
&self,
id: i32,
side_pixels: i32,
_img: &mut dyn ToOutputArray,
border_bits: i32
) -> Result<()> { ... }
}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.
Required Methods§
fn as_raw_Dictionary(&self) -> *const c_void
Provided Methods§
fn bytes_list(&self) -> Mat
fn marker_size(&self) -> i32
fn max_correction_bits(&self) -> i32
sourcefn 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.
It returns by reference the correct id (if any) and the correct rotation
sourcefn 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.
If allRotations is true, the four posible bits rotation are considered
C++ default parameters
- all_rotations: true