#[repr(transparent)]pub struct Detector { /* private fields */ }
Expand description
The marker detector.
Implementations§
source§impl Detector
impl Detector
pub fn builder() -> DetectorBuilder
sourcepub fn set_thread_number(&mut self, num_threads: u8)
pub fn set_thread_number(&mut self, num_threads: u8)
Set the number of threads used for detection.
sourcepub fn set_decimation(&mut self, decimation: f32)
pub fn set_decimation(&mut self, decimation: f32)
Decimate the input image.
The 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 done at full resolution.
sourcepub fn set_sigma(&mut self, sigma: f32)
pub fn set_sigma(&mut self, sigma: f32)
Set the standard deviation in pixels for Gaussian blur applied to the segmented image for quad detection. Very noisy images benefit from non-zero values (e.g. 0.8).
sourcepub fn set_refine_edges(&mut self, refine_edges: bool)
pub fn set_refine_edges(&mut self, refine_edges: bool)
Enable refinement of edges.
When enabled, the edges of the each quad are adjusted to “snap to” strong gradients nearby. This is useful when decimation is employed, as it can increase the quality of the initial quad estimate substantially. Both very computationally inexpensive and generally recommended to be enabled. The option is ignored if decimation is disabled.
sourcepub fn set_shapening(&mut self, shapening: f64)
pub fn set_shapening(&mut self, shapening: f64)
Set the amount of sharpening applied to the decoded images.
This can help decode small tags but may or may not help in odd lighting conditions or low light conditions. The default value is 0.25.
sourcepub fn set_debug(&mut self, debug: bool)
pub fn set_debug(&mut self, debug: bool)
Enable or disable the debugging message.
It is disabled by default.
sourcepub fn set_thresholds(&mut self, thresholds: QuadThresholds)
pub fn set_thresholds(&mut self, thresholds: QuadThresholds)
Set various thresholds for detecting quads as candidates for further processing.
sourcepub unsafe fn from_raw(ptr: *mut apriltag_detector_t) -> Self
pub unsafe fn from_raw(ptr: *mut apriltag_detector_t) -> Self
Creates an instance from pointer.
The pointer will be managed by the type. Do not run manual deallocation on the pointer. Panics if the pointer is null.
Safety
The method is safe when the pointer was created by apriltag_detector_create.
sourcepub fn into_raw(self) -> NonNull<apriltag_detector_t>
pub fn into_raw(self) -> NonNull<apriltag_detector_t>
Returns the underlying pointer.