<div dir="ltr"><div>It would be great to have a vtkCalibratedCamera (or something) that would take the cameras intrinsic parameters.<br> <br></div>The Point Cloud Library (PCL) <a href="http://www.pointclouds.org/">http://www.pointclouds.org/</a> uses VTK for rendering. PCL may already have such a beast or at least a conversion from intrinsics to vtkCamera.<br>
<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 2, 2013 at 12:14 PM, alykhantejani <span dir="ltr">&lt;<a href="mailto:alykhan.tejani06@imperial.ac.uk" target="_blank">alykhan.tejani06@imperial.ac.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am trying to render views of a 3D mesh in VTK, I am doing the following:<br>
<br>
<br>
    vtkSmartPointer&lt;vtkRenderWindow&gt; render_win =<br>
vtkSmartPointer&lt;vtkRenderWindow&gt;::New();<br>
    vtkSmartPointer&lt;vtkRenderer&gt; renderer =<br>
vtkSmartPointer&lt;vtkRenderer&gt;::New();<br>
<br>
    render_win-&gt;AddRenderer(renderer);<br>
    render_win-&gt;SetSize(640, 480);<br>
<br>
    vtkSmartPointer&lt;vtkCamera&gt; cam = vtkSmartPointer&lt;vtkCamera&gt;::New();<br>
<br>
    cam-&gt;SetPosition(50, 50, 50);<br>
    cam-&gt;SetFocalPoint(0, 0, 0);<br>
    cam-&gt;SetViewUp(0, 1, 0);<br>
    cam-&gt;Modified();<br>
<br>
    vtkSmartPointer&lt;vtkActor&gt; actor_view = vtkSmartPointer&lt;vtkActor&gt;::New();<br>
<br>
    actor_view-&gt;SetMapper(mapper);<br>
    renderer-&gt;SetActiveCamera(cam);<br>
    renderer-&gt;AddActor(actor_view);<br>
<br>
    render_win-&gt;Render();<br>
<br>
I am trying to simulate a rendering from a calibrated Kinect, for which I<br>
know the intrinsic parameters. How can I set the intrinsic parameters (focal<br>
length and principle point) to the vtkCamera.<br>
<br>
I wish to do this so that the 2d pixel - 3d camera coordinate would be the<br>
same as if the image were taken from a kinect.<br>
<br>
Thanks<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Set-VTKCamera-intrinsics-tp5722396.html" target="_blank">http://vtk.1045678.n5.nabble.com/Set-VTKCamera-intrinsics-tp5722396.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>