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 setStereoMode(
bool stereo,
const QString & leftSuffix =
"left",
const QString & rightSuffix =
"right");
74 void setBoardWidth(
int width);
75 void setBoardHeight(
int height);
76 void setSquareSize(
double size);
77 void setMaxScale(
int scale);
79 void processImages(
const cv::Mat & imageLeft,
const cv::Mat & imageRight,
const QString & cameraName);
88 virtual void closeEvent(QCloseEvent* event);
89 virtual bool handleEvent(
UEvent * event);
92 float getArea(
const std::vector<cv::Point2f> & corners,
const cv::Size & boardSize);
93 float getSkew(
const std::vector<cv::Point2f> & corners,
const cv::Size & boardSize);
99 void getParams(
const std::vector<cv::Point2f> & corners,
const cv::Size & boardSize,
const cv::Size & imageSize,
100 float & x,
float & y,
float & size,
float & skew);
122 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