Class CObservationStereoImages

Inheritance Relationships

Base Type

Class Documentation

class CObservationStereoImages : public mrpt::obs::CObservation

Observation class for either a pair of left+right or left+disparity images from a stereo camera.

To find whether the observation contains a right image and/or a disparity image, see the fields hasImageDisparity and hasImageRight, respectively. This figure illustrates the coordinate frames involved in this class:

See also

CObservation

Note

The images stored in this class can be raw or undistorted images. In the latter case, the “distortion” params of the corresponding “leftCamera” and “rightCamera” fields should be all zeros.

Main observation data members

mrpt::img::CImage imageLeft

Image from the left camera (this image will be ALWAYS present)

mrpt::img::CImage imageRight

Image from the right camera, only contains a valid image if hasImageRight == true.

mrpt::img::CImage imageDisparity

Disparity image, only contains a valid image if hasImageDisparity == true. The relation between the actual disparity and pixels and each value in this image is… ???????????

bool hasImageDisparity = {false}

Whether imageDisparity actually contains data (Default upon construction: false)

bool hasImageRight = {false}

Whether imageRight actually contains data (Default upon construction: true)

mrpt::img::TCamera leftCamera

Parameters for the left/right cameras: individual intrinsic and distortion parameters of the cameras. See the tutorial for a discussion of these parameters.

mrpt::img::TCamera rightCamera
mrpt::poses::CPose3DQuat cameraPose

The pose of the LEFT camera, relative to the robot.

mrpt::poses::CPose3DQuat rightCameraPose

The pose of the right camera, relative to the left one: Note that using the conventional reference coordinates for the left camera (x points to the right, y down), the “right” camera is situated at position (BL, 0, 0) with yaw=pitch=roll=0, where BL is the BASELINE.

void getStereoCameraParams(mrpt::img::TStereoCamera &out_params) const

Populates a TStereoCamera structure with the parameters in leftCamera, rightCamera and rightCameraPose

inline mrpt::img::TStereoCamera getStereoCameraParams() const
void setStereoCameraParams(const mrpt::img::TStereoCamera &in_params)

Sets leftCamera, rightCamera and rightCameraPose from a TStereoCamera structure

bool areImagesRectified() const

This method only checks whether ALL the distortion parameters in leftCamera are set to zero, which is the convention in MRPT to denote that this pair of stereo images has been rectified.

Public Functions

CObservationStereoImages() = default
inline virtual void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override

A general method to retrieve the sensor pose on the robot. Note that most sensors will return a full (6D) CPose3D, but see the derived classes for more details or special cases.

See also

setSensorPose

inline virtual void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override

A general method to change the sensor pose on the robot. Note that most sensors will use the full (6D) CPose3D, but see the derived classes for more details or special cases.

See also

getSensorPose

virtual void getDescriptionAsText(std::ostream &o) const override

Build a detailed, multi-line textual description of the observation contents and dump it to the output stream.

Note

If overried by derived classes, call base CObservation::getDescriptionAsText() first to show common information.

Note

This is the text that appears in RawLogViewer when selecting an object in the dataset

void swap(CObservationStereoImages &o)

Do an efficient swap of all data members of this object with “o”.

virtual void load_impl() const override