Setting camera from 3D scanner

 From:  track
8566.6 In reply to 8566.5 
I know how to compute the field of view from the intrinsic parameters of the camera.

I know:
1) How to compute and set the eye position from my (R, T) matrix
2) How to compute and set the lookat position from my (R,T) matrix
3) How to compute and set the field of view from the internal matrix K

In a 3D scanner, the application reconstructs a 3D model and computes the position/orientation of each camera (R, T).
For each point of the 3D model X , we have the following transformations (using matlab notation):

(u, v, w)' = K * (R * X + T)

with K = [ fx 0 cx; 0 fy cy; 0 0 1]
R = [rx; ry; rz]
and T

fx, fy are focal length
cx, cy principal point (the centre of projection)
R rotation matrix, T translation vector that map points in 3D world in the camera space.
u, v projection in the image

From this equation, it is easy to see that the position of the camera expressed in 3D world is -R'*T
The viewing direction expressed in the 3D world is rz, the "up" vector is ry and the "right" vector is rx.

Today in Moi, I can set the position, the target and the field of view. But I don't know how to handle the leftRightAngle, upDownAngle and tiltAngle to get the same orientation.