#[non_exhaustive]pub enum OrientationMethod {
RingFit,
DiskFit,
}Expand description
Method used to fit the two grid axes at a detected corner.
Self::RingFit is the default. Self::DiskFit samples a larger
local support region and is intended for corners with strong
projective skew (axis separation far from 90°).
All variants emit axes[0] and axes[1] under the same canonical
convention documented on crate::detect::CornerDescriptor:
axes[0].angle ∈ [0, π), axes[1].angle ∈ (axes[0].angle, axes[0].angle + π), and the CCW arc (axes[0], axes[1]) is a dark
sector of the corner. Downstream consumers can therefore compare
axes[0] slot parity between corners regardless of which method
produced them.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RingFit
Fit the parametric two-axis chessboard intensity model
I(φ) = μ + A·tanh(β·sin(φ−θ₁))·tanh(β·sin(φ−θ₂)) to 16
ring samples via Gauss-Newton seeded from the 2nd-harmonic
orientation. Suspicious local minima are retried from a small
deterministic seed grid over the same 16 samples. When a
radius-10 descriptor ring is requested and still looks
suspicious, the canonical radius-5 ring is sampled as a cheap
safety check and used when it produces a valid contrast/residual
fit. Per-axis 1σ uncertainties are calibrated by a
piecewise-linear lookup table keyed on the contrast-relative
residual, bringing reported sigmas closer to the empirical RMSE.
This is the default method. Suitable for the full range of standard chessboard images.
DiskFit
Full-disk crossing-line estimator. Samples all image pixels in a
disk around the corner center and fits two possibly non-orthogonal
axes from the resulting gradient field. When local evidence is
weak or the ring fit already indicates a clean orthogonal corner,
falls back to Self::RingFit output transparently.
Use this when standard chessboards are imaged under strong
projective warp (axis separation far from 90°). It has higher
per-corner cost than RingFit; the lazy gate keeps the full disk
fit off clean orthogonal corners.
Output axes use the same canonical convention as Self::RingFit
— see the type-level doc comment above and
crate::detect::CornerDescriptor.
Trait Implementations§
Source§impl Clone for OrientationMethod
impl Clone for OrientationMethod
Source§fn clone(&self) -> OrientationMethod
fn clone(&self) -> OrientationMethod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OrientationMethod
impl Debug for OrientationMethod
Source§impl Default for OrientationMethod
impl Default for OrientationMethod
Source§fn default() -> OrientationMethod
fn default() -> OrientationMethod
Source§impl<'de> Deserialize<'de> for OrientationMethod
impl<'de> Deserialize<'de> for OrientationMethod
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OrientationMethod, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OrientationMethod, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for OrientationMethod
impl PartialEq for OrientationMethod
Source§fn eq(&self, other: &OrientationMethod) -> bool
fn eq(&self, other: &OrientationMethod) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for OrientationMethod
impl Serialize for OrientationMethod
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for OrientationMethod
impl StructuralPartialEq for OrientationMethod
Auto Trait Implementations§
impl Freeze for OrientationMethod
impl RefUnwindSafe for OrientationMethod
impl Send for OrientationMethod
impl Sync for OrientationMethod
impl Unpin for OrientationMethod
impl UnsafeUnpin for OrientationMethod
impl UnwindSafe for OrientationMethod
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,
§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§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().