Merge pull request #1642 from fegorsch:rename-near-to-znear

pull/1646/head
Alexander Alekhin 7 years ago
commit beef60bab5
  1. 10
      modules/ovis/src/ovis.cpp

@ -97,11 +97,11 @@ static void _setCameraIntrinsics(Camera* cam, InputArray _K, const Size& imsize)
Matx33f K = _K.getMat();
float near = cam->getNearClipDistance();
float top = near * K(1, 2) / K(1, 1);
float left = -near * K(0, 2) / K(0, 0);
float right = near * (imsize.width - K(0, 2)) / K(0, 0);
float bottom = -near * (imsize.height - K(1, 2)) / K(1, 1);
float zNear = cam->getNearClipDistance();
float top = zNear * K(1, 2) / K(1, 1);
float left = -zNear * K(0, 2) / K(0, 0);
float right = zNear * (imsize.width - K(0, 2)) / K(0, 0);
float bottom = -zNear * (imsize.height - K(1, 2)) / K(1, 1);
// use frustum extents instead of setFrustumOffset as the latter
// assumes centered FOV, which is not the case

Loading…
Cancel
Save