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
Declares a class derived from "CObservation" that encapsules an image from a camera, whose relative pose to robot is also stored.
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
CObservationImage(void *iplImage=nullptr)
Constructor.
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
#define DECLARE_MEXPLUS_FROM(complete_type)
This must be inserted if a custom conversion method for MEX API is implemented in the class...
void getRectifiedImage(mrpt::img::CImage &out_img) const
Computes the rectified (un-distorted) image, using the embeded distortion parameters.
mrpt::img::CImage image
The image captured by the camera, that is, the main piece of information of this observation.
#define DECLARE_MEX_CONVERSION
This must be inserted if a custom conversion method for MEX API is implemented in the class...
Structure to hold the parameters of a pinhole camera model.
Definition: TCamera.h:29
mrpt::img::TCamera cameraParams
Intrinsic and distortion parameters of the camera.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:43
mrpt::poses::CPose3D cameraPose
The pose of the camera on the robot.
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
A class for storing images as grayscale or RGB bitmaps.
Definition: img/CImage.h:130



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at lun oct 28 00:14:14 CET 2019