[vtkusers] Set VTKCamera intrinsics
alykhantejani
alykhan.tejani06 at imperial.ac.uk
Fri Aug 2 12:14:10 EDT 2013
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.
More information about the vtkusers
mailing list