#[non_exhaustive]pub struct CornerDescriptor {
pub x: f32,
pub y: f32,
pub response: f32,
pub axes: Option<[AxisEstimate; 2]>,
}Expand description
Describes a detected chessboard corner in full-resolution image coordinates.
§Axis polarity convention
Local chessboard corner intensity patterns have exact 180° symmetry,
so assigning an absolute [0, 2π) direction to any single axis ray
is not possible from ring-local data. Instead the two axes are
reported jointly:
axes[0].anglelies in[0, π)— the “line direction” of axis 1.axes[1].anglelies in(axes[0].angle, axes[0].angle + π) ⊂ [0, 2π).
Together they satisfy: rotating CCW (in the usual atan2(dy, dx)
sense — note: in image pixel coordinates with y-axis pointing down,
this is a clockwise visual rotation) from axes[0].angle toward
axes[1].angle traverses a dark sector of the corner. The
second half-turn (axes[0].angle + π → axes[1].angle + π) crosses
the second dark sector; the two remaining sectors are bright.
Each axis direction is signed as a f32 in [0, 2π); the axes are
not assumed orthogonal (holds up under projective warp).
All crate::OrientationMethod variants emit axes
under this same convention, so consumers may compare axes[0]
(e.g. for slot-parity matching between cardinal grid neighbours)
across methods without method-aware translation.
§Orientation skipped
axes is None when the per-corner orientation fit was
skipped — the dominant per-corner cost. Consumers that derive board
geometry themselves can disable it (the orientation method is None in
the detector configuration); position and response are still produced.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.x: f32Subpixel position in full-resolution image pixels.
y: f32Subpixel y position in full-resolution image pixels.
response: f32Raw, unnormalized detector response at the detected peak. For
the ChESS path this is R = SR − DR − 16·MR
(see chess_response_u8). Units are 8-bit
pixel sums; data-dependent. Do not interpret it as a probability,
a contrast, or a normalized strength.
axes: Option<[AxisEstimate; 2]>The two local grid axis directions with per-axis 1σ precision, or
None when the orientation fit was skipped (orientation disabled in
the detector configuration).
Implementations§
Source§impl CornerDescriptor
impl CornerDescriptor
Sourcepub fn new(
x: f32,
y: f32,
response: f32,
axes: [AxisEstimate; 2],
) -> CornerDescriptor
pub fn new( x: f32, y: f32, response: f32, axes: [AxisEstimate; 2], ) -> CornerDescriptor
Construct a CornerDescriptor with a fitted orientation.
Sourcepub fn without_axes(x: f32, y: f32, response: f32) -> CornerDescriptor
pub fn without_axes(x: f32, y: f32, response: f32) -> CornerDescriptor
Construct a CornerDescriptor with the orientation fit skipped, so
axes is None.
Trait Implementations§
Source§impl Clone for CornerDescriptor
impl Clone for CornerDescriptor
Source§fn clone(&self) -> CornerDescriptor
fn clone(&self) -> CornerDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CornerDescriptor
Auto Trait Implementations§
impl Freeze for CornerDescriptor
impl RefUnwindSafe for CornerDescriptor
impl Send for CornerDescriptor
impl Sync for CornerDescriptor
impl Unpin for CornerDescriptor
impl UnsafeUnpin for CornerDescriptor
impl UnwindSafe for CornerDescriptor
Blanket Implementations§
impl<T> Any for Twhere
T: Any,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
impl<T> CloneAny for T
impl<T> CloneAnySend for T
impl<T> CloneAnySendSync for T
impl<T> CloneAnySync for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more