Skip to content
Snippets Groups Projects

High resolution colour

Merged Nicolas Pope requested to merge feature/resolution into master
1 file
+ 20
16
Compare changes
  • Side-by-side
  • Inline
@@ -151,25 +151,29 @@ void StereoVideoSource::init(const string &file) {
}
ftl::rgbd::Camera StereoVideoSource::parameters(Channel chan) {
cv::Mat q;
if (chan == Channel::Right) {
cv::Mat q = calib_->getCameraMatrixRight(depth_size_);
ftl::rgbd::Camera params = {
q.at<double>(0,0), // Fx
q.at<double>(1,1), // Fy
-q.at<double>(0,2), // Cx
-q.at<double>(1,2), // Cy
(unsigned int)lsrc_->width(),
(unsigned int)lsrc_->height(),
0.0f, // 0m min
15.0f, // 15m max
1.0 / calib_->getQ().at<double>(3,2), // Baseline
0.0f // doffs
};
return params;
//params_.doffs = -calib_->getQ().at<double>(3,3) * params_.baseline;
q = calib_->getCameraMatrixRight(depth_size_);
} else {
return params_;
q = calib_->getCameraMatrixLeft(depth_size_);
}
// TODO: remove hardcoded values (min/max)
ftl::rgbd::Camera params = {
q.at<double>(0,0), // Fx
q.at<double>(1,1), // Fy
-q.at<double>(0,2), // Cx
-q.at<double>(1,2), // Cy
(unsigned int)lsrc_->width(),
(unsigned int)lsrc_->height(),
0.0f, // 0m min
15.0f, // 15m max
1.0 / calib_->getQ().at<double>(3,2), // Baseline
0.0f // doffs
};
return params;
}
bool StereoVideoSource::capture(int64_t ts) {
Loading