Skip to content

Commit

Permalink
Apply formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Kotochleb committed May 27, 2024
1 parent 7f81af6 commit 861fc8d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions image_publisher/src/image_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ void ImagePublisher::onInit()
camera_info_.d = {0, 0, 0, 0, 0};

double f_approx = 1.0; // FOV equal to 0 disables the approximation
if (std::abs(field_of_view_) > std::numeric_limits<double>::epsilon())
{
if (std::abs(field_of_view_) > std::numeric_limits<double>::epsilon()) {
// Based on https://learnopencv.com/approximate-focal-length-for-webcams-and-cell-phone-cameras/
f_approx = (camera_info_.width / 2) / std::tan((field_of_view_ * M_PI / 180) / 2);
}
Expand Down

0 comments on commit 861fc8d

Please sign in to comment.