pub struct PointWorldFrameWithSumReprojError<R: RealField + Copy> {
pub point: PointWorldFrame<R>,
pub cum_reproj_dist: R,
pub mean_reproj_dist: R,
pub reproj_dists: Vec<R>,
}Expand description
A 3D world point with associated reprojection error statistics.
This structure extends PointWorldFrame with additional information about
how well the reconstructed 3D point reprojects back to the original 2D
observations in each camera. This is useful for quality assessment and
outlier detection in 3D reconstruction.
§Reprojection Error
Reprojection error measures how far the reconstructed 3D point projects from the original 2D observations when projected back into each camera. Lower values indicate better reconstruction quality.
§Fields
point: The reconstructed 3D point in world coordinatescum_reproj_dist: Sum of reprojection distances across all camerasmean_reproj_dist: Average reprojection distance per camerareproj_dists: Individual reprojection distance for each camera
§Example
use braid_mvg::{PointWorldFrame, PointWorldFrameWithSumReprojError};
use nalgebra::Point3;
let point = PointWorldFrame { coords: Point3::new(1.0, 2.0, 3.0) };
let errors = vec![0.5, 0.3, 0.8]; // reprojection errors for 3 cameras
let point_with_error = PointWorldFrameWithSumReprojError::new(point, errors);
println!("Mean reprojection error: {:.3}", point_with_error.mean_reproj_dist);Fields§
§point: PointWorldFrame<R>The reconstructed 3D point in world coordinates.
cum_reproj_dist: RSum of reprojection distances from all cameras.
mean_reproj_dist: RAverage reprojection distance per camera.
reproj_dists: Vec<R>Individual reprojection distances for each camera.
Implementations§
Source§impl<R: RealField + Copy> PointWorldFrameWithSumReprojError<R>
impl<R: RealField + Copy> PointWorldFrameWithSumReprojError<R>
Sourcepub fn new(point: PointWorldFrame<R>, reproj_dists: Vec<R>) -> Self
pub fn new(point: PointWorldFrame<R>, reproj_dists: Vec<R>) -> Self
Create a new point with reprojection error statistics.
This constructor automatically computes the cumulative and mean reprojection errors from the individual camera errors.
§Arguments
point- The 3D point in world coordinatesreproj_dists- Vector of reprojection distances, one per camera
§Returns
A new instance with computed error statistics
§Example
use braid_mvg::{PointWorldFrame, PointWorldFrameWithSumReprojError};
use nalgebra::Point3;
let point = PointWorldFrame { coords: Point3::new(0.0, 0.0, 5.0) };
let errors = vec![0.1, 0.2, 0.15]; // errors from 3 cameras
let result = PointWorldFrameWithSumReprojError::new(point, errors);
assert!((result.mean_reproj_dist - 0.15f64).abs() < 1e-10);
assert!((result.cum_reproj_dist - 0.45f64).abs() < 1e-10);Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for PointWorldFrameWithSumReprojError<R>where
R: Freeze,
impl<R> RefUnwindSafe for PointWorldFrameWithSumReprojError<R>where
R: RefUnwindSafe,
impl<R> Send for PointWorldFrameWithSumReprojError<R>
impl<R> Sync for PointWorldFrameWithSumReprojError<R>
impl<R> Unpin for PointWorldFrameWithSumReprojError<R>where
R: Unpin,
impl<R> UnwindSafe for PointWorldFrameWithSumReprojError<R>where
R: 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<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<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<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.