Main MRPT website > C++ reference for MRPT 1.9.9
CObservationImage.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef CObservationImage_H
10 #define CObservationImage_H
11 
13 #include <mrpt/img/CImage.h>
14 #include <mrpt/img/TCamera.h>
15 #include <mrpt/math/CMatrix.h>
16 #include <mrpt/obs/CObservation.h>
17 #include <mrpt/poses/CPose3D.h>
18 #include <mrpt/poses/CPose2D.h>
19 
20 namespace mrpt
21 {
22 namespace obs
23 {
24 /** Declares a class derived from "CObservation" that encapsules an image from a
25  camera, whose relative pose to robot is also stored.
26  The next figure illustrate the coordinates reference systems involved in
27  this class:<br>
28  <center>
29  <img src="CObservationImage_figRefSystem.png">
30  </center>
31  *
32  * \sa CObservation, CObservationStereoImages
33  * \ingroup mrpt_obs_grp
34  */
36 {
38  // This must be added for declaration of MEX-related functions
40 
41  public:
42  /** Constructor.
43  * \param iplImage An OpenCV "IplImage*" object with the image to be loaded
44  * in the member "image", or nullptr (default) for an empty image.
45  *
46  */
47  CObservationImage(void* iplImage = nullptr);
48 
49  /** The pose of the camera on the robot
50  */
52 
53  /** Intrinsic and distortion parameters of the camera.
54  * See the <a href="http://www.mrpt.org/Camera_Parameters" >tutorial</a>
55  * for a discussion of these parameters.
56  */
58 
59  /** The image captured by the camera, that is, the main piece of information
60  * of this observation. */
62 
63  /** Computes the rectified (un-distorted) image, using the embeded
64  * distortion parameters.
65  */
66  void getRectifiedImage(mrpt::img::CImage& out_img) const;
67 
68  // See base class docs
69  void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const override
70  {
71  out_sensorPose = cameraPose;
72  }
73  void setSensorPose(const mrpt::poses::CPose3D& newSensorPose) override
74  {
75  cameraPose = newSensorPose;
76  }
77  void getDescriptionAsText(std::ostream& o) const override;
78 
79 }; // End of class def.
80 
81 } // End of namespace
82 } // End of namespace
83 
84 // Add for declaration of mexplus::from template specialization
86 
87 #endif
mrpt::obs::CObservationImage::cameraPose
mrpt::poses::CPose3D cameraPose
The pose of the camera on the robot.
Definition: CObservationImage.h:51
mrpt::obs::CObservationImage::getDescriptionAsText
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
Definition: CObservationImage.cpp:131
CMatrix.h
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::obs::CObservationImage::image
mrpt::img::CImage image
The image captured by the camera, that is, the main piece of information of this observation.
Definition: CObservationImage.h:61
CPose2D.h
TCamera.h
mrpt::obs::CObservationImage::setSensorPose
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
Definition: CObservationImage.h:73
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
mrpt::img::TCamera
Structure to hold the parameters of a pinhole camera model.
Definition: TCamera.h:29
DECLARE_MEXPLUS_FROM
#define DECLARE_MEXPLUS_FROM(complete_type)
This must be inserted if a custom conversion method for MEX API is implemented in the class.
Definition: CSerializable.h:140
mrpt::img::CImage
A class for storing images as grayscale or RGB bitmaps.
Definition: img/CImage.h:130
CPose3D.h
CObservation.h
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:102
mrpt::obs::CObservationImage::getRectifiedImage
void getRectifiedImage(mrpt::img::CImage &out_img) const
Computes the rectified (un-distorted) image, using the embeded distortion parameters.
Definition: CObservationImage.cpp:126
mrpt::obs::CObservation
Declares a class that represents any robot's observation.
Definition: CObservation.h:43
mrpt::obs::CObservationImage::CObservationImage
CObservationImage(void *iplImage=nullptr)
Constructor.
Definition: CObservationImage.cpp:30
CImage.h
CSerializable.h
mrpt::obs::CObservationImage::getSensorPose
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
Definition: CObservationImage.h:69
mrpt::obs::CObservationImage
Declares a class derived from "CObservation" that encapsules an image from a camera,...
Definition: CObservationImage.h:35
DECLARE_MEX_CONVERSION
#define DECLARE_MEX_CONVERSION
This must be inserted if a custom conversion method for MEX API is implemented in the class.
Definition: CSerializable.h:131
mrpt::obs::CObservationImage::cameraParams
mrpt::img::TCamera cameraParams
Intrinsic and distortion parameters of the camera.
Definition: CObservationImage.h:57



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST