Line 135... |
Line 135... |
135 |
QSettings settings;
|
135 |
QSettings settings;
|
136 |
QVariant calibrationVariant = settings.value("calibration/parameters");
|
136 |
QVariant calibrationVariant = settings.value("calibration/parameters");
|
137 |
SMCalibrationParameters calibration = calibrationVariant.value<SMCalibrationParameters>();
|
137 |
SMCalibrationParameters calibration = calibrationVariant.value<SMCalibrationParameters>();
|
138 |
|
138 |
|
139 |
// camera 0 coordinate system
|
139 |
// camera 0 coordinate system
|
140 |
//visualizer->removeCoordinateSystem("camera0", 0);
|
140 |
visualizer->removeCoordinateSystem("camera0", 0);
|
141 |
visualizer->addCoordinateSystem(100, "camera0", 0);
|
141 |
visualizer->addCoordinateSystem(100, "camera0", 0);
|
142 |
|
142 |
|
143 |
// camera 1 coordinate system
|
143 |
// camera 1 coordinate system
|
144 |
cv::Mat Transform1CV(3, 4, CV_32F);
|
144 |
cv::Mat Transform1CV(3, 4, CV_32F);
|
145 |
cv::Mat(calibration.R1).copyTo(Transform1CV.colRange(0, 3));
|
145 |
cv::Mat(calibration.R1).copyTo(Transform1CV.colRange(0, 3));
|
146 |
cv::Mat(calibration.T1).copyTo(Transform1CV.col(3));
|
146 |
cv::Mat(calibration.T1).copyTo(Transform1CV.col(3));
|
147 |
Eigen::Affine3f Transform1;
|
147 |
Eigen::Affine3f Transform1;
|
148 |
cv::cv2eigen(Transform1CV, Transform1.matrix());
|
148 |
cv::cv2eigen(Transform1CV, Transform1.matrix());
|
149 |
|
149 |
|
150 |
//visualizer->removeCoordinateSystem("camera1", 0);
|
150 |
visualizer->removeCoordinateSystem("camera1", 0);
|
151 |
visualizer->addCoordinateSystem(100, Transform1.inverse(), "camera1", 0);
|
151 |
visualizer->addCoordinateSystem(100, Transform1.inverse(), "camera1", 0);
|
152 |
|
152 |
|
153 |
// // rotation axis coordinate system
|
153 |
// // rotation axis coordinate system
|
154 |
// cv::Mat TransformRCV(3, 4, CV_32F);
|
154 |
// cv::Mat TransformRCV(3, 4, CV_32F);
|
155 |
// cv::Mat(calibration.Rr).copyTo(TransformRCV.colRange(0, 3));
|
155 |
// cv::Mat(calibration.Rr).copyTo(TransformRCV.colRange(0, 3));
|