How to correctly triangluate points with a stereo camera setup

asked 2018-10-08 12:04:44 -0600

kraagg gravatar image

Hello,

i need to triangluate points from two stereo cameras. I have a setup with two cameras that are tilted with an angle of 40° between the image planes. As far as I understand the process, I do the following steps to get the triangulated points:

  1. Rectify input images using stereoRectify and the camera matrix and distortion vector I get from stereo calibration.
  2. Using initUndistortRectifyMap to calculate the maps for remapping, here the camera matrix and distrotion coefficients from stereo calibration and the projection matrix and rotation matrix from stereoRectify is used.
  3. Remap the input image using rempa function and the calculated maps from step 2.
  4. Finally caluclate the triangulation of matching points from both images using the triangulate function and the projection matrix from stereoRectify.

Did I missed something? I get a result doing these steps. But I suppose that something goes wrong. As i get an inconsistent output from the calculated result in my further processing.

I am suspious if the rectification works correctly. What i get after rectification is the following set for the two cameras.

Rectified image for first camera

Rectified image for second camera

I would appreciate any advice. And i hope i didn´t missed to mention a crucial point.

Kind regards, David

edit retag flag offensive close merge delete