Skip to content

Commit

Permalink
[cameras] Cast image size to double.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoulon committed Jul 17, 2018
1 parent 1e007ae commit 7474094
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/openMVG/cameras/Camera_Spherical.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ using class_type = Intrinsic_Spherical;
*/
virtual Vec2 cam2ima(const Vec2 &p) const override
{
const size_t size = std::max(w(), h());
const double size(std::max(w(), h()));
return {
p.x() * size + w() / 2.0,
p.y() * size + h() / 2.0 };
Expand All @@ -102,7 +102,7 @@ using class_type = Intrinsic_Spherical;
*/
virtual Vec2 ima2cam(const Vec2 &p) const override
{
const size_t size = std::max(w(), h());
const double size(std::max(w(), h()));
return {
(p.x() - w() / 2.0) / size,
(p.y() - h() / 2.0) / size };
Expand Down

0 comments on commit 7474094

Please sign in to comment.