Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Large Baseline Stereo Causing Issues

I'm attempting to perform a stereo calculation on two cameras with a pretty wide baseline with bad results. I can't seem to find parameters for the block matching that yield good results. Everything looks noisy and pretty terrible. I feel like I've tried everything and could use some advice for what else to try. Parameters I'm currently using are as follows:

cv::Ptr<cv::StereoBM> bm = cv::StereoBM::create(16,1);
bm->setPreFilterCap(4);
bm->setPreFilterSize(5);
bm->setPreFilterType(1);
bm->setBlockSize(7);
bm->setMinDisparity(-103);
bm->setNumDisparities(656);
bm->setTextureThreshold(104);
bm->setUniquenessRatio(0);
bm->setSpeckleWindowSize(0);
bm->setSpeckleRange(0);
bm->setDisp12MaxDiff(111);
cv::Mat disp;

Attached are some calibrated test images.

right image

left image

edit: the images aren't showing up so here are the URLS: https://imgur.com/1RW4Rnr and https://imgur.com/iwvb83L

Large Baseline Stereo Causing Issues

I'm attempting to perform a stereo calculation on two cameras with a pretty wide baseline with bad results. I can't seem to find parameters for the block matching that yield good results. Everything looks noisy and pretty terrible. I feel like I've tried everything and could use some advice for what else to try. Parameters I'm currently using are as follows:

cv::Ptr<cv::StereoBM> bm = cv::StereoBM::create(16,1);
bm->setPreFilterCap(4);
bm->setPreFilterSize(5);
bm->setPreFilterType(1);
bm->setBlockSize(7);
bm->setMinDisparity(-103);
bm->setNumDisparities(656);
bm->setTextureThreshold(104);
bm->setUniquenessRatio(0);
bm->setSpeckleWindowSize(0);
bm->setSpeckleRange(0);
bm->setDisp12MaxDiff(111);
cv::Mat disp;

Attached are some calibrated test images.

right image

left image

edit: the images aren't showing up so here are the URLS: https://imgur.com/1RW4Rnr and https://imgur.com/iwvb83L

edit 2: I've done some more tests and found that with a very close baseline (< 10mm) I can get sane results, but the accuracy is low. I'd rather a large baseline which should yield better accuracy, but the output just looks like noise.

Large Baseline Stereo Causing Issues

I'm attempting to perform a stereo calculation on two cameras with a pretty wide baseline with bad results. I can't seem to find parameters for the block matching that yield good results. Everything looks noisy and pretty terrible. I feel like I've tried everything and could use some advice for what else to try. Parameters I'm currently using are as follows:

cv::Ptr<cv::StereoBM> bm = cv::StereoBM::create(16,1);
bm->setPreFilterCap(4);
bm->setPreFilterSize(5);
bm->setPreFilterType(1);
bm->setBlockSize(7);
bm->setMinDisparity(-103);
bm->setNumDisparities(656);
bm->setTextureThreshold(104);
bm->setUniquenessRatio(0);
bm->setSpeckleWindowSize(0);
bm->setSpeckleRange(0);
bm->setDisp12MaxDiff(111);
cv::Mat disp;

Attached are some calibrated test images.

right image

left image

edit: the images aren't showing up so here are the URLS: https://imgur.com/1RW4Rnr and https://imgur.com/iwvb83L

edit 2: I've done some more tests and found that with a very close baseline (< 10mm) I can get sane results, but the accuracy is low. I'd rather a large baseline which should yield better accuracy, but the output just looks like noise.

edit 3: to make it easier to see what I'm talking about, attached are images of the disparity result and the disparity converted to a point cloud in PCL https://imgur.com/a/qXLL0 and https://imgur.com/weSYTDg