Skip to main content

IdCorrectionConfig

Struct IdCorrectionConfig 

Source
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: bool

Enable 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: f64

Local-scale neighborhood multiplier for consistency checks.

§consistency_min_neighbors: usize

Minimum number of local neighbors required to run consistency checks. Default: 1 (any single neighbor provides enough evidence).

§consistency_min_support_edges: usize

Minimum number of one-hop board-neighbor support edges required for a non-soft-locked ID to remain assigned. Default: 1.

§consistency_max_contradiction_frac: f32

Maximum allowed contradiction fraction in local consistency checks.

§soft_lock_exact_decode: bool

When 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: usize

Minimum number of independent neighbor votes required to accept a candidate ID for a marker that already has an id. Default: 2.

§min_votes_recover: usize

Minimum 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: f32

Minimum fraction of total weighted votes the winning candidate must receive. Default: 0.55 (slight majority).

§h_reproj_gate_px: f64

H-reprojection gate (pixels) used by rough-homography fallback assignments. Intentionally loose to tolerate significant distortion.

§homography_fallback_enable: bool

Enable rough-homography fallback for unresolved markers.

§homography_min_trusted: usize

Minimum trusted markers required before attempting homography fallback.

§homography_min_inliers: usize

Minimum inliers required for fallback homography RANSAC acceptance.

§max_iters: usize

Maximum number of iterative correction passes. Default: 5.

§remove_unverified: bool

When 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: f32

Minimum decode confidence for bootstrapping trusted seeds when no homography is available. Default: 0.7.

Trait Implementations§

Source§

impl Clone for IdCorrectionConfig

Source§

fn clone(&self) -> IdCorrectionConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IdCorrectionConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for IdCorrectionConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for IdCorrectionConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for IdCorrectionConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,