diff --git a/modules/viz/src/vizimpl.cpp b/modules/viz/src/vizimpl.cpp index a927ca65ac..b9cdc91ced 100644 --- a/modules/viz/src/vizimpl.cpp +++ b/modules/viz/src/vizimpl.cpp @@ -509,7 +509,7 @@ void cv::viz::Viz3d::VizImpl::setViewerPose(const Affine3d &pose) } ///////////////////////////////////////////////////////////////////////////////////////////// -cv::Affine3d cv::viz::Viz3d::VizImpl::getViewerPose() +cv::Affine3d cv::viz::Viz3d::VizImpl::getViewerPose() const { vtkCamera& camera = *renderer_->GetActiveCamera(); diff --git a/modules/viz/src/vizimpl.hpp b/modules/viz/src/vizimpl.hpp index 65edffb3dc..d3e7f17350 100644 --- a/modules/viz/src/vizimpl.hpp +++ b/modules/viz/src/vizimpl.hpp @@ -88,7 +88,7 @@ public: void resetCamera(); void setViewerPose(const Affine3d &pose); - Affine3d getViewerPose(); + Affine3d getViewerPose() const; void convertToWindowCoordinates(const Point3d &pt, Point3d &window_coord); void converTo3DRay(const Point3d &window_coord, Point3d &origin, Vec3d &direction);