Go to the documentation of this file.
30 #include <opencv2/imgproc/types_c.h>
41 const std::string & pathLeftImages,
42 const std::string & pathRightImages,
53 const std::string & pathLeftRightImages,
73 UERROR(
"The path is empty!");
86 UINFO(
"Calibration folder: \"%s\", name=\"%s\"", calibrationFolder.c_str(), cameraName.c_str());
89 if(!calibrationFolder.empty() && !cameraName.empty())
93 UWARN(
"Missing calibration files for camera \"%s\" in \"%s\" folder, you should calibrate the camera!",
94 cameraName.c_str(), calibrationFolder.c_str());
98 UINFO(
"Stereo parameters: fx=%f cx=%f cy=%f baseline=%f",
110 UWARN(
"Parameter \"rectifyImages\" is set, but no stereo model is loaded or valid for rectification. This can be ignored if input images are already rectified.");
117 bool success =
false;
131 UERROR(
"Cameras don't have the same number of images (%d vs %d)",
137 UERROR(
"Cannot initialize the second camera.");
180 cv::Mat leftImage = left.
imageRaw();
181 cv::Mat rightImage = right.
imageRaw();
182 if(rightImage.type() != CV_8UC1)
185 cv::cvtColor(rightImage, tmp, CV_BGR2GRAY);
virtual bool init(const std::string &calibrationFolder=".", const std::string &cameraName="")
void setPath(const std::string &dir)
StereoCameraModel stereoModel_
void setImagesRectified(bool enabled)
bool isImagesRectified() const
bool load(const std::string &directory, const std::string &cameraName, bool ignoreStereoTransform=true)
void setImageSize(const cv::Size &size)
const Transform & getLocalTransform() const
virtual bool isCalibrated() const
std::vector< V > uListToVector(const std::list< V > &list)
void setLocalTransform(const Transform &transform)
virtual std::string getSerial() const
virtual SensorData captureImage(SensorCaptureInfo *info=0)
const CameraModel & right() const
const LaserScan & laserScanRaw() const
cv::Mat rectifyImage(const cv::Mat &raw, int interpolation=cv::INTER_LINEAR) const
unsigned int imagesCount() const
void setName(const std::string &name, const std::string &leftSuffix="left", const std::string &rightSuffix="right")
const CameraModel & left() const
CameraStereoImages(const std::string &pathLeftImages, const std::string &pathRightImages, bool rectifyImages=false, float imageRate=0.0f, const Transform &localTransform=Transform::getIdentity())
bool isValidForProjection() const
bool uStrContains(const std::string &string, const std::string &substring)
void setBayerMode(int mode)
virtual bool init(const std::string &calibrationFolder=".", const std::string &cameraName="")
virtual ~CameraStereoImages()
bool isValidForRectification() const
const cv::Mat & imageRaw() const
std::list< std::string > uSplit(const std::string &str, char separator=' ')
Wrappers of STL for convenient functions.
const std::string & name() const
SensorData takeImage(SensorCaptureInfo *info=0)
const Transform & groundTruth() const
virtual SensorData captureImage(SensorCaptureInfo *info=0)
rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:07