Can we simulate a calibrated camera on PCL vizualizer?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Can we simulate a calibrated camera on PCL vizualizer?

Vinmean
This post has NOT been accepted by the mailing list yet.
I have a calibrated stereo camera. So I have the camera intrinsic matrix for the left camera.  I have built an absolute 3D model of the scanned region which I am able to load as a mesh file.

I have recorded a video of stereo camera's left camera as I scanned the region. I also know the position and orientation of the stereo camera at every point during the scanning process. So I recreated this motion of the stereo camera using PCL. If the position and orientation of the stereo camera in the real world matches with that of the camera of pcl visualizer, will the left cam's photo and the pcl rendered view match?

I tried doing this but looks like the perspective projection done in PCL visualizer is different from that of the camera. If so, is there a way to change the projection algorithm used in PCL visualizer so that I can match the rendered view exactly with the camera's image?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can we simulate a calibrated camera on PCL vizualizer?

Vinmean
This post has NOT been accepted by the mailing list yet.
more simply, can we replace the projection matrix of pcl visualizer (under the hood, that of vtk) ?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can we simulate a calibrated camera on PCL vizualizer?

srwilton
In reply to this post by Vinmean
From my experience with this sort of thing, you will need to play around with the 'setCameraFieldOfView()' value while the virtual camera position and target are aligned to your actual camera position and look vector.

This sets the virtual camera projection to a different field of view:
pclvisualizer->setCameraFieldOfView(float radians);

This sets the camera to parallel (orthographic) projection, if you ever need it:
pclvisualizer->getRendererCollection()->GetFirstRenderer()->GetActiveCamera()->SetParallelProjection(bool orthographic);



Loading...