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.
edit: the images aren't showing up so here are the URLS: https://imgur.com/1RW4Rnr and https://imgur.com/iwvb83L