#[non_exhaustive]pub struct HomographyQuality<F: Float = f32> {
pub max_singular_value: F,
pub min_singular_value: F,
pub condition: F,
pub determinant: F,
}Expand description
Numerical quality of a homography matrix.
Computed from the SVD of the 3×3 matrix H. Use these fields to gate
downstream consumers (mesh cells, validators) against degenerate
solutions: a near-singular H arises when the source or destination
quad has three near-collinear points and would lead to large
re-projection error away from the fitted points.
condition is a unitless ratio; the other two are in the same units
as H’s entries.
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.max_singular_value: FLargest singular value of H.
min_singular_value: FSmallest singular value of H. Approaches zero as the source or
destination quad degenerates (three collinear points).
condition: FCondition number max_singular_value / min_singular_value. Healthy
homographies for calibration targets sit below ~100; values above
~10⁴ indicate the fit is dominated by noise on the smallest
principal direction.
determinant: FDeterminant of H. Sign indicates orientation; |det| decays to
zero as the map becomes singular.
Implementations§
Source§impl<F: Float> HomographyQuality<F>
impl<F: Float> HomographyQuality<F>
Sourcepub fn from_homography(h: &Homography<F>) -> Self
pub fn from_homography(h: &Homography<F>) -> Self
Compute quality from a homography matrix.
Sourcepub fn is_ill_conditioned(&self, min_singular_value_threshold: F) -> bool
pub fn is_ill_conditioned(&self, min_singular_value_threshold: F) -> bool
true when min_singular_value < threshold. Useful as a single
boolean gate for mesh::from_corners_with_min_singular_value and
similar opt-in conditioning checks.
Trait Implementations§
Source§impl<F: Clone + Float> Clone for HomographyQuality<F>
impl<F: Clone + Float> Clone for HomographyQuality<F>
Source§fn clone(&self) -> HomographyQuality<F>
fn clone(&self) -> HomographyQuality<F>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<F: Copy + Float> Copy for HomographyQuality<F>
Auto Trait Implementations§
impl<F> Freeze for HomographyQuality<F>where
F: Freeze,
impl<F> RefUnwindSafe for HomographyQuality<F>where
F: RefUnwindSafe,
impl<F> Send for HomographyQuality<F>
impl<F> Sync for HomographyQuality<F>
impl<F> Unpin for HomographyQuality<F>where
F: Unpin,
impl<F> UnsafeUnpin for HomographyQuality<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for HomographyQuality<F>where
F: UnwindSafe,
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
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.