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::obs
21 {
22 /** Declares a class derived from "CObservation" that encapsules an image from a
23  camera, whose relative pose to robot is also stored.
24  The next figure illustrate the coordinates reference systems involved in
25  this class:<br>
26  <center>
27  <img src="CObservationImage_figRefSystem.png">
28  </center>
29  *
30  * \sa CObservation, CObservationStereoImages
31  * \ingroup mrpt_obs_grp
32  */
34 {
36  // This must be added for declaration of MEX-related functions
38 
39  public:
40  /** Constructor.
41  * \param iplImage An OpenCV "IplImage*" object with the image to be loaded
42  * in the member "image", or nullptr (default) for an empty image.
43  *
44  */
45  CObservationImage(void* iplImage = nullptr);
46 
47  /** The pose of the camera on the robot
48  */
50 
51  /** Intrinsic and distortion parameters of the camera.
52  * See the <a href="http://www.mrpt.org/Camera_Parameters" >tutorial</a>
53  * for a discussion of these parameters.
54  */
56 
57  /** The image captured by the camera, that is, the main piece of information
58  * of this observation. */
60 
61  /** Computes the rectified (un-distorted) image, using the embeded
62  * distortion parameters.
63  */
64  void getRectifiedImage(mrpt::img::CImage& out_img) const;
65 
66  // See base class docs
67  void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const override
68  {
69  out_sensorPose = cameraPose;
70  }
71  void setSensorPose(const mrpt::poses::CPose3D& newSensorPose) override
72  {
73  cameraPose = newSensorPose;
74  }
75  void getDescriptionAsText(std::ostream& o) const override;
76 
77 }; // End of class def.
78 
79 }
80 // Add for declaration of mexplus::from template specialization
82 
83 #endif
84 
85 
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...
This namespace contains representation of robot actions and observations.
Structure to hold the parameters of a pinhole camera model.
Definition: TCamera.h:27
mrpt::img::TCamera cameraParams
Intrinsic and distortion parameters of the camera.
#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:86
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: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020