2020-08-12 03:40:14 -0600 | received badge | ● Notable Question (source) |
2018-09-21 10:21:12 -0600 | received badge | ● Teacher (source) |
2018-09-07 07:03:03 -0600 | received badge | ● Popular Question (source) |
2017-05-10 14:45:05 -0600 | received badge | ● Nice Question (source) |
2017-05-10 14:44:54 -0600 | received badge | ● Necromancer (source) |
2017-05-10 14:44:54 -0600 | received badge | ● Self-Learner (source) |
2017-01-20 07:49:35 -0600 | received badge | ● Student (source) |
2017-01-20 06:57:37 -0600 | received badge | ● Scholar (source) |
2017-01-20 06:57:32 -0600 | answered a question | Stereo Rectify doesn't rectify even with correct M and D I fixed it by changing the stereoCalibrate flags. For example using: cv::CALIB_RATIONAL_MODEL + cv::CALIB_FIX_K3 + cv::CALIB_FIX_K4 + cv::CALIB_FIX_K5 + cv::CALIB_FIX_K6 Another thing that gave larger RMS error, but at least a correct remap was calibrating intrinsics and extrinsics together. So no cv::CALIB_USE_INTRINSIC_GUESS + cv::CALIB_FIX_INTRINSIC For now there is nothing else I found to be working. |
2016-08-25 06:49:07 -0600 | received badge | ● Enthusiast |
2016-04-19 02:38:18 -0600 | commented question | Stereo Rectify doesn't rectify even with correct M and D Yes, sorry, I meant undistorted when I said rectified at top image. I have calibrated numerous times and it doesn't matter. And the numbers I get suggest the calibration is successful. I get good undistorted images after intrinsic calibration (as can be seen in the second image) and I get good T and R values after extrinsic calibration, but the rectification result is extremely incorrect. I do have a confusion that OpenCV docs have never clarified - when a function asks for distortion coefficients D, then does it internally use this to distort the input, or undistort it? Like in solvePnP, do I give distorted points (so I do "raw" points as input) and CV uses D to compensate distortion or I give undistorted points (so I do point extraction from a remap()'d image) and CV uses D compensate? |
2016-04-18 09:01:01 -0600 | asked a question | Stereo Rectify doesn't rectify even with correct M and D I cannot figure out a problem with stereoRectify or initUndistortRectifyMap. It might be related to this question but the user didn't post enough information for me to determine it. I do stereo calibration in two passes, because then we can split the intrinsic and extrinsic calibration, but it doesn't seem to work. These are inputs: You can see radial lens distortion that needs to be corrected. So after each camera calibration I get a pretty good rectified images: Left Camera Matrix: Left Camera D: Right Camera Matrix: Right Camera D: Now I do calibration together. I call stereoCalibrate like this: RMS error: 0.716278 Average reprojection error: 0.932500 I get quite sane results. R is almost identity, showing that the cameras are very parallel: And T is also showing correct results: It shows that the distance between cameras is 285mm, which is as precise as I can physically measure. So it seems all the inputs are correct. Now I call stereoRectify() like so: R1: R2: P1: P2: Q: Q also seems correct (1/B = 1/235 = 3.505e-003). But now when I use the remap function I get this: I use OpenCV3.0. Maybe this was fixed in 3.1? I have calibrated stereo cameras with OpenCV before, and while it was painful it wasn't impossible. I have calibrated numerous times and I always get the same result. When I set Alpha to 0.0 in stereoRectify I get image like this: But it is wrong as well ... (more) |
2016-04-18 03:22:01 -0600 | commented question | Stereo Rectify get incorrect result! I have a similar problem. I calibrate the cameras independently to find intrinsics (distortions in particular) - I get correct undistorted images (<1 rms). Then stereoCalibrate to find extrinsics only - again I get correct R and T (R almost identity matrix because the cameras are parallel and T having very close to my measured translation). But now when I put all these correct inputs in stereoRectify() I get junk P1, P2 and Q. Or at least the next initUndistortRectifyMap() and remap() functions return very wrong images (like the one you posted, polar like). Any help on this? I haven't tried "uncalibrated". |