Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in calculating camera FOV #1611

Merged
merged 1 commit into from
Aug 21, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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