Main MRPT website
>
C++ reference
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
mrpt
slam
CObservationImage.h
Go to the documentation of this file.
1
/* +---------------------------------------------------------------------------+
2
| The Mobile Robot Programming Toolkit (MRPT) C++ library |
3
| |
4
| http://www.mrpt.org/ |
5
| |
6
| Copyright (C) 2005-2012 University of Malaga |
7
| |
8
| This software was written by the Machine Perception and Intelligent |
9
| Robotics Lab, University of Malaga (Spain). |
10
| Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11
| |
12
| This file is part of the MRPT project. |
13
| |
14
| MRPT is free software: you can redistribute it and/or modify |
15
| it under the terms of the GNU General Public License as published by |
16
| the Free Software Foundation, either version 3 of the License, or |
17
| (at your option) any later version. |
18
| |
19
| MRPT is distributed in the hope that it will be useful, |
20
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
21
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22
| GNU General Public License for more details. |
23
| |
24
| You should have received a copy of the GNU General Public License |
25
| along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26
| |
27
+---------------------------------------------------------------------------+ */
28
#ifndef CObservationImage_H
29
#define CObservationImage_H
30
31
#include <
mrpt/utils/CSerializable.h
>
32
#include <
mrpt/utils/CImage.h
>
33
#include <
mrpt/utils/TCamera.h
>
34
#include <
mrpt/math/CMatrix.h
>
35
#include <
mrpt/slam/CObservation.h
>
36
#include <
mrpt/poses/CPose3D.h
>
37
#include <
mrpt/poses/CPose2D.h
>
38
39
namespace
mrpt
40
{
41
namespace
slam
42
{
43
using namespace
mrpt::utils;
44
using namespace
mrpt::math;
45
46
DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE
(
CObservationImage
,
CObservation
,
OBS_IMPEXP
)
47
48
/** Declares a class derived from "CObservation" that encapsules an image from a camera, whose relative pose to robot is also stored.
49
The next figure illustrate the coordinates reference systems involved in this class:<br>
50
<center>
51
<img src="CObservationImage_figRefSystem.png">
52
</center>
53
*
54
* \sa CObservation, CObservationStereoImages
55
* \ingroup mrpt_obs_grp
56
*/
57
class
OBS_IMPEXP
CObservationImage
: public
CObservation
58
{
59
// This must be added to any CSerializable derived class:
60
DEFINE_SERIALIZABLE
(
CObservationImage
)
61
62
public:
63
/** Constructor.
64
* \param iplImage An OpenCV "IplImage*" object with the image to be loaded in the member "image", or NULL (default) for an empty image.
65
*
66
*/
67
CObservationImage
(
void
*iplImage = NULL );
68
69
/** The pose of the camera on the robot
70
*/
71
CPose3D
cameraPose;
72
73
/** Intrinsic and distortion parameters of the camera.
74
* See the <a href="http://www.mrpt.org/Camera_Parameters" >tutorial</a> for a discussion of these parameters.
75
*/
76
TCamera
cameraParams;
77
78
CImage
image;
//!< The image captured by the camera, that is, the main piece of information of this observation.
79
80
/** Computes the rectified (un-distorted) image, using the embeded distortion parameters.
81
*/
82
void
getRectifiedImage(
CImage
&out_img ) const;
83
84
/** A general method to retrieve the sensor pose on the robot.
85
* Note that most sensors will return a full (6D) CPose3D, but see the derived classes for more details or special cases.
86
* \sa setSensorPose
87
*/
88
void
getSensorPose(
CPose3D
&out_sensorPose )
const
{ out_sensorPose = cameraPose; }
89
90
91
/** A general method to change the sensor pose on the robot.
92
* Note that most sensors will use the full (6D) CPose3D, but see the derived classes for more details or special cases.
93
* \sa getSensorPose
94
*/
95
void
setSensorPose
(
const
CPose3D
&newSensorPose ) { cameraPose = newSensorPose; }
96
97
};
// End of class def.
98
99
100
}
// End of namespace
101
}
// End of namespace
102
103
#endif
Page generated by
Doxygen 1.8.3
for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013