Skip to content
Snippets Groups Projects
Commit 699b3da9 authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

Rename Q to K (camera matrix)

parent 99e54015
No related branches found
No related tags found
No related merge requests found
...@@ -62,14 +62,14 @@ void StereoVideoSource::init(const string &file) { ...@@ -62,14 +62,14 @@ void StereoVideoSource::init(const string &file) {
if (!calib_->isCalibrated()) LOG(WARNING) << "Cameras are not calibrated!"; if (!calib_->isCalibrated()) LOG(WARNING) << "Cameras are not calibrated!";
// Generate camera parameters from camera matrix // Generate camera parameters from camera matrix
cv::Mat q = calib_->getCameraMatrix(); cv::Mat K = calib_->getCameraMatrix();
params_ = { params_ = {
q.at<double>(0,0), // Fx K.at<double>(0,0), // Fx
q.at<double>(1,1), // Fy K.at<double>(1,1), // Fy
-q.at<double>(0,2), // Cx -K.at<double>(0,2), // Cx
-q.at<double>(1,2), // Cy -K.at<double>(1,2), // Cy
(unsigned int)lsrc_->width(), (unsigned int) lsrc_->width(),
(unsigned int)lsrc_->height(), (unsigned int) lsrc_->height(),
0.0f, // 0m min 0.0f, // 0m min
15.0f, // 15m max 15.0f, // 15m max
1.0 / calib_->getQ().at<double>(3,2), // Baseline 1.0 / calib_->getQ().at<double>(3,2), // Baseline
...@@ -115,7 +115,7 @@ void StereoVideoSource::init(const string &file) { ...@@ -115,7 +115,7 @@ void StereoVideoSource::init(const string &file) {
mask_l_ = (mask_l == 0); mask_l_ = (mask_l == 0);
disp_ = Disparity::create(host_, "disparity"); disp_ = Disparity::create(host_, "disparity");
if (!disp_) LOG(FATAL) << "Unknown disparity algorithm : " << *host_->get<ftl::config::json_t>("disparity"); if (!disp_) LOG(FATAL) << "Unknown disparity algorithm : " << *host_->get<ftl::config::json_t>("disparity");
disp_->setMask(mask_l_); disp_->setMask(mask_l_);
LOG(INFO) << "StereoVideo source ready..."; LOG(INFO) << "StereoVideo source ready...";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment