mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Calibration: added support for stereo IR cameras
This commit is contained in:
@@ -55,6 +55,7 @@ public:
|
||||
const rtabmap::CameraModel & getLeftCameraModel() const {return models_[0];}
|
||||
const rtabmap::CameraModel & getRightCameraModel() const {return models_[1];}
|
||||
const rtabmap::StereoCameraModel & getStereoCameraModel() const {return stereoModel_;}
|
||||
bool isProcessing() const {return processingData_;}
|
||||
|
||||
void saveSettings(QSettings & settings, const QString & group = "") const;
|
||||
void loadSettings(QSettings & settings, const QString & group = "");
|
||||
|
||||
@@ -260,6 +260,7 @@ void CalibrationDialog::handleEvent(UEvent * event)
|
||||
|
||||
void CalibrationDialog::processImages(const cv::Mat & imageLeft, const cv::Mat & imageRight, const QString & cameraName)
|
||||
{
|
||||
UDEBUG("Processing images");
|
||||
processingData_ = true;
|
||||
if(cameraName_.isEmpty())
|
||||
{
|
||||
@@ -306,6 +307,18 @@ void CalibrationDialog::processImages(const cv::Mat & imageLeft, const cv::Mat &
|
||||
{
|
||||
if(images[id].type() == CV_16UC1)
|
||||
{
|
||||
double min, max;
|
||||
cv::minMaxLoc(images[id], &min, &max);
|
||||
UDEBUG("Camera IR %d: min=%f max=%f", id, min, max);
|
||||
if(minIrs_[id] == 0)
|
||||
{
|
||||
minIrs_[id] = min;
|
||||
}
|
||||
if(maxIrs_[id] == 0x7fff)
|
||||
{
|
||||
maxIrs_[id] = max;
|
||||
}
|
||||
|
||||
depthDetected = true;
|
||||
//assume IR image: convert to gray scaled
|
||||
const float factor = 255.0f / float((maxIrs_[id] - minIrs_[id]));
|
||||
|
||||
Reference in New Issue
Block a user