[vtkusers] Setting Intrinsic Camera Parameters in VTK

David Gobbi david.gobbi at gmail.com
Mon Oct 31 18:38:32 EDT 2011


I suspect that the VTK camera matrix is an entirely different beast
than your calibration matrix.

The VTK camera maps from 3D world coordinates to normalized
view coordinates.  Pixels do not figure into the VTK camera at all,
conversion to pixels is the job of the viewport rather than the
camera.  Since VTK follows OpenGL fairly closely, your best bet
is to look for documentation on glLookAt and glFrustum.  These two
OpenGL functions match closely with the operation the vtkCamera's
ViewTransformMatrix and ProjectionTransformMatrix.

 - David


On Mon, Oct 31, 2011 at 3:12 PM, m_cachia at hotmail.com
<m_cachia at hotmail.com> wrote:
> Hi,
>
> I have not found an adequate response to this question. I have a camera
> calibration matrix in pixel values of the form [fx 0 cx; 0 fy cy; 0 0 1],
> where f is the focal length and c is the principal point. How do I go about
> setting the vtkCamera's intrinsics to this? I have tried SetUserTransform
> and SetUserViewTransform and they do not seem to accomplish the task.
>
> Thank you very much.



More information about the vtkusers mailing list