[−][src]Struct opencv_ros_camera::RosOpenCvIntrinsics
A perspective camera model with distortion compatible with OpenCV and ROS.
This camera model is compatible with OpenCV and ROS, including stereo
rectification and Brown-Conrady
distortion. To load
from a ROS YAML file, see the from_ros_yaml
function.
See this page for an expanded definition of the parameters.
To convert from a
NamedIntrinsicParameters
struct,
use its
intrinsics
field.
Fields
is_opencv_compatible: bool
If these intrinsics have zero skew, they are "opencv compatible" and this is true
.
p: MatrixMN<R, U3, U4>
The intrinsic parameter matrix P
.
k: MatrixN<R, U3>
The intrinsic parameter matrix K
. Scaled from P
.
distortion: Distortion<R>
The non-linear distortion parameters D
specifying image warping.
rect: MatrixN<R, U3>
The stereo rectification matrix.
Implementations
impl<R: RealField> RosOpenCvIntrinsics<R>
[src]
pub fn from_components(
p: MatrixMN<R, U3, U4>,
k: MatrixN<R, U3>,
distortion: Distortion<R>,
rect: MatrixN<R, U3>
) -> Result<Self>
[src]
p: MatrixMN<R, U3, U4>,
k: MatrixN<R, U3>,
distortion: Distortion<R>,
rect: MatrixN<R, U3>
) -> Result<Self>
Construct from the individual components
Returns Err(Error::InvalidInput)
if rect
cannot be inverted.
pub fn from_params(fx: R, skew: R, fy: R, cx: R, cy: R) -> Self
[src]
create a simple set of intrinsic parameters
pub fn from_params_with_distortion(
fx: R,
skew: R,
fy: R,
cx: R,
cy: R,
distortion: Distortion<R>
) -> Self
[src]
fx: R,
skew: R,
fy: R,
cx: R,
cy: R,
distortion: Distortion<R>
) -> Self
create intrinsic parameters with distorion
pub fn distort<NPTS, IN>(
&self,
undistorted: &UndistortedPixels<R, NPTS, IN>
) -> Pixels<R, NPTS, Owned<R, NPTS, U2>> where
NPTS: Dim,
IN: Storage<R, NPTS, U2>,
DefaultAllocator: Allocator<R, NPTS, U2>,
[src]
&self,
undistorted: &UndistortedPixels<R, NPTS, IN>
) -> Pixels<R, NPTS, Owned<R, NPTS, U2>> where
NPTS: Dim,
IN: Storage<R, NPTS, U2>,
DefaultAllocator: Allocator<R, NPTS, U2>,
project multiple pixels to 3D camera coords at a given distance from cam center
pub fn undistort<NPTS, IN>(
&self,
distorted: &Pixels<R, NPTS, IN>
) -> UndistortedPixels<R, NPTS, Owned<R, NPTS, U2>> where
NPTS: Dim,
IN: Storage<R, NPTS, U2>,
DefaultAllocator: Allocator<R, NPTS, U2>,
[src]
&self,
distorted: &Pixels<R, NPTS, IN>
) -> UndistortedPixels<R, NPTS, Owned<R, NPTS, U2>> where
NPTS: Dim,
IN: Storage<R, NPTS, U2>,
DefaultAllocator: Allocator<R, NPTS, U2>,
project multiple pixels to 3D camera coords at a given distance from cam center
pub fn camera_to_undistorted_pixel<IN, NPTS>(
&self,
camera: &Points<CameraFrame, R, NPTS, IN>
) -> UndistortedPixels<R, NPTS, Owned<R, NPTS, U2>> where
IN: Storage<R, NPTS, U3>,
NPTS: Dim,
DefaultAllocator: Allocator<R, NPTS, U2>,
DefaultAllocator: Allocator<R, U1, U2>,
[src]
&self,
camera: &Points<CameraFrame, R, NPTS, IN>
) -> UndistortedPixels<R, NPTS, Owned<R, NPTS, U2>> where
IN: Storage<R, NPTS, U3>,
NPTS: Dim,
DefaultAllocator: Allocator<R, NPTS, U2>,
DefaultAllocator: Allocator<R, U1, U2>,
Convert 3D coordinates in the CameraFrame
to undistorted pixel coordinates.
pub fn undistorted_pixel_to_camera<IN, NPTS>(
&self,
undistorteds: &UndistortedPixels<R, NPTS, IN>
) -> RayBundle<CameraFrame, SharedOriginRayBundle<R>, R, NPTS, Owned<R, NPTS, U3>> where
IN: Storage<R, NPTS, U2>,
NPTS: Dim,
DefaultAllocator: Allocator<R, NPTS, U3>,
DefaultAllocator: Allocator<R, U1, U2>,
[src]
&self,
undistorteds: &UndistortedPixels<R, NPTS, IN>
) -> RayBundle<CameraFrame, SharedOriginRayBundle<R>, R, NPTS, Owned<R, NPTS, U3>> where
IN: Storage<R, NPTS, U2>,
NPTS: Dim,
DefaultAllocator: Allocator<R, NPTS, U3>,
DefaultAllocator: Allocator<R, U1, U2>,
Convert undistorted pixel coordinates to 3D coordinates in the CameraFrame
.
Trait Implementations
impl<R: Clone + RealField> Clone for RosOpenCvIntrinsics<R>
[src]
fn clone(&self) -> RosOpenCvIntrinsics<R>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<R: Debug + RealField> Debug for RosOpenCvIntrinsics<R>
[src]
impl<'de, R: RealField + Deserialize<'de>> Deserialize<'de> for RosOpenCvIntrinsics<R>
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl<R: RealField> From<IntrinsicParametersPerspective<R>> for RosOpenCvIntrinsics<R>
[src]
fn from(orig: IntrinsicParametersPerspective<R>) -> Self
[src]
impl<R: RealField> IntrinsicParameters<R> for RosOpenCvIntrinsics<R>
[src]
type BundleType = SharedOriginRayBundle<R>
What type of ray bundle is returned when projecting pixels to rays.
fn pixel_to_camera<IN, NPTS>(
&self,
pixels: &Pixels<R, NPTS, IN>
) -> RayBundle<CameraFrame, Self::BundleType, R, NPTS, Owned<R, NPTS, U3>> where
Self::BundleType: Bundle<R>,
IN: Storage<R, NPTS, U2>,
NPTS: Dim,
DefaultAllocator: Allocator<R, NPTS, U2>,
DefaultAllocator: Allocator<R, NPTS, U3>,
DefaultAllocator: Allocator<R, U1, U2>,
[src]
&self,
pixels: &Pixels<R, NPTS, IN>
) -> RayBundle<CameraFrame, Self::BundleType, R, NPTS, Owned<R, NPTS, U3>> where
Self::BundleType: Bundle<R>,
IN: Storage<R, NPTS, U2>,
NPTS: Dim,
DefaultAllocator: Allocator<R, NPTS, U2>,
DefaultAllocator: Allocator<R, NPTS, U3>,
DefaultAllocator: Allocator<R, U1, U2>,
fn camera_to_pixel<IN, NPTS>(
&self,
camera: &Points<CameraFrame, R, NPTS, IN>
) -> Pixels<R, NPTS, Owned<R, NPTS, U2>> where
IN: Storage<R, NPTS, U3>,
NPTS: Dim,
DefaultAllocator: Allocator<R, NPTS, U2>,
[src]
&self,
camera: &Points<CameraFrame, R, NPTS, IN>
) -> Pixels<R, NPTS, Owned<R, NPTS, U2>> where
IN: Storage<R, NPTS, U3>,
NPTS: Dim,
DefaultAllocator: Allocator<R, NPTS, U2>,
impl<R: PartialEq + RealField> PartialEq<RosOpenCvIntrinsics<R>> for RosOpenCvIntrinsics<R>
[src]
fn eq(&self, other: &RosOpenCvIntrinsics<R>) -> bool
[src]
fn ne(&self, other: &RosOpenCvIntrinsics<R>) -> bool
[src]
impl<R: RealField + Serialize> Serialize for RosOpenCvIntrinsics<R>
[src]
impl<R: RealField> StructuralPartialEq for RosOpenCvIntrinsics<R>
[src]
Auto Trait Implementations
impl<R> RefUnwindSafe for RosOpenCvIntrinsics<R> where
R: RefUnwindSafe + Scalar,
R: RefUnwindSafe + Scalar,
impl<R> Send for RosOpenCvIntrinsics<R> where
R: Scalar,
R: Scalar,
impl<R> Sync for RosOpenCvIntrinsics<R> where
R: Scalar,
R: Scalar,
impl<R> Unpin for RosOpenCvIntrinsics<R> where
R: Scalar + Unpin,
R: Scalar + Unpin,
impl<R> UnwindSafe for RosOpenCvIntrinsics<R> where
R: Scalar + UnwindSafe,
R: Scalar + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,