[vtkusers] vtkCamera focal distance
    Bruno Cafaro 
    cafaro at dis.uniroma1.it
       
    Wed Sep 17 13:58:58 EDT 2014
    
    
  
Hi All,
hope someone can help:
I use vtk 5.8 and i'm tryng to get the K matrix for the vtkCamera, as 
defined in Hartley and Zisserman:
         alpha_x    s               p_x
K =                  alpha_y    p_y
                                         1
I know it is based on the OpenGL camera, so i already gave a look to:
http://ksimek.github.io/2013/06/03/calibrated_cameras_in_opengl/
and
http://strawlab.org/2011/11/05/augmented-reality-with-OpenGL/
However i am not interesed in setting a particular value for the alpha_x 
and alpha_y, but only in retrieving their values, as the i need to 
reproject some points which are not in the renderer, in the same camera, 
for postprocessing. What i need is to know the alpha_x and alpha_y 
values, also with p_x and p_y.
For what i have understood in the previous posts i should use 
vtkCamera::GetProjectionTransformMatrix(aspect,ranges[0],ranges[1]) 
where aspect=window_width/window_eight and ranges come from 
vtkCamera::GetClippingRange(ranges)
the result i get is this:
2.79904     0                 0                 0
0                3.73205      0                 0
0                0                 -1000.02     -10.0001
0                0                 -1                 0
but i'm almost sure there is something wrong.
-- 
Bruno Cafaro
PhD Student
Dip.to Ingegneria informatica, automatica e gestionale "Antonio Ruberti"
Università "La Sapienza"
Via Ariosto, 25
00185 Roma
Tel: +390677274155
    
    
More information about the vtkusers
mailing list