pub struct IdCorrectionConfig {Show 17 fields
pub enable: bool,
pub auto_search_radius_outer_muls: Vec<f64>,
pub consistency_outer_mul: f64,
pub consistency_min_neighbors: usize,
pub consistency_min_support_edges: usize,
pub consistency_max_contradiction_frac: f32,
pub soft_lock_exact_decode: bool,
pub min_votes: usize,
pub min_votes_recover: usize,
pub min_vote_weight_frac: f32,
pub h_reproj_gate_px: f64,
pub homography_fallback_enable: bool,
pub homography_min_trusted: usize,
pub homography_min_inliers: usize,
pub max_iters: usize,
pub remove_unverified: bool,
pub seed_min_decode_confidence: f32,
}Expand description
Structural ID verification and correction using hex neighborhood consensus.
Runs after fit-decode and deduplication, before the global RANSAC filter. Uses the board’s hex lattice geometry to detect wrong IDs (misidentified by the codebook decoder) and recover missing ones. Each marker’s correct ID is implied by its decoded neighbors’ positions: neighbors vote on the expected board position of the query marker using a local affine transform (or scale estimate when fewer than 3 neighbors are available).
Markers that cannot be verified or corrected have their IDs cleared
(id = None) or are removed entirely depending on remove_unverified.
This guarantees no wrong IDs reach the global filter or completion stages.
Fields§
§enable: boolEnable structural ID verification and correction.
auto_search_radius_outer_muls: Vec<f64>Local-scale staged search multipliers (one per recovery pass, sorted ascending).
The neighbor gate for pair (i, j) in each pass is:
dist_px(i,j) <= mul * 0.5 * (outer_radius_px_i + outer_radius_px_j).
Multiple multipliers produce a staged sweep from tight to loose. A single-element
Vec produces one pass (equivalent to the old search_radius_outer_mul).
consistency_outer_mul: f64Local-scale neighborhood multiplier for consistency checks.
consistency_min_neighbors: usizeMinimum number of local neighbors required to run consistency checks. Default: 1 (any single neighbor provides enough evidence).
consistency_min_support_edges: usizeMinimum number of one-hop board-neighbor support edges required for a non-soft-locked ID to remain assigned. Default: 1.
consistency_max_contradiction_frac: f32Maximum allowed contradiction fraction in local consistency checks.
soft_lock_exact_decode: boolWhen enabled, exact decodes (best_dist=0, margin>=2) are soft-locked:
they are not overridden during normal recovery and only cleared on
strict structural contradiction.
min_votes: usizeMinimum number of independent neighbor votes required to accept a candidate ID for a marker that already has an id. Default: 2.
min_votes_recover: usizeMinimum votes to assign an ID to a marker that currently has id = None.
A single high-confidence trusted neighbor is sufficient evidence when there is no existing wrong ID to protect. Default: 1.
min_vote_weight_frac: f32Minimum fraction of total weighted votes the winning candidate must receive. Default: 0.55 (slight majority).
h_reproj_gate_px: f64H-reprojection gate (pixels) used by rough-homography fallback assignments. Intentionally loose to tolerate significant distortion.
homography_fallback_enable: boolEnable rough-homography fallback for unresolved markers.
homography_min_trusted: usizeMinimum trusted markers required before attempting homography fallback.
homography_min_inliers: usizeMinimum inliers required for fallback homography RANSAC acceptance.
max_iters: usizeMaximum number of iterative correction passes. Default: 5.
remove_unverified: boolWhen true, remove markers that cannot be verified or corrected.
When false (default), clear their ID (set to None) and keep the
detection so its geometry is available for debugging.
seed_min_decode_confidence: f32Minimum decode confidence for bootstrapping trusted seeds when no homography is available. Default: 0.7.
Trait Implementations§
Source§impl Clone for IdCorrectionConfig
impl Clone for IdCorrectionConfig
Source§fn clone(&self) -> IdCorrectionConfig
fn clone(&self) -> IdCorrectionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IdCorrectionConfig
impl Debug for IdCorrectionConfig
Source§impl Default for IdCorrectionConfig
impl Default for IdCorrectionConfig
Source§impl<'de> Deserialize<'de> for IdCorrectionConfigwhere
IdCorrectionConfig: Default,
impl<'de> Deserialize<'de> for IdCorrectionConfigwhere
IdCorrectionConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for IdCorrectionConfig
impl RefUnwindSafe for IdCorrectionConfig
impl Send for IdCorrectionConfig
impl Sync for IdCorrectionConfig
impl Unpin for IdCorrectionConfig
impl UnsafeUnpin for IdCorrectionConfig
impl UnwindSafe for IdCorrectionConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().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.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.