pub struct RosCameraInfo<R: RealField> {
pub image_width: usize,
pub image_height: usize,
pub camera_name: String,
pub camera_matrix: RosMatrix<R>,
pub distortion_model: String,
pub distortion_coefficients: RosMatrix<R>,
pub rectification_matrix: RosMatrix<R>,
pub projection_matrix: RosMatrix<R>,
}
Expand description
Camera calibration info as saved by ROS.
This is a low-level structure only intended for interoperation with ROS. To
convert to a more Rust-friedly type, use
NamedIntrinsicParameters::try_from()
.
To create an instance of this structure from a
NamedIntrinsicParameters
struct,
use RosCameraInfo::from()
.
This structure implements the format written by writeCalibrationYml
in ROS
code camera_calibration_parsers/src/parse_yml.cpp
. It can be serialized or
deserialized with serde. (It is strange that writeCalibrationYml has its own
serializer rather than using the ROS message type
sensor_msgs/CameraInfo
.)
Fields§
§image_width: usize
The width of the image sensor (in pixels).
image_height: usize
The height of the image sensor (in pixels).
camera_name: String
The name of the camera
camera_matrix: RosMatrix<R>
The camera matrix k
.
distortion_model: String
The name of the distortion model. Only “plumb_bob” is supported.
distortion_coefficients: RosMatrix<R>
The coefficients of the distortion parameters.
rectification_matrix: RosMatrix<R>
The stereo rectification matrix.
projection_matrix: RosMatrix<R>
The projection matrix p
.
Trait Implementations§
Source§impl<R: Clone + RealField> Clone for RosCameraInfo<R>
impl<R: Clone + RealField> Clone for RosCameraInfo<R>
Source§fn clone(&self) -> RosCameraInfo<R>
fn clone(&self) -> RosCameraInfo<R>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'de, R> Deserialize<'de> for RosCameraInfo<R>where
R: Deserialize<'de> + RealField,
impl<'de, R> Deserialize<'de> for RosCameraInfo<R>where
R: Deserialize<'de> + RealField,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<R: RealField> From<NamedIntrinsicParameters<R>> for RosCameraInfo<R>
impl<R: RealField> From<NamedIntrinsicParameters<R>> for RosCameraInfo<R>
Source§fn from(orig: NamedIntrinsicParameters<R>) -> Self
fn from(orig: NamedIntrinsicParameters<R>) -> Self
Source§impl<R> Serialize for RosCameraInfo<R>
impl<R> Serialize for RosCameraInfo<R>
Source§impl<R: RealField> TryFrom<RosCameraInfo<R>> for NamedIntrinsicParameters<R>
impl<R: RealField> TryFrom<RosCameraInfo<R>> for NamedIntrinsicParameters<R>
Source§fn try_from(ros_camera: RosCameraInfo<R>) -> Result<NamedIntrinsicParameters<R>>
fn try_from(ros_camera: RosCameraInfo<R>) -> Result<NamedIntrinsicParameters<R>>
Auto Trait Implementations§
impl<R> Freeze for RosCameraInfo<R>
impl<R> RefUnwindSafe for RosCameraInfo<R>where
R: RefUnwindSafe,
impl<R> Send for RosCameraInfo<R>
impl<R> Sync for RosCameraInfo<R>
impl<R> Unpin for RosCameraInfo<R>where
R: Unpin,
impl<R> UnwindSafe for RosCameraInfo<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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.