Skip to content

Commit

Permalink
OpenCV camera calibration configuration file first row gives values '…
Browse files Browse the repository at this point in the history
…fx fy cx cy k1 k2 p1 p2', not values 'fx/width fy/height cx/width cy/height k1 k2 p1 p2'
  • Loading branch information
Siim Schults committed Nov 3, 2014
1 parent 0fb6884 commit f4859d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lsd_slam_core/src/util/Undistorter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,11 @@ UndistorterOpenCV::UndistorterOpenCV(const char* configFileName)
distCoeffs.at<float>(i, 0) = inputCalibration[4 + i];

originalK_ = cv::Mat(3, 3, CV_64F, cv::Scalar(0));
originalK_.at<double>(0, 0) = inputCalibration[0] * in_width;
originalK_.at<double>(1, 1) = inputCalibration[1] * in_height;
originalK_.at<double>(0, 0) = inputCalibration[0];
originalK_.at<double>(1, 1) = inputCalibration[1];
originalK_.at<double>(2, 2) = 1;
originalK_.at<double>(0, 2) = inputCalibration[2] * in_width;
originalK_.at<double>(1, 2) = inputCalibration[3] * in_height;
originalK_.at<double>(0, 2) = inputCalibration[2];
originalK_.at<double>(1, 2) = inputCalibration[3];

if (valid)
{
Expand Down

0 comments on commit f4859d2

Please sign in to comment.