Ask Your Question

Revision history [back]

Coordinates and 3D reconstruction after stereoCalibration

I am new to OpenCV stereovision and several questions after running the sample stereo_calib.cpp using the sample leftImage and rightImage pairs: 1. I have tried to reconstruct 3D points using the image pairs for calibration: imagePoints[0] and imagePoints[1]. We should be able to get a point cloud in the 3D object space consisting of corners in all board orientations. what's the procedure to do this? 2. Some documents said we need to rectify the two images first, then find the matching feature like corners. Because we already have matched image pairs (distorted) that are used for calibration, I do not want to run matching again and just want to use the image pairs for 3D reconstruction. I also try to avoid remapping the entire images to save image processing time. to do this, first thing is to understand what in rmap matrix. After "initUndistortRectifyMap(cameraMatrix[0], distCoeffs[0], R1, P1, imageSize, CV_16SC2, rmap[0][0], rmap[0][1])" at line 278 and 279, rmap[0][0] has 3.15 MB while rmap[0][1] has 1.61 MB. From openCV document, one mapping is for Y and one map for X, then they should be the same size. Why do they have different size? how to use them without using remap() function?
3. Where is the origin of the 3D object coordinate system located after stereo calibration? Thanks, Jim

click to hide/show revision 2
No.2 Revision

Coordinates and 3D reconstruction after stereoCalibration

I am new to OpenCV stereovision and several questions after running the sample stereo_calib.cpp using the sample leftImage and rightImage pairs: 1. pairs:

  1. I have tried to reconstruct 3D points using the image pairs for calibration: imagePoints[0] and imagePoints[1]. We should be able to get a point cloud in the 3D object space consisting of corners in all board orientations. what's the procedure to do this? 2. this?
  2. Some documents said we need to rectify the two images first, then find the matching feature like corners. Because we already have matched image pairs (distorted) that are used for calibration, I do not want to run matching again and just want to use the image pairs for 3D reconstruction. I also try to avoid remapping the entire images to save image processing time. to do this, first thing is to understand what in rmap matrix. After "initUndistortRectifyMap(cameraMatrix[0], distCoeffs[0], R1, P1, imageSize, CV_16SC2, rmap[0][0], rmap[0][1])" at line 278 and 279, rmap[0][0] has 3.15 MB while rmap[0][1] has 1.61 MB. From openCV document, one mapping is for Y and one map for X, then they should be the same size. Why do they have different size? how to use them without using remap() function?
    3.
  3. Where is the origin of the 3D object coordinate system located after stereo calibration? Thanks, Jim