[vtkusers] Set VTKCamera intrinsics

Bill Lorensen bill.lorensen at gmail.com
Fri Aug 2 12:48:24 EDT 2013


It would be great to have a vtkCalibratedCamera (or something) that would
take the cameras intrinsic parameters.

The Point Cloud Library (PCL) http://www.pointclouds.org/ uses VTK for
rendering. PCL may already have such a beast or at least a conversion from
intrinsics to vtkCamera.




On Fri, Aug 2, 2013 at 12:14 PM, alykhantejani <
alykhan.tejani06 at imperial.ac.uk> wrote:

> I am trying to render views of a 3D mesh in VTK, I am doing the following:
>
>
>     vtkSmartPointer<vtkRenderWindow> render_win =
> vtkSmartPointer<vtkRenderWindow>::New();
>     vtkSmartPointer<vtkRenderer> renderer =
> vtkSmartPointer<vtkRenderer>::New();
>
>     render_win->AddRenderer(renderer);
>     render_win->SetSize(640, 480);
>
>     vtkSmartPointer<vtkCamera> cam = vtkSmartPointer<vtkCamera>::New();
>
>     cam->SetPosition(50, 50, 50);
>     cam->SetFocalPoint(0, 0, 0);
>     cam->SetViewUp(0, 1, 0);
>     cam->Modified();
>
>     vtkSmartPointer<vtkActor> actor_view =
> vtkSmartPointer<vtkActor>::New();
>
>     actor_view->SetMapper(mapper);
>     renderer->SetActiveCamera(cam);
>     renderer->AddActor(actor_view);
>
>     render_win->Render();
>
> I am trying to simulate a rendering from a calibrated Kinect, for which I
> know the intrinsic parameters. How can I set the intrinsic parameters
> (focal
> length and principle point) to the vtkCamera.
>
> I wish to do this so that the 2d pixel - 3d camera coordinate would be the
> same as if the image were taken from a kinect.
>
> Thanks
>
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Set-VTKCamera-intrinsics-tp5722396.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130802/882cc8a9/attachment.htm>


More information about the vtkusers mailing list