28 #ifndef RTABMAP_CALIBRATIONDIALOG_H_ 29 #define RTABMAP_CALIBRATIONDIALOG_H_ 35 #include <opencv2/opencv.hpp> 42 class Ui_calibrationDialog;
51 CalibrationDialog(
bool stereo =
false,
const QString & savingDirectory =
".",
bool switchImages =
false, QWidget * parent = 0);
54 bool isCalibrated()
const {
return models_[0].isValidForProjection() && (stereo_?models_[1].isValidForProjection():
true);}
61 void saveSettings(QSettings & settings,
const QString & group =
"")
const;
62 void loadSettings(QSettings & settings,
const QString & group =
"");
65 void setCameraName(
const QString & name);
66 void setProgressVisibility(
bool visible);
67 void setSwitchedImages(
bool switched);
68 void setFisheyeImages(
bool enabled);
69 void setStereoMode(
bool stereo,
const QString & leftSuffix =
"left",
const QString & rightSuffix =
"right");
75 void setBoardWidth(
int width);
76 void setBoardHeight(
int height);
77 void setSquareSize(
double size);
78 void setMaxScale(
int scale);
80 void processImages(
const cv::Mat & imageLeft,
const cv::Mat & imageRight,
const QString & cameraName);
89 virtual void closeEvent(QCloseEvent* event);
90 virtual bool handleEvent(
UEvent * event);
93 float getArea(
const std::vector<cv::Point2f> & corners,
const cv::Size & boardSize);
94 float getSkew(
const std::vector<cv::Point2f> & corners,
const cv::Size & boardSize);
100 void getParams(
const std::vector<cv::Point2f> & corners,
const cv::Size & boardSize,
const cv::Size & imageSize,
101 float & x,
float & y,
float & size,
float & skew);
123 Ui_calibrationDialog *
ui_;
std::vector< std::vector< std::vector< cv::Point2f > > > stereoImagePoints_
std::vector< unsigned short > minIrs_
std::vector< unsigned short > maxIrs_
const rtabmap::CameraModel & getRightCameraModel() const
void setSavingDirectory(const QString &savingDirectory)
rtabmap::StereoCameraModel stereoModel_
int getStereoPairs() const
std::vector< std::vector< std::vector< cv::Point2f > > > imagePoints_
std::vector< rtabmap::CameraModel > models_
DiscreteDepthDistortionModel RTABMAP_EXP calibrate(const std::map< int, rtabmap::SensorData > &sequence, const std::map< int, rtabmap::Transform > &trajectory, const pcl::PointCloud< pcl::PointXYZ >::Ptr &map, double coneRadius=0.02, double coneStdevThresh=0.03)
bool isProcessing() const
bool isCalibrated() const
const rtabmap::CameraModel & getLeftCameraModel() const
std::vector< cv::Size > imageSize_
std::vector< std::vector< std::vector< float > > > imageParams_
Ui_calibrationDialog * ui_
const rtabmap::StereoCameraModel & getStereoCameraModel() const