Skip to content

Commit

Permalink
Merge pull request #1611 from samarth-robo/camera_fovy_fix
Browse files Browse the repository at this point in the history
Fix bug in calculating camera FOV
  • Loading branch information
jspricke authored Aug 21, 2016
2 parents c685df9 + 869dd72 commit 8609873
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions visualization/src/interactor_style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ pcl::visualization::PCLVisualizerInteractorStyle::setCameraParameters (const Eig

// Get the width and height of the image - assume the calibrated centers are at the center of the image
Eigen::Vector2i window_size;
window_size[0] = static_cast<int> (intrinsics (0, 2));
window_size[1] = static_cast<int> (intrinsics (1, 2));
window_size[0] = 2 * static_cast<int> (intrinsics (0, 2));
window_size[1] = 2 * static_cast<int> (intrinsics (1, 2));

// Compute the vertical field of view based on the focal length and image heigh
double fovy = 2 * atan (window_size[1] / (2. * intrinsics (1, 1))) * 180.0 / M_PI;
Expand Down

0 comments on commit 8609873

Please sign in to comment.