Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

stereo calibration issues

$
0
0
Hi! I'm currently working on a little robot with a stereo setup (made with 2 logitech C270, not the best, but still decent with 640x480 on linux) to detect obstacles indoor and create a 2D maps of the room. I tried to calibrate both cameras then calibrate the whole setup and I achieved finally to get decent results : Left camera with 100 images : errReproj = 0.16552850392837773 cameraMatrix = [813,6236504501936, 0, 322,084934872842; 0, 813,7875223412764, 246,1504964804209; 0, 0, 1] distCoeffs =[0,01298432313476952; 0,06663299254719597; 0; 0; -1,474057784906827] Right camera with 100 images : errReproj = 0.1717557062634702 cameraMatrix = [812,5880346983992, 0, 311,5146085418734; 0, 813,0827212604557, 232,3997472460254; 0, 0, 1] distCoeffs = [0,01009600201848234; -0,2462621231670898; 0; 0; 1,891318564864029] Stereo calibration : RMS=0.3906354057793356 My number seems decent, even if the stereo calibration could be a bit better. I'm using those options for the camera calibration : private static final int flagsCorner = Calib3d.CALIB_CB_FAST_CHECK | Calib3d.CALIB_CB_ADAPTIVE_THRESH | Calib3d.CALIB_CB_NORMALIZE_IMAGE; private static final int flagsCalib = Calib3d.CALIB_CB_FAST_CHECK; private static final TermCriteria criteria = new TermCriteria(TermCriteria.EPS + TermCriteria.COUNT, 5000000, 0.00000001); And those ones for the stereo : private static final int CORNERS_FLAGS = Calib3d.CALIB_CB_FAST_CHECK | Calib3d.CALIB_CB_ADAPTIVE_THRESH | Calib3d.CALIB_CB_NORMALIZE_IMAGE; private static final int CALIB_FLAGS = Calib3d.CALIB_CB_FAST_CHECK; private static final TermCriteria CORNERS_CRITERIA = new TermCriteria(TermCriteria.EPS + TermCriteria.COUNT, 5000000, 0.00000001); private static final TermCriteria CALIB_CRITERIA = new TermCriteria(TermCriteria.EPS + TermCriteria.COUNT, 5000000, 0.0001); So, my issue is that I can't get a decent disparity map. Even if the image seems to be undistored well : Original pic : ![left original](http://i.imgur.com/1fHMi5v.jpg) ![right original](http://i.imgur.com/lMtnVgc.jpg) After undistortion + adding line to show Y axis : ![left undistorded](http://i.imgur.com/MjcAuFt.jpg) ![right undistorded](http://i.imgur.com/Uo7fysB.jpg) But when it goes through the StereoBM.compute(), I can't get a good disparity map, even by tweaking the different values available : ![disparity map](http://i.imgur.com/KbD4tfI.jpg) This is an example with those parameters : Blocksize : 39 Smaller Blocksize : 0 Disp12MaxDiff : 0 Min disparity : 1 Num of disparity : 32 Prefilter cap : 61 Prefilter size : 5 Speckle Range : 0 Speckle window size : 0 Texture threshold : 74 Uniqueness Ratio : 6 So, I would like to know if something looks wrong in my results, matrix, and datas, any help is welcome! Thank you **EDIT** : I made more tests this morning on a more opened area, and I'm getting better results : ![new results](/upfiles/14699587827664365.png) It looks like I'm able to get mid to long range datas (~4/5m and more) but It is struggling with low range. How can I improve this? Is it a calibration issue? The distance between both cameras is currently of 14cm. Is it too much? My goal would be to let the robot navigating among the room, so mid/long range detection is not really important, but close detection is!

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>