MRPT
2.0.4
|
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 23 of file TStereoCamera.h.
#include <mrpt/img/TStereoCamera.h>
Public Member Functions | |
void | saveToConfigFile (const std::string §ion, mrpt::config::CConfigFileBase &cfg) const |
Save all params to a plain text config file in this format: More... | |
void | loadFromConfigFile (const std::string §ion, const mrpt::config::CConfigFileBase &cfg) |
Load all the params from a config source, in the same format that used in saveToConfigFile(). More... | |
void | loadFromConfigFile (const mrpt::config::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 for polymorphic hierarchies | |
mrpt::rtti::CObject::Ptr | duplicateGetSmartPtr () const |
Makes a deep copy of the object and returns a smart pointer to it. More... | |
Public Attributes | |
TCamera | leftCamera |
Intrinsic and distortion parameters of the left and right cameras. More... | |
TCamera | rightCamera |
mrpt::math::TPose3DQuat | rightCameraPose |
Pose of the right camera with respect to the coordinate origin of the left camera. More... | |
Protected Member Functions | |
CSerializable virtual methods | |
uint8_t | serializeGetVersion () const override |
Must return the current versioning number of the object. More... | |
void | serializeTo (mrpt::serialization::CArchive &out) const override |
Pure virtual method for writing (serializing) to an abstract archive. More... | |
void | serializeFrom (mrpt::serialization::CArchive &in, uint8_t serial_version) override |
Pure virtual method for reading (deserializing) from an abstract archive. More... | |
CSerializable virtual methods | |
virtual void | serializeTo (CSchemeArchiveBase &out) const |
Virtual method for writing (serializing) to an abstract schema based archive. More... | |
virtual void | serializeFrom (CSchemeArchiveBase &in) |
Virtual method for reading (deserializing) from an abstract schema based archive. More... | |
RTTI stuff | |
using | Ptr = std::shared_ptr< mrpt::img ::TStereoCamera > |
using | ConstPtr = std::shared_ptr< const mrpt::img ::TStereoCamera > |
using | UniquePtr = std::unique_ptr< mrpt::img ::TStereoCamera > |
using | ConstUniquePtr = std::unique_ptr< const mrpt::img ::TStereoCamera > |
static const mrpt::rtti::TRuntimeClassId | runtimeClassId |
static constexpr const char * | className = "mrpt::img" "::" "TStereoCamera" |
static const mrpt::rtti::TRuntimeClassId * | _GetBaseClass () |
static constexpr auto | getClassName () |
static const mrpt::rtti::TRuntimeClassId & | GetRuntimeClassIdStatic () |
static std::shared_ptr< CObject > | CreateObject () |
template<typename... Args> | |
static Ptr | Create (Args &&... args) |
template<typename Alloc , typename... Args> | |
static Ptr | CreateAlloc (const Alloc &alloc, Args &&... args) |
template<typename... Args> | |
static UniquePtr | CreateUnique (Args &&... args) |
virtual const mrpt::rtti::TRuntimeClassId * | GetRuntimeClass () const override |
Returns information about the class of an object in runtime. More... | |
virtual mrpt::rtti::CObject * | clone () const override |
Returns a deep copy (clone) of the object, indepently of its class. More... | |
using mrpt::img::TStereoCamera::ConstPtr = std::shared_ptr<const mrpt::img :: TStereoCamera > |
Definition at line 25 of file TStereoCamera.h.
using mrpt::img::TStereoCamera::ConstUniquePtr = std::unique_ptr<const mrpt::img :: TStereoCamera > |
Definition at line 25 of file TStereoCamera.h.
using mrpt::img::TStereoCamera::Ptr = std::shared_ptr< mrpt::img :: TStereoCamera > |
A type for the associated smart pointer
Definition at line 25 of file TStereoCamera.h.
using mrpt::img::TStereoCamera::UniquePtr = std::unique_ptr< mrpt::img :: TStereoCamera > |
Definition at line 25 of file TStereoCamera.h.
|
staticprotected |
|
overridevirtual |
Returns a deep copy (clone) of the object, indepently of its class.
Implements mrpt::rtti::CObject.
|
inlinestatic |
Definition at line 25 of file TStereoCamera.h.
|
inlinestatic |
Definition at line 25 of file TStereoCamera.h.
|
static |
|
inlinestatic |
Definition at line 25 of file TStereoCamera.h.
std::string TStereoCamera::dumpAsText | ( | ) | const |
Dumps all the parameters as a multi-line string, with the same format than saveToConfigFile.
Definition at line 97 of file TStereoCamera.cpp.
References mrpt::config::CConfigFileMemory::getContent().
Referenced by mrpt::obs::CObservationStereoImages::getDescriptionAsText().
|
inlineinherited |
Makes a deep copy of the object and returns a smart pointer to it.
Definition at line 204 of file CObject.h.
References mrpt::rtti::CObject::clone().
Referenced by mrpt::obs::CRawlog::insert().
|
inlinestatic |
Definition at line 25 of file TStereoCamera.h.
|
overridevirtual |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::serialization::CSerializable.
|
static |
void TStereoCamera::loadFromConfigFile | ( | const std::string & | section, |
const mrpt::config::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 45 of file TStereoCamera.cpp.
References mrpt::config::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 70 of file TStereoCamera.h.
References loadFromConfigFile().
void TStereoCamera::saveToConfigFile | ( | const std::string & | section, |
mrpt::config::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 24 of file TStereoCamera.cpp.
References saveToConfigFile().
Referenced by saveToConfigFile().
|
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 83 of file TStereoCamera.h.
References leftCamera, rightCamera, and mrpt::img::TCamera::scaleToResolution().
|
overrideprotectedvirtual |
Pure virtual method for reading (deserializing) from an abstract archive.
Users don't call this method directly. Instead, use stream >> object;
.
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 I/O error |
Implements mrpt::serialization::CSerializable.
Definition at line 68 of file TStereoCamera.cpp.
References MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION, and THROW_EXCEPTION.
|
inlineprotectedvirtualinherited |
Virtual method for reading (deserializing) from an abstract schema based archive.
Definition at line 74 of file CSerializable.h.
References mrpt::serialization::CSerializable::GetRuntimeClass(), and THROW_EXCEPTION.
|
overrideprotectedvirtual |
Must return the current versioning number of the object.
Start in zero for new classes, and increments each time there is a change in the stored format.
Implements mrpt::serialization::CSerializable.
Definition at line 61 of file TStereoCamera.cpp.
|
overrideprotectedvirtual |
Pure virtual method for writing (serializing) to an abstract archive.
Users don't call this method directly. Instead, use stream << object;
.
std::exception | On any I/O error |
Implements mrpt::serialization::CSerializable.
Definition at line 62 of file TStereoCamera.cpp.
References out.
|
inlineprotectedvirtualinherited |
Virtual method for writing (serializing) to an abstract schema based archive.
Definition at line 64 of file CSerializable.h.
References mrpt::serialization::CSerializable::GetRuntimeClass(), and THROW_EXCEPTION.
|
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 90 of file CSerializable.h.
|
static |
Definition at line 25 of file TStereoCamera.h.
TCamera mrpt::img::TStereoCamera::leftCamera |
Intrinsic and distortion parameters of the left and right cameras.
Definition at line 28 of file TStereoCamera.h.
Referenced by mrpt::vision::checkerBoardStereoCalibration(), do_rectify(), 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(), scaleToResolution(), and mrpt::obs::CObservationStereoImages::setStereoCameraParams().
TCamera mrpt::img::TStereoCamera::rightCamera |
Definition at line 28 of file TStereoCamera.h.
Referenced by mrpt::vision::checkerBoardStereoCalibration(), 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(), and mrpt::obs::CObservationStereoImages::setStereoCameraParams().
mrpt::math::TPose3DQuat mrpt::img::TStereoCamera::rightCameraPose |
Pose of the right camera with respect to the coordinate origin of the left camera.
Definition at line 31 of file TStereoCamera.h.
Referenced by mrpt::vision::checkerBoardStereoCalibration(), 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(), and mrpt::obs::CObservationStereoImages::setStereoCameraParams().
|
staticprotected |
Definition at line 25 of file TStereoCamera.h.
Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020 |