pub struct RosOpenCvIntrinsics<R: RealField> {
    pub is_opencv_compatible: bool,
    pub p: SMatrix<R, 3, 4>,
    pub k: SMatrix<R, 3, 3>,
    pub distortion: Distortion<R>,
    pub rect: SMatrix<R, 3, 3>,
    /* private fields */
}
Expand description

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.

See the module-level documentation for more information.

Fields

is_opencv_compatible: bool

If these intrinsics have zero skew, they are “opencv compatible” and this is true.

p: SMatrix<R, 3, 4>

The intrinsic parameter matrix P.

k: SMatrix<R, 3, 3>

The intrinsic parameter matrix K. Scaled from P.

distortion: Distortion<R>

The non-linear distortion parameters D specifying image warping.

rect: SMatrix<R, 3, 3>

The stereo rectification matrix.

Implementations

Construct intrinsics from raw components.

Returns Err(Error::InvalidInput) if rect cannot be inverted.

Construct intrinsics from individual parameters with no distortion.

fx and fy are the horizontal and vertical focal lengths. skew is the pixel skew (typically near zero). cx and cy is the center of the optical axis in pixel coordinates.

Construct intrinsics from individual parameters.

fx and fy are the horizontal and vertical focal lengths. skew is the pixel skew (typically near zero). cx and cy is the center of the optical axis in pixel coordinates. distortion is a vector of the distortion terms.

Convert undistorted pixel coordinates to distorted pixel coordinates.

This will take coordinates from, e.g. a linear camera model, warp them into their distorted counterparts. This distortion thus models the action of a real lens.

Convert distorted pixel coordinates to undistorted pixel coordinates.

This will take distorted coordinates from, e.g. detections from a real camera image, and undo the effect of the distortion model. This “undistortion” thus converts coordinates from a real lens into coordinates that can be used with a linear camera model.

This method calls undistort_ext using the default termination criteria.

Convert distorted pixel coordinates to undistorted pixel coordinates.

This will take distorted coordinates from, e.g. detections from a real camera image, and undo the effect of the distortion model. This “undistortion” thus converts coordinates from a real lens into coordinates that can be used with a linear camera model.

If the termination criteria are not specified, the default of five iterations is used.

Convert 3D coordinates in CameraFrame to undistorted pixel coords.

Convert undistorted pixel coordinates to 3D coords in the CameraFrame.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Converts to this type from the input type.

What type of ray bundle is returned when projecting pixels to rays.

project pixels to camera coords

project camera coords to pixel coordinates

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.