How does Camera intrinsic parameter change after image rotation?

asked 2017-04-28 06:20:39 -0600

mirnyy gravatar image

updated 2017-04-28 06:23:41 -0600


i have two undistorted images from the same camera. I also have both the camera intrinsic matrix and distortion coefficients as well.
I want to do stereo rectification.

Both raw pictures are:
image description image description

My workflow is like:

  1. Use the undistort()-function to undistort the image and then turn the image to 90° using t()-method.
  2. Seems to work well, the result is shown below:
    image description image description

    The second image has also a good result.

  3. Then i found some image matches. Looks also right. image description

  4. Then i try to rectify the images using stereoRectify(), but it doesn't work well. I just got black images with just few dots on the left upper corner.
    image description image description

My guess is, that the camera matrix (mainly just the cx, cy) did change during the rotation of 90°, so i use the wrong camera matrix. Does anyone know how the camera matrix should change after the rotation of 90°?

edit retag flag offensive close merge delete


I believe that If you rotate the image you need to permute the c_x and c_y For other intrinsic parameters if your pixel size is square then you don't need change them

ROSpioneer gravatar imageROSpioneer ( 2017-04-28 09:35:13 -0600 )edit

Why did you turn your image ? you can turn image when you want to use imshow

Sterorectify ? Can you explain

LBerger gravatar imageLBerger ( 2017-04-28 10:42:25 -0600 )edit