pub struct DetectorBuilder { /* private fields */ }Expand description
A builder for configuring and instantiating a Detector.
Implementations§
Source§impl DetectorBuilder
impl DetectorBuilder
Sourcepub fn with_config(self, config: DetectorConfig) -> Self
pub fn with_config(self, config: DetectorConfig) -> Self
Use an existing configuration.
Sourcepub fn with_decimation(self, decimation: usize) -> Self
pub fn with_decimation(self, decimation: usize) -> Self
Set the decimation factor for the input image.
Sourcepub fn with_family(self, family: TagFamily) -> Self
pub fn with_family(self, family: TagFamily) -> Self
Add a tag family to be detected.
Sourcepub fn with_threads(self, threads: usize) -> Self
pub fn with_threads(self, threads: usize) -> Self
Set the thread count for parallel processing.
Sourcepub fn with_upscale_factor(self, factor: usize) -> Self
pub fn with_upscale_factor(self, factor: usize) -> Self
Set the upscale factor for detecting small tags.
Sourcepub fn with_corner_refinement(self, mode: CornerRefinementMode) -> Self
pub fn with_corner_refinement(self, mode: CornerRefinementMode) -> Self
Set the corner refinement mode.
Sourcepub fn with_decode_mode(self, mode: DecodeMode) -> Self
pub fn with_decode_mode(self, mode: DecodeMode) -> Self
Set the decoding mode (Hard vs Soft).
Sourcepub fn with_connectivity(self, connectivity: SegmentationConnectivity) -> Self
pub fn with_connectivity(self, connectivity: SegmentationConnectivity) -> Self
Set the segmentation connectivity (4-way or 8-way).
Sourcepub fn with_threshold_tile_size(self, size: usize) -> Self
pub fn with_threshold_tile_size(self, size: usize) -> Self
Set the tile size for adaptive thresholding.
Sourcepub fn with_threshold_min_range(self, range: u8) -> Self
pub fn with_threshold_min_range(self, range: u8) -> Self
Set the minimum intensity range for valid tiles.
Sourcepub fn with_adaptive_threshold_constant(self, c: i16) -> Self
pub fn with_adaptive_threshold_constant(self, c: i16) -> Self
Set the constant subtracted from local mean in adaptive thresholding.
Sourcepub fn with_quad_min_area(self, area: u32) -> Self
pub fn with_quad_min_area(self, area: u32) -> Self
Set the minimum quad area.
Sourcepub fn with_quad_min_fill_ratio(self, ratio: f32) -> Self
pub fn with_quad_min_fill_ratio(self, ratio: f32) -> Self
Set the minimum fill ratio.
Sourcepub fn with_quad_min_edge_score(self, score: f64) -> Self
pub fn with_quad_min_edge_score(self, score: f64) -> Self
Set the minimum edge alignment score.
Sourcepub fn with_max_hamming_error(self, errors: u32) -> Self
pub fn with_max_hamming_error(self, errors: u32) -> Self
Set the maximum number of Hamming errors allowed.
Sourcepub fn with_decoder_min_contrast(self, contrast: f64) -> Self
pub fn with_decoder_min_contrast(self, contrast: f64) -> Self
Set the minimum contrast for decoder bit classification.
Sourcepub fn with_sharpening(self, enable: bool) -> Self
pub fn with_sharpening(self, enable: bool) -> Self
Enable or disable Laplacian sharpening.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DetectorBuilder
impl RefUnwindSafe for DetectorBuilder
impl Send for DetectorBuilder
impl Sync for DetectorBuilder
impl Unpin for DetectorBuilder
impl UnsafeUnpin for DetectorBuilder
impl UnwindSafe for DetectorBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.