1 | initial version |
I dont know if your code is correct, but I think the calibration sample code provided with OpenCV (stereo_calib.cpp) should be correct since it is being included as "official" sample. When I look at the two images (especially the left one with a kind of "circular" error) - I have an impression I got similar error too - in my case the calibration method was not able to properly detect chessboard corners in one of my images - say I had 2 x 10 images and the 5th left image was wrong, because either not all corners were visible in the image or findChessboardCorners was not able to properly detect them. I guess the calibration sample might not be intelligent enough to toss the whole image pair (where one corner detection failed) and probably the final computation is screwed because the source image data was shifted by one image.
So make sure that corners were detected in every single image. The stereo_calib.cpp code in OpenCV 2.4.8 shows the corner detection so you should be able to control the process visually.
2 | No.2 Revision |
I dont know if your code is correct, but I think the calibration sample code provided with OpenCV (stereo_calib.cpp) should be correct since it is being included as "official" sample. When I look at the two images (especially the left one with a kind of "circular" error) - I have an impression I got similar error too - in my case the calibration method was not able to properly detect chessboard corners in one of my images - say I had 2 x 10 images and the 5th left image was wrong, because either not all corners were visible in the image or findChessboardCorners was not able to properly detect them. I guess the calibration sample might not be intelligent enough to toss the whole image pair (where one corner detection failed) and probably the final computation is screwed because the source image data was shifted by one image.
So make sure that corners were detected in every single image. The stereo_calib.cpp code in OpenCV 2.4.8 shows the corner detection so you should be able to control the process visually.
Another reason might be you are feeding left image where right should be - so just switch sides.