Struct opencv_ros_camera::RosCameraInfo
source · 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: usizeThe width of the image sensor (in pixels).
image_height: usizeThe height of the image sensor (in pixels).
camera_name: StringThe name of the camera
camera_matrix: RosMatrix<R>The camera matrix k.
distortion_model: StringThe 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> 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.