Still get 9 distortion params without "CV_CALIB_RATIONAL_MODEL"; Stability of stereoRectify() need to be impoved (Bug #1907)
Description
in stereoCalibrate()
, even if CV_CALIB_RATIONAL_MODEL
is not set, I still get 9 distortion params(camera 2 only ). While for the first camera, there's just 5 distortion params. Although this may not influence the rectify step much, I think it's a bug.
By the way, stereoRectify()
doesn't converge to a good result. While stereoRectifyUncalibrated()
do work. But when I use undistorted image (see code below which follows the sample in stereo_calib.cpp
), even stereoRectifyUncalibrated()
does not work. I think the stability of the alg. should be improved and a step to check whether the result is valid is needed. Tks.
1vector<Point2f> allimgptUndistorted[2];
2for (int k=0;k<2;k++){
3 undistort(allimgpt[k],allimgptUndistorted[k],cameraMatrix[k],distCoeffs[k]);
4 allimgpt[k]=allimgptUndistorted[k];
5}
The images I used are given in the attachments.
Associated revisions
Merge pull request #1907 from severin-lemaignan:emscripten-2.4
History
Updated by Andrey Kamaev almost 13 years ago
- Description changed from in stereoCalibrate(), even if "CV_CALIB_RATIONAL_MODEL" is not set,... to in @stereoCalibrate()@, even if @CV_CALIB_RATIONAL_MODEL@ is not set, I still... More
- Category set to calibration, 3d
- Assignee set to Ilya Lysenkov
Updated by Ilya Lysenkov almost 13 years ago
- Assignee deleted (
Ilya Lysenkov)
Updated by Vadim Pisarevsky about 12 years ago
- Affected version set to 2.4.3
- Target version deleted ()
Updated by Ilya Lysenkov about 12 years ago
- Assignee set to Ilya Lysenkov
Updated by Ilya Lysenkov about 12 years ago
1. Number of distortions parameters.
Cannot reproduce the problem (tested the latest 2.4 branch under Mac OS X 10.7.5 and Ubuntu 12.04.1 LTS). With CV_CALIB_RATIONAL_MODEL I get 8 parameters for both cameras, 5 parameters are returned for both cameras without it. Perhaps the problem was already fixed.
2. Stability of stereoRectify()
.
Reproduced the problem. However, stereoRectify()
is not the source of the error, the reason is bad calibration: a computed camera matrix for VGA resolution is
55882 0 -1420 0 55882 425 0 0 1
(
stereo_calib
sample with default parameters was used), which is not plausible.
10 pairs of images is not enough for reliable stereo calibration. Try to collect more images to get decent calibration. Also it can make sense to do mono calibration at first and then use fixed intrinsics in stereo calibration.
- Status changed from Open to Cancelled
Updated by Kirill Kornyakov about 12 years ago
- Target version set to 2.4.4