stereocalibration Qs

asked 2017-10-07 17:55:05 -0500

bruce gravatar image

i have a pair of webcameras and would love to calibrate it with opencv stereoCalibrate function.
The complete code could be found here:
https://github.com/bruce95/stereocam/...

While executing it ,i use :
chessboard_calibrate_alone_with_data_saving('cam1',obj_points,7,7,(640,480),'cam1') chessboard_calibrate_alone_with_data_saving('cam2',obj_points,7,7,(640,480),'cam2') stereo_match(stereo_calibrate('cam1/2.jpg','cam2/2.jpg'(640,480),load1=True,load2=True,load_name1='cam1',load_name2='cam2'))

The camera 1 pics are here: https://github.com/bruce95/stereocam/...
The camera 2 pics are here: https://github.com/bruce95/stereocam/...
The program works fluently with no errors,but the remaped result is very strange:
https://github.com/bruce95/stereocam/...
https://github.com/bruce95/stereocam/...
So is the match result(disparity map): https://github.com/bruce95/stereocam/...

Anyone knows what the problem is?

edit retag flag offensive close merge delete

Comments

1

I think the problem is probably with getOptimalNewCameraMatrix. The distortion near the edge is enough to make it "fold over" itself, and getOptimalNewCameraMatrixdoesn't realize that, so it gives results pretty far from optimal. See this question and further links.

Try using the original camera matrix, or modifying it manually so it looks right.

Tetragramm gravatar imageTetragramm ( 2017-10-08 15:13:43 -0500 )edit