I am having trouble when trying to create depth map using OpenCV on Python. The problem is that the rectified images appears to be wrapped, or distorted. Here is the code.
https://pastebin.com/embed_js/1DHpCPgv
Long story short, the code performs a series of program begin with:
Reading image file captured from two cameras Calibrate each cameras separately Using instrict matrices and distortion values to be parameters when i call StereoCalibrate() The images folders I used contains 68 different images for each camera (136 in total). The results from calibrateCamera() are 0.77 and 0.94 for each cameras.
The retVal I collected from StereoCalibrate() was huge, 39.0. So I guessed there is problem in the codes.
The images of camera frame captured before and after rectification are shown here: original image rectified image
Now, I truly frustrated as I don't know what I have done wrong? I also tried to search this problem in Google but it's seem that the solution is to calibrate cameras more to get better instrict matrices and distortions values. Personally, I don't believe this is the core issues and think that I did choose wrong parameters for method instead. What do you think? Please gives me some advices ... ~