[vtkusers] Set VTKCamera intrinsics
Bill Lorensen
bill.lorensen at gmail.com
Fri Aug 2 12:55:00 EDT 2013
Yes, but the method is SetViewAngle.
On Fri, Aug 2, 2013 at 12:52 PM, alykhantejani <
alykhan.tejani06 at imperial.ac.uk> wrote:
> I know we can set the viewing angle with vtkCamera::SetViewingAngle and
> also the focal length can then be determined from this angle and the image
> dimensions. Additionally the principle point can be worked out from the
> image dimensions. So does the vtkCamera make use of the viewing angle?
>
> Thanks
>
>
>
> On 02/08/13 17:48, Bill Lorensen [via VTK] wrote:
>
> 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 <[hidden email]<http://user/SendEmail.jtp?type=node&node=5722399&i=0>
> > 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
>
> _______________________________________________
> 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
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://vtk.1045678.n5.nabble.com/Set-VTKCamera-intrinsics-tp5722396p5722399.html
> To unsubscribe from Set VTKCamera intrinsics, click here.
> NAML<http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
> ------------------------------
> View this message in context: Re: Set VTKCamera intrinsics<http://vtk.1045678.n5.nabble.com/Set-VTKCamera-intrinsics-tp5722396p5722400.html>
>
> Sent from the VTK - Users mailing list archive<http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html>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/7ff49419/attachment.htm>
More information about the vtkusers
mailing list