Class TStereoCamera
Defined in File TStereoCamera.h
Inheritance Relationships
Base Type
public mrpt::serialization::CSerializable
Class Documentation
-
class TStereoCamera : public mrpt::serialization::CSerializable
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()
See also
mrpt::vision, the application stereo-calib-gui for calibrating a stereo camera
Public Functions
-
void saveToConfigFile(const std::string §ion, mrpt::config::CConfigFileBase &cfg) const
Save all params to a plain text config file in this format:
Notice that 3 different sections are read, of which “section” is only the prefix.[<SECTION>_LEFT] resolution = [NCOLS NROWS] cx = CX cy = CY fx = FX fy = FY dist = [K1 K2 T1 T2 K3] [<SECTION>_RIGHT] resolution = [NCOLS NROWS] cx = CX cy = CY fx = FX fy = FY dist = [K1 K2 T1 T2 K3] [<SECTION>_LEFT2RIGHT_POSE] pose_quaternion = [x y z qr qx qy qz]
-
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(). Notice that 3 different sections are read, of which “section” is only the prefix.
- Throws:
std::exception – on missing fields
-
inline void loadFromConfigFile(const mrpt::config::CConfigFileBase &cfg, const std::string §ion)
overload This signature is consistent with the rest of MRPT APIs
-
std::string dumpAsText() const
Dumps all the parameters as a multi-line string, with the same format than saveToConfigFile.
See also
-
inline 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).
-
void saveToConfigFile(const std::string §ion, mrpt::config::CConfigFileBase &cfg) const