Call
camera->getLensParams(left, right, bottom, top, near, far, xshear, yshear);
Your principle point will be
cx = (right - left) + (xshear * (right-left));
cy = (top - bottom) + (yshear * (top - bottom));
Focal length (If I'm understanding the term correctly):cy = (top - bottom) + (yshear * (top - bottom));
fx = right - left;
fy = top - bottom;
fy = top - bottom;
Then call
Producer::Matrix V( camera->getViewMatrix());
R is
Producer::Matrix R(
V[0], V[1], V[2], 0.0,V[4], V[5], V[6], 0.0,
V[8], V[9], V[10], 0.0,
0.0, 0.0, 0.0, 1.0 );
t is
Producer::Vec3( V[12], V[13], V[14]);
-don
On 10/4/06, Goran Tusek <[EMAIL PROTECTED]> wrote:
Hi osg-users,
I have a Producer::Camera object and I need to get the
intrinsic parameters
(cx, cy): coordinates of the principal point
(fx, fy): focal length by the axes x and y
and the extrinsic parameters
(R, t): rotation matrix R and translation vector t that relate the
world coordinate system to the camera coordinate system
Thx for any hints and suggestions,
Goran
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
