[vtkusers] vtkCamera focal length to pixels

David Gobbi david.gobbi at gmail.com
Fri Sep 19 11:28:36 EDT 2014


Obvious error in my previous email: I should have said the tan()
of half the view angle.  Taking the arctan of an angle makes no
sense.

On Fri, Sep 19, 2014 at 9:08 AM, David Gobbi <david.gobbi at gmail.com> wrote:
> By pixels, you mean screen pixels?  The camera's vertical field of view,
> in pixels, is equal to the height of the viewport, which you can get by
> calling GetSize() on the renderer.  The vertical field of view, in mm, is
> controlled by setting the ViewAngle and Distance of the camera.  The
> distance, field of view, and view angle are related by a simple equation
> involving the arctan of half the view angle.  Draw a diagram and you
> should be able to derive the equation without much trouble ;)
>
>  - David
>
>
> On Fri, Sep 19, 2014 at 5:56 AM, luta <sharmaatul11 at gmail.com> wrote:
>> Hi there, I am trying to convert vtkcamera focal length (mm) into pixels so
>> that I can use this to create an intrinsic matrix of the vtkcamera. It would
>> be a great help is someone would guide me in converting vtkcamera focal
>> length into pixels.


More information about the vtkusers mailing list