diff options
Diffstat (limited to 'tracker-pt/camera.cpp')
-rw-r--r-- | tracker-pt/camera.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tracker-pt/camera.cpp b/tracker-pt/camera.cpp index 5e00499c..263d6617 100644 --- a/tracker-pt/camera.cpp +++ b/tracker-pt/camera.cpp @@ -22,7 +22,7 @@ QString Camera::get_active_name() const return active_name; } -void CamInfo::get_focal_length(double& fx) const +double CamInfo::get_focal_length() const { const double diag_len = sqrt(double(res_x*res_x + res_y*res_y)); const double aspect_x = res_x / diag_len; @@ -30,7 +30,8 @@ void CamInfo::get_focal_length(double& fx) const const double diag_fov = fov * M_PI/180; const double fov_x = 2*atan(tan(diag_fov*.5) * aspect_x); //const double fov_y = 2*atan(tan(diag_fov*.5) * aspect_y); - fx = .5 / tan(fov_x * .5); + const double fx = .5 / tan(fov_x * .5); + return fx; //fy = .5 / tan(fov_y * .5); //static bool once = false; if (!once) { once = true; qDebug() << "f" << ret << "fov" << (fov * 180/M_PI); } } |