question: how can I get pixels color that match the disparity map

asked 2013-11-10 16:00:47 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I use the method SBGM by OpenCV, and I get the disparity map.(but it doesn't get good performance.)

I use 2 webcams, horizon, and then following these steps..

  1. calibrate the webcams. use the chessboard pic, func: stereoCalibrate()
  2. stereoRectify(), to get external matrix.
  3. set SBGM parameters (the OpenCV sample stereo_match.cpp).
  4. remap left and right pic, use StereoSGBM::operator () to get the disparity map and scaling.

now I get it. but how can I get the color information pixel by pixel, disparity map andBGR source img? My English isn't very good I hope that doesn't make any misunderstand.


and sub-question, I see that the output picture of calibrate, doesn't get good outcome. I'd read some articals mention that : use big chessboard pic may improve output. I try, somtime it work.

**is there any tips that I can improve the calibration outcome(the external matrix of stereo_cam)?

the staitc light will improve it?

the untextured background is better to segemetation?

how to adjust the parm of sgbm?


and the final question. I want to use the training background to detect the forground item, and calculate the forground disparity map. now I can get left, right background img well , but I don't know how to use them combine with sgbm.

the workflow: src(l or r) - bg(l or r) = fg(l or r) -> calculate the disparity map from fg(l or r).

thanks for reading, and if you have any comment, just say it, thanks again.

edit retag flag offensive close merge delete