Can we simulate a calibrated camera on PCL vizualizer?
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?
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:
This sets the camera to parallel (orthographic) projection, if you ever need it: