Skip to content

Commit

Permalink
pull req from omaris: Replacing camera matrix with projection matrix …
Browse files Browse the repository at this point in the history
…as LSD Slam assumes recti... tum-vision#12
  • Loading branch information
JakobEngel committed Sep 24, 2014
1 parent 892c020 commit bfe5fa6
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions lsd_slam_core/src/IOWrapper/ROS/ROSImageStreamThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,19 @@ void ROSImageStreamThread::infoCb(const sensor_msgs::CameraInfoConstPtr info)
{
if(!haveCalib)
{
fx_ = info->K[0];
fy_ = info->K[4];
cx_ = info->K[2];
cy_ = info->K[5];
fx_ = info->P[0];
fy_ = info->P[4];
cx_ = info->P[2];
cy_ = info->P[5];

if(fx_ == 0 || fy_==0)
{
printf("camera calib from P seems wrong, trying calib from K\n");
fx_ = info->K[0];
fy_ = info->K[4];
cx_ = info->K[2];
cy_ = info->K[5];
}

width_ = info->width;
height_ = info->height;
Expand Down

0 comments on commit bfe5fa6

Please sign in to comment.