Main MRPT website > C++ reference for MRPT 1.4.0
obs/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-2016, 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/utils/CImage.h>
14#include <mrpt/utils/TCamera.h>
15#include <mrpt/math/CMatrix.h>
17#include <mrpt/poses/CPose3D.h>
18#include <mrpt/poses/CPose2D.h>
19
20namespace mrpt
21{
22namespace obs
23{
25
26 /** Declares a class derived from "CObservation" that encapsules an image from a camera, whose relative pose to robot is also stored.
27 The next figure illustrate the coordinates reference systems involved in 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 {
37 // This must be added to any CSerializable derived class:
39 // This must be added for declaration of MEX-related functions
41
42 public:
43 /** Constructor.
44 * \param iplImage An OpenCV "IplImage*" object with the image to be loaded in the member "image", or NULL (default) for an empty image.
45 *
46 */
47 CObservationImage( void *iplImage = NULL );
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> for a discussion of these parameters.
55 */
57
58 mrpt::utils::CImage image; //!< The image captured by the camera, that is, the main piece of information of this observation.
59
60 /** Computes the rectified (un-distorted) image, using the embeded distortion parameters.
61 */
62 void getRectifiedImage( mrpt::utils::CImage &out_img ) const;
63
64 // See base class docs
65 void getSensorPose( mrpt::poses::CPose3D &out_sensorPose ) const MRPT_OVERRIDE { out_sensorPose = cameraPose; }
66 void setSensorPose( const mrpt::poses::CPose3D &newSensorPose ) MRPT_OVERRIDE { cameraPose = newSensorPose; }
67 void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE;
68
69 }; // End of class def.
71
72
73 } // End of namespace
74} // End of namespace
75
76// Add for declaration of mexplus::from template specialization
78
79#endif
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
#define DECLARE_MEXPLUS_FROM(complete_type)
This must be inserted if a custom conversion method for MEX API is implemented in the class.
#define DECLARE_MEX_CONVERSION
This must be inserted if a custom conversion method for MEX API is implemented in the class.
Declares a class that represents any robot's observation.
Declares a class derived from "CObservation" that encapsules an image from a camera,...
void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
mrpt::poses::CPose3D cameraPose
The pose of the camera on the robot.
mrpt::utils::CImage image
The image captured by the camera, that is, the main piece of information of this observation.
mrpt::utils::TCamera cameraParams
Intrinsic and distortion parameters of the camera.
void getRectifiedImage(mrpt::utils::CImage &out_img) const
Computes the rectified (un-distorted) image, using the embeded distortion parameters.
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const MRPT_OVERRIDE
A general method to retrieve the sensor pose on the robot.
CObservationImage(void *iplImage=NULL)
Constructor.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition CPose3D.h:73
A class for storing images as grayscale or RGB bitmaps.
Definition CImage.h:102
Structure to hold the parameters of a pinhole camera model.
Definition TCamera.h:32
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Definition mrpt_macros.h:28
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.



Page generated by Doxygen 1.9.7 for MRPT 1.4.0 SVN: at Tue Jun 13 13:45:58 UTC 2023