I'm trying to reconstruct position of chessboard from its stereo correspondences taken from calibrated stereo camera images. According to this answer, I went through whole process as
- Calibrate stereo camera
- Calculate projection matrices
- Triangulate undistorted points
I don't understand one step, that is WHY should I rectify stereo images during stereoCalibration using openCV's cv2::stereoRectify()
or Matlab's rectifyStereoImages
. Or maybe better: HOW should I get projection matrices - by stereo rectification or simply as
P = K×[R|t]
from R, t and K gotten from stereoCalib
/ cameraCalib
function.
As I understood the topic, stereo rectification is somehow important for making depth map, but as I've only ever worked with 3D estimation by triangulation, I am not sure if it is anyhow useful in this case. I've got a bit confused because every single stereo calibration demo I found contains this rectification step.
More complex answers are welcome as I think I figured the answer is simply calculate it by provided equation, but I would like to understand more what this rectification is about.