#[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 more