Trait DetectorParametersTrait

Source
pub trait DetectorParametersTrait: DetectorParametersTraitConst {
Show 38 methods // Required method fn as_raw_mut_DetectorParameters(&mut self) -> *mut c_void; // Provided methods fn set_adaptive_thresh_win_size_min(&mut self, val: i32) { ... } fn set_adaptive_thresh_win_size_max(&mut self, val: i32) { ... } fn set_adaptive_thresh_win_size_step(&mut self, val: i32) { ... } fn set_adaptive_thresh_constant(&mut self, val: f64) { ... } fn set_min_marker_perimeter_rate(&mut self, val: f64) { ... } fn set_max_marker_perimeter_rate(&mut self, val: f64) { ... } fn set_polygonal_approx_accuracy_rate(&mut self, val: f64) { ... } fn set_min_corner_distance_rate(&mut self, val: f64) { ... } fn set_min_distance_to_border(&mut self, val: i32) { ... } fn set_min_marker_distance_rate(&mut self, val: f64) { ... } fn set_min_group_distance(&mut self, val: f32) { ... } fn set_corner_refinement_method(&mut self, val: i32) { ... } fn set_corner_refinement_win_size(&mut self, val: i32) { ... } fn set_relative_corner_refinment_win_size(&mut self, val: f32) { ... } fn set_corner_refinement_max_iterations(&mut self, val: i32) { ... } fn set_corner_refinement_min_accuracy(&mut self, val: f64) { ... } fn set_marker_border_bits(&mut self, val: i32) { ... } fn set_perspective_remove_pixel_per_cell(&mut self, val: i32) { ... } fn set_perspective_remove_ignored_margin_per_cell(&mut self, val: f64) { ... } fn set_max_erroneous_bits_in_border_rate(&mut self, val: f64) { ... } fn set_min_otsu_std_dev(&mut self, val: f64) { ... } fn set_error_correction_rate(&mut self, val: f64) { ... } fn set_april_tag_quad_decimate(&mut self, val: f32) { ... } fn set_april_tag_quad_sigma(&mut self, val: f32) { ... } fn set_april_tag_min_cluster_pixels(&mut self, val: i32) { ... } fn set_april_tag_max_nmaxima(&mut self, val: i32) { ... } fn set_april_tag_critical_rad(&mut self, val: f32) { ... } fn set_april_tag_max_line_fit_mse(&mut self, val: f32) { ... } fn set_april_tag_min_white_black_diff(&mut self, val: i32) { ... } fn set_april_tag_deglitch(&mut self, val: i32) { ... } fn set_detect_inverted_marker(&mut self, val: bool) { ... } fn set_use_aruco3_detection(&mut self, val: bool) { ... } fn set_min_side_length_canonical_img(&mut self, val: i32) { ... } fn set_min_marker_length_ratio_original_img(&mut self, val: f32) { ... } fn read_detector_parameters( &mut self, fn_: &impl FileNodeTraitConst, ) -> Result<bool> { ... } fn write_detector_parameters( &mut self, fs: &mut impl FileStorageTrait, name: &str, ) -> Result<bool> { ... } fn write_detector_parameters_def( &mut self, fs: &mut impl FileStorageTrait, ) -> Result<bool> { ... }
}
Expand description

Required Methods§

Provided Methods§

Source

fn set_adaptive_thresh_win_size_min(&mut self, val: i32)

minimum window size for adaptive thresholding before finding contours (default 3).

Source

fn set_adaptive_thresh_win_size_max(&mut self, val: i32)

maximum window size for adaptive thresholding before finding contours (default 23).

Source

fn set_adaptive_thresh_win_size_step(&mut self, val: i32)

increments from adaptiveThreshWinSizeMin to adaptiveThreshWinSizeMax during the thresholding (default 10).

Source

fn set_adaptive_thresh_constant(&mut self, val: f64)

constant for adaptive thresholding before finding contours (default 7)

Source

fn set_min_marker_perimeter_rate(&mut self, val: f64)

determine minimum perimeter for marker contour to be detected.

This is defined as a rate respect to the maximum dimension of the input image (default 0.03).

Source

fn set_max_marker_perimeter_rate(&mut self, val: f64)

determine maximum perimeter for marker contour to be detected.

This is defined as a rate respect to the maximum dimension of the input image (default 4.0).

Source

fn set_polygonal_approx_accuracy_rate(&mut self, val: f64)

minimum accuracy during the polygonal approximation process to determine which contours are squares. (default 0.03)

Source

fn set_min_corner_distance_rate(&mut self, val: f64)

minimum distance between corners for detected markers relative to its perimeter (default 0.05)

Source

fn set_min_distance_to_border(&mut self, val: i32)

minimum distance of any corner to the image border for detected markers (in pixels) (default 3)

Source

fn set_min_marker_distance_rate(&mut self, val: f64)

minimum average distance between the corners of the two markers to be grouped (default 0.125).

The rate is relative to the smaller perimeter of the two markers. Two markers are grouped if average distance between the corners of the two markers is less than min(MarkerPerimeter1, MarkerPerimeter2)*minMarkerDistanceRate.

default value is 0.125 because 0.125*MarkerPerimeter = (MarkerPerimeter / 4) * 0.5 = half the side of the marker.

Note: default value was changed from 0.05 after 4.8.1 release, because the filtering algorithm has been changed. Now a few candidates from the same group can be added to the list of candidates if they are far from each other.

§See also

minGroupDistance.

Source

fn set_min_group_distance(&mut self, val: f32)

minimum average distance between the corners of the two markers in group to add them to the list of candidates

The average distance between the corners of the two markers is calculated relative to its module size (default 0.21).

§C++ default parameters
  • val: 0.21f
Source

fn set_corner_refinement_method(&mut self, val: i32)

default value CORNER_REFINE_NONE

Source

fn set_corner_refinement_win_size(&mut self, val: i32)

maximum window size for the corner refinement process (in pixels) (default 5).

The window size may decrease if the ArUco marker is too small, check relativeCornerRefinmentWinSize. The final window size is calculated as: min(cornerRefinementWinSize, averageArucoModuleSize*relativeCornerRefinmentWinSize), where averageArucoModuleSize is average module size of ArUco marker in pixels. (ArUco marker is composed of black and white modules)

Source

fn set_relative_corner_refinment_win_size(&mut self, val: f32)

Dynamic window size for corner refinement relative to Aruco module size (default 0.3).

The final window size is calculated as: min(cornerRefinementWinSize, averageArucoModuleSize*relativeCornerRefinmentWinSize), where averageArucoModuleSize is average module size of ArUco marker in pixels. (ArUco marker is composed of black and white modules) In the case of markers located far from each other, it may be useful to increase the value of the parameter to 0.4-0.5. In the case of markers located close to each other, it may be useful to decrease the parameter value to 0.1-0.2.

Source

fn set_corner_refinement_max_iterations(&mut self, val: i32)

maximum number of iterations for stop criteria of the corner refinement process (default 30).

Source

fn set_corner_refinement_min_accuracy(&mut self, val: f64)

minimum error for the stop cristeria of the corner refinement process (default: 0.1)

Source

fn set_marker_border_bits(&mut self, val: i32)

number of bits of the marker border, i.e. marker border width (default 1).

Source

fn set_perspective_remove_pixel_per_cell(&mut self, val: i32)

number of bits (per dimension) for each cell of the marker when removing the perspective (default 4).

Source

fn set_perspective_remove_ignored_margin_per_cell(&mut self, val: f64)

width of the margin of pixels on each cell not considered for the determination of the cell bit.

Represents the rate respect to the total size of the cell, i.e. perspectiveRemovePixelPerCell (default 0.13)

Source

fn set_max_erroneous_bits_in_border_rate(&mut self, val: f64)

maximum number of accepted erroneous bits in the border (i.e. number of allowed white bits in the border).

Represented as a rate respect to the total number of bits per marker (default 0.35).

Source

fn set_min_otsu_std_dev(&mut self, val: f64)

minimun standard deviation in pixels values during the decodification step to apply Otsu thresholding (otherwise, all the bits are set to 0 or 1 depending on mean higher than 128 or not) (default 5.0)

Source

fn set_error_correction_rate(&mut self, val: f64)

error correction rate respect to the maximun error correction capability for each dictionary (default 0.6).

Source

fn set_april_tag_quad_decimate(&mut self, val: f32)

April :: User-configurable parameters.

Detection of quads can be done on a lower-resolution image, improving speed at a cost of pose accuracy and a slight decrease in detection rate. Decoding the binary payload is still

Source

fn set_april_tag_quad_sigma(&mut self, val: f32)

what Gaussian blur should be applied to the segmented image (used for quad detection?)

Source

fn set_april_tag_min_cluster_pixels(&mut self, val: i32)

reject quads containing too few pixels (default 5).

Source

fn set_april_tag_max_nmaxima(&mut self, val: i32)

how many corner candidates to consider when segmenting a group of pixels into a quad (default 10).

Source

fn set_april_tag_critical_rad(&mut self, val: f32)

reject quads where pairs of edges have angles that are close to straight or close to 180 degrees.

Zero means that no quads are rejected. (In radians) (default 10*PI/180)

Source

fn set_april_tag_max_line_fit_mse(&mut self, val: f32)

when fitting lines to the contours, what is the maximum mean squared error

Source

fn set_april_tag_min_white_black_diff(&mut self, val: i32)

add an extra check that the white model must be (overall) brighter than the black model.

When we build our model of black & white pixels, we add an extra check that the white model must be (overall) brighter than the black model. How much brighter? (in pixel values, [0,255]), (default 5)

Source

fn set_april_tag_deglitch(&mut self, val: i32)

should the thresholded image be deglitched? Only useful for very noisy images (default 0).

Source

fn set_detect_inverted_marker(&mut self, val: bool)

to check if there is a white marker.

In order to generate a “white” marker just invert a normal marker by using a tilde, ~markerImage. (default false)

Source

fn set_use_aruco3_detection(&mut self, val: bool)

enable the new and faster Aruco detection strategy.

Proposed in the paper: Romero-Ramirez et al: Speeded up detection of squared fiducial markers (2018) https://www.researchgate.net/publication/325787310_Speeded_Up_Detection_of_Squared_Fiducial_Markers

Source

fn set_min_side_length_canonical_img(&mut self, val: i32)

minimum side length of a marker in the canonical image. Latter is the binarized image in which contours are searched.

Source

fn set_min_marker_length_ratio_original_img(&mut self, val: f32)

range [0,1], eq (2) from paper. The parameter tau_i has a direct influence on the processing speed.

Source

fn read_detector_parameters( &mut self, fn_: &impl FileNodeTraitConst, ) -> Result<bool>

Read a new set of DetectorParameters from FileNode (use FileStorage.root()).

Source

fn write_detector_parameters( &mut self, fs: &mut impl FileStorageTrait, name: &str, ) -> Result<bool>

Write a set of DetectorParameters to FileStorage

§C++ default parameters
  • name: String()
Source

fn write_detector_parameters_def( &mut self, fs: &mut impl FileStorageTrait, ) -> Result<bool>

Write a set of DetectorParameters to FileStorage

§Note

This alternative version of DetectorParametersTrait::write_detector_parameters function uses the following default values for its arguments:

  • name: String()

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§