pub struct DecodeMetrics {
pub observed_word: u16,
pub best_id: usize,
pub best_rotation: u8,
pub best_dist: u8,
pub margin: u8,
pub decode_confidence: f32,
}Expand description
Decode quality metrics for a detected marker.
Reports how confidently a 16-sector binary code was matched against the
active embedded codebook profile. A best_dist of 0 means an exact match;
margin measures how far the second-best codeword is (higher = more
confident).
Fields§
§observed_word: u16Raw 16-bit word sampled from the code band.
best_id: usizeBest-matching codebook entry index within the active profile.
best_rotation: u8Cyclic rotation (0–15 sectors) that produced the best match.
best_dist: u8Hamming distance (bit errors) to the best-matching codeword.
margin: u8Margin: second_best_dist - best_dist. Higher values indicate
a more reliable decode. A margin of 3 or more is typically very confident.
decode_confidence: f32Combined confidence heuristic in [0, 1].
Equals clamp(1 - dist/6) * clamp(margin / active_min_cyclic_dist).
A margin equal to the selected profile’s minimum cyclic Hamming distance
yields conf_margin = 1.0, so a perfect decode scores 1.0 regardless of
that profile’s density.
Trait Implementations§
Source§impl Clone for DecodeMetrics
impl Clone for DecodeMetrics
Source§fn clone(&self) -> DecodeMetrics
fn clone(&self) -> DecodeMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DecodeMetrics
impl Debug for DecodeMetrics
Source§impl<'de> Deserialize<'de> for DecodeMetrics
impl<'de> Deserialize<'de> for DecodeMetrics
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 DecodeMetrics
impl RefUnwindSafe for DecodeMetrics
impl Send for DecodeMetrics
impl Sync for DecodeMetrics
impl Unpin for DecodeMetrics
impl UnsafeUnpin for DecodeMetrics
impl UnwindSafe for DecodeMetrics
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<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.