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

Deserialize this value from the given Serde deserializer. Read more

Converts to this type from the input type.

Serialize this value into the given Serde serializer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.