Struct flydra_mvg::MultiCamera
source · pub struct MultiCamera<R: RealField + Copy + Default + Serialize> { /* private fields */ }
Expand description
A camera which may be looking at water
Note that we specifically do not have the methods
project_distorted_pixel_to_3d_with_dist
and project_pixel_to_3d_with_dist
because these are dangerous in the sense that depending on dist
, the
resulting pixel may be subject to refraction. Instead, we have only the
ray based methods.
Implementations§
source§impl<R: RealField + Copy + Default + Serialize> MultiCamera<R>
impl<R: RealField + Copy + Default + Serialize> MultiCamera<R>
pub fn to_cam(self) -> Camera<R>
pub fn project_pixel_to_ray(&self, pt: &UndistortedPixel<R>) -> Ray
pub fn project_distorted_pixel_to_ray(&self, pt: &DistortedPixel<R>) -> Ray
pub fn project_ray_to_pixel(&self, ray: &Ray) -> UndistortedPixel<R>
pub fn project_ray_to_distorted_pixel(&self, ray: &Ray) -> DistortedPixel<R>
sourcepub fn project_3d_to_ray(&self, pt3d: &PointWorldFrame<R>) -> Ray
pub fn project_3d_to_ray(&self, pt3d: &PointWorldFrame<R>) -> Ray
projects a 3D point to a ray
If the point is under water, the ray is in the direction the camera sees it (not the straight-line direction).
pub fn linearize_numerically_at( &self, center: &PointWorldFrame<R>, delta: R ) -> Result<OMatrix<R, U2, U3>>
pub fn project_3d_to_pixel( &self, pt3d: &PointWorldFrame<R> ) -> UndistortedPixel<R>
pub fn project_3d_to_distorted_pixel( &self, pt3d: &PointWorldFrame<R> ) -> DistortedPixel<R>
pub fn extrinsics(&self) -> &ExtrinsicParameters<R>
sourcepub fn do_not_use_intrinsics(&self) -> &RosOpenCvIntrinsics<R>
pub fn do_not_use_intrinsics(&self) -> &RosOpenCvIntrinsics<R>
Return the intrinsic parameters, but probably does not do what you want.
Commenting out for now. Probably does not do what you think it does. In particular, since we may have a refractive boundary, cannot just simply map coordinates between 2d pixel coordinate and 3D ray, because after the boundary, the ray will be different.
pub fn undistort(&self, a: &DistortedPixel<R>) -> UndistortedPixel<R>
pub fn width(&self) -> usize
pub fn height(&self) -> usize
pub fn name(&self) -> &str
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for MultiCamera<R>where
R: Freeze,
impl<R> RefUnwindSafe for MultiCamera<R>where
R: RefUnwindSafe,
impl<R> Send for MultiCamera<R>
impl<R> Sync for MultiCamera<R>
impl<R> Unpin for MultiCamera<R>where
R: Unpin,
impl<R> UnwindSafe for MultiCamera<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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§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
.source§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
.source§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.source§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.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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<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.