Suspicious cvTriangulatePoints (Bug #1575)
Description
For matrices computed by cv::stereoRectify (P1 and P2) the function cvTriangulatePoints yields totally different results than for reprojection using reprojection matrix Q computed by cv::stereoRectify as well. The point computed using Q matrix is: P = Q*p, where p is vector (x_l, y_l, x_l - x_r, 1). I work on already undistorted/rectified images.
Also I found its implementation very suspicious. The part of the function after comments
"/* We can compute reprojection error if need */"
has no effect for anything outside of the function.
Associated revisions
Added a check that Q reprojects to the same 3D points as reconstructed by triangulation (#1575)
Merge pull request #1575 from jet47:gpu-buffer-pool
History
Updated by Alexander Shishkov almost 13 years ago
- Priority changed from High to Normal
- Target version deleted ()
Updated by Alexander Shishkov almost 13 years ago
- Assignee deleted (
Vadim Pisarevsky)
Updated by Ilya Lysenkov almost 13 years ago
- Assignee set to Ilya Lysenkov
Updated by Ilya Lysenkov almost 13 years ago
Thank you for the report, you are completely right.
1. Q matrix was computed incorrectly in stereoRectify and it is fixed in r7666.
2. The code after comments "/* We can compute reprojection error if need */" was redundant and it is turned off in r7527.
Now cvTriangulatePoints produces the same 3D points as by using the reprojection matrix Q. Such a check is added in r7669.
- Status changed from Open to Done
Updated by Alexander Shishkov almost 13 years ago
- Target version set to 2.4.0