Structure to hold the parameters of a pinhole stereo camera model.
The parameters obtained for one camera resolution can be used for any other resolution by means of the method TStereoCamera::scaleToResolution()
Definition at line 25 of file TStereoCamera.h.
#include <mrpt/utils/TStereoCamera.h>
Public Member Functions | |
void * | operator new (size_t size) |
void * | operator new[] (size_t size) |
void | operator delete (void *ptr) noexcept |
void | operator delete[] (void *ptr) noexcept |
void | operator delete (void *memory, void *ptr) noexcept |
void * | operator new (size_t size, const std::nothrow_t &) noexcept |
void | operator delete (void *ptr, const std::nothrow_t &) noexcept |
TStereoCamera () | |
void | saveToConfigFile (const std::string §ion, mrpt::utils::CConfigFileBase &cfg) const |
Save all params to a plain text config file in this format: More... | |
void | loadFromConfigFile (const std::string §ion, const mrpt::utils::CConfigFileBase &cfg) |
Load all the params from a config source, in the same format that used in saveToConfigFile(). More... | |
void | loadFromConfigFile (const mrpt::utils::CConfigFileBase &cfg, const std::string §ion) |
overload This signature is consistent with the rest of MRPT APIs More... | |
std::string | dumpAsText () const |
Dumps all the parameters as a multi-line string, with the same format than saveToConfigFile. More... | |
void | scaleToResolution (unsigned int new_ncols, unsigned int new_nrows) |
Rescale all the parameters for a new camera resolution (it raises an exception if the aspect ratio is modified, which is not permitted). More... | |
virtual mxArray * | writeToMatlab () const |
Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class. More... | |
RTTI classes and functions | |
mrpt::utils::CObject::Ptr | duplicateGetSmartPtr () const |
Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer). More... | |
Static Public Member Functions | |
static void * | operator new (size_t size, void *ptr) |
Public Attributes | |
TCamera | leftCamera |
Intrinsic and distortion parameters of the left and right cameras. More... | |
TCamera | rightCamera |
mrpt::poses::CPose3DQuat | rightCameraPose |
Pose of the right camera with respect to the coordinate origin of the left camera. More... | |
Protected Member Functions | |
CSerializable virtual methods | |
void | writeToStream (mrpt::utils::CStream &out, int *getVersion) const override |
Introduces a pure virtual method responsible for writing to a CStream. More... | |
void | readFromStream (mrpt::utils::CStream &in, int version) override |
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori. More... | |
RTTI stuff | |
using | Ptr = std::shared_ptr< TStereoCamera > |
using | ConstPtr = std::shared_ptr< const TStereoCamera > |
static mrpt::utils::CLASSINIT | _init_TStereoCamera |
static const mrpt::utils::TRuntimeClassId | runtimeClassId |
static constexpr const char * | className = "TStereoCamera" |
static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
static const mrpt::utils::TRuntimeClassId & | GetRuntimeClassIdStatic () |
static mrpt::utils::CObject * | CreateObject () |
template<typename... Args> | |
static Ptr | Create (Args &&... args) |
virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const override |
Returns information about the class of an object in runtime. More... | |
virtual mrpt::utils::CObject * | clone () const override |
Returns a deep copy (clone) of the object, indepently of its class. More... | |
using mrpt::utils::TStereoCamera::ConstPtr = std::shared_ptr<const TStereoCamera > |
Definition at line 27 of file TStereoCamera.h.
using mrpt::utils::TStereoCamera::Ptr = std::shared_ptr< TStereoCamera > |
A typedef for the associated smart pointer
Definition at line 27 of file TStereoCamera.h.
TStereoCamera::TStereoCamera | ( | ) |
Definition at line 23 of file TStereoCamera.cpp.
|
staticprotected |
|
overridevirtual |
Returns a deep copy (clone) of the object, indepently of its class.
Implements mrpt::utils::CObject.
|
inlinestatic |
Definition at line 27 of file TStereoCamera.h.
|
static |
std::string TStereoCamera::dumpAsText | ( | ) | const |
Dumps all the parameters as a multi-line string, with the same format than saveToConfigFile.
Definition at line 100 of file TStereoCamera.cpp.
References mrpt::utils::CConfigFileMemory::getContent().
Referenced by mrpt::obs::CObservationStereoImages::getDescriptionAsText().
|
overridevirtual |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::utils::CSerializable.
|
static |
void TStereoCamera::loadFromConfigFile | ( | const std::string & | section, |
const mrpt::utils::CConfigFileBase & | cfg | ||
) |
Load all the params from a config source, in the same format that used in saveToConfigFile().
Load all the params from a config source, in the format described in saveToConfigFile()
Notice that 3 different sections are read, of which "section" is only the prefix.
std::exception | on missing fields |
Definition at line 50 of file TStereoCamera.cpp.
References mrpt::utils::CConfigFileBase::read_string().
Referenced by mrpt::hwdrivers::COpenNI2Sensor::loadConfig_sensorSpecific(), mrpt::hwdrivers::CKinect::loadConfig_sensorSpecific(), loadFromConfigFile(), and mrpt::hwdrivers::TCaptureOptions_DUO3D::loadOptionsFrom().
|
inline |
overload This signature is consistent with the rest of MRPT APIs
Definition at line 75 of file TStereoCamera.h.
References loadFromConfigFile().
Definition at line 27 of file TStereoCamera.h.
Definition at line 27 of file TStereoCamera.h.
|
inlinenoexcept |
Definition at line 27 of file TStereoCamera.h.
Definition at line 27 of file TStereoCamera.h.
Definition at line 27 of file TStereoCamera.h.
|
inline |
Definition at line 27 of file TStereoCamera.h.
|
inlinenoexcept |
Definition at line 27 of file TStereoCamera.h.
|
inline |
Definition at line 27 of file TStereoCamera.h.
|
overrideprotectedvirtual |
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.
in | The input binary stream where the object data must read from. |
version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
std::exception | On any error, see CStream::ReadBuffer |
Implements mrpt::utils::CSerializable.
Definition at line 79 of file TStereoCamera.cpp.
References MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION.
void TStereoCamera::saveToConfigFile | ( | const std::string & | section, |
mrpt::utils::CConfigFileBase & | cfg | ||
) | const |
Save all params to a plain text config file in this format:
Save as a config block:
Notice that 3 different sections are read, of which "section" is only the prefix.
Definition at line 26 of file TStereoCamera.cpp.
References mrpt::utils::CConfigFileBase::write().
|
inline |
Rescale all the parameters for a new camera resolution (it raises an exception if the aspect ratio is modified, which is not permitted).
Definition at line 88 of file TStereoCamera.h.
References leftCamera, rightCamera, and mrpt::utils::TCamera::scaleToResolution().
|
inlinevirtualinherited |
Introduces a pure virtual method responsible for writing to a mxArray
Matlab object, typically a MATLAB struct
whose contents are documented in each derived class.
mxArray
(caller is responsible of memory freeing) or nullptr is class does not support conversion to MATLAB. Definition at line 89 of file CSerializable.h.
|
overrideprotectedvirtual |
Introduces a pure virtual method responsible for writing to a CStream.
This can not be used directly be users, instead use "stream << object;" for writing it to a stream.
out | The output binary stream where object must be dumped. |
getVersion | If nullptr, the object must be dumped. If not, only the version of the object dump must be returned in this pointer. This enables the versioning of objects dumping and backward compatibility with previously stored data. |
std::exception | On any error, see CStream::WriteBuffer |
Implements mrpt::utils::CSerializable.
Definition at line 68 of file TStereoCamera.cpp.
|
staticprotected |
Definition at line 27 of file TStereoCamera.h.
|
static |
Definition at line 27 of file TStereoCamera.h.
TCamera mrpt::utils::TStereoCamera::leftCamera |
Intrinsic and distortion parameters of the left and right cameras.
Definition at line 30 of file TStereoCamera.h.
Referenced by mrpt::vision::checkerBoardStereoCalibration(), mrpt::vision::CStereoRectifyMap::getRectifiedLeftImageParams(), mrpt::obs::CObservationStereoImages::getStereoCameraParams(), mrpt::hwdrivers::COpenNI2Sensor::loadConfig_sensorSpecific(), mrpt::hwdrivers::CKinect::loadConfig_sensorSpecific(), mrpt::hwdrivers::TCaptureOptions_DUO3D::loadOptionsFrom(), mrpt::hwdrivers::TCaptureOptions_DUO3D::m_camera_int_params_from_yml(), mrpt::vision::projectMatchedFeatures(), mrpt::vision::CStereoRectifyMap::rectify(), mrpt::vision::CStereoRectifyMap::rectify_IPL(), scaleToResolution(), mrpt::vision::CStereoRectifyMap::setFromCamParams(), and mrpt::obs::CObservationStereoImages::setStereoCameraParams().
TCamera mrpt::utils::TStereoCamera::rightCamera |
Definition at line 30 of file TStereoCamera.h.
Referenced by mrpt::vision::checkerBoardStereoCalibration(), mrpt::vision::CStereoRectifyMap::getRectifiedRightImageParams(), mrpt::obs::CObservationStereoImages::getStereoCameraParams(), mrpt::hwdrivers::COpenNI2Sensor::loadConfig_sensorSpecific(), mrpt::hwdrivers::CKinect::loadConfig_sensorSpecific(), mrpt::hwdrivers::TCaptureOptions_DUO3D::loadOptionsFrom(), mrpt::hwdrivers::TCaptureOptions_DUO3D::m_camera_int_params_from_yml(), scaleToResolution(), mrpt::vision::CStereoRectifyMap::setFromCamParams(), and mrpt::obs::CObservationStereoImages::setStereoCameraParams().
mrpt::poses::CPose3DQuat mrpt::utils::TStereoCamera::rightCameraPose |
Pose of the right camera with respect to the coordinate origin of the left camera.
Definition at line 33 of file TStereoCamera.h.
Referenced by mrpt::obs::CObservationStereoImages::getDescriptionAsText(), mrpt::obs::CObservationStereoImages::getStereoCameraParams(), mrpt::hwdrivers::COpenNI2Sensor::loadConfig_sensorSpecific(), mrpt::hwdrivers::CKinect::loadConfig_sensorSpecific(), mrpt::hwdrivers::TCaptureOptions_DUO3D::m_camera_ext_params_from_yml(), mrpt::vision::projectMatchedFeatures(), mrpt::vision::CStereoRectifyMap::setFromCamParams(), and mrpt::obs::CObservationStereoImages::setStereoCameraParams().
|
staticprotected |
Definition at line 27 of file TStereoCamera.h.
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019 |