Hello,
is it possible to change the minDisparity-Parameter in the cuda::StereoBM function like in cv::StereoBM? I would like to change to Parameter with a trackbar, but it's not working.
My snippet:
Ptr<cuda::StereoBM> cuda_sbm = cuda::createStereoBM(ndisparities, SADWindowSize);
cuda_sbm->compute(image1_rectified_grayGPU, image2_rectified_grayGPU, image_disparityGPU);
....
createTrackbar("minDisparity", "Disparitaet", &minDisparity, 50, onTrackbar);
createTrackbar("ndisparities", "Disparitaet", &ndisparities, 100, onTrackbar);
createTrackbar("SADWindowSize", "Disparitaet", &SADWindowSize, 31, onTrackbar);
...
void onTrackbar(int bla, void* data){
cuda_sbm->setMinDisparity(minDisparity);
cuda_sbm->setNumDisparities(ndisparities);
cuda_sbm->setBlockSize(SADWindowSize);
}
It is working with the cuda_sbm->setNumDisparities(ndisparities)
and cuda_sbm->setBlockSize(SADWindowSize)
functions perfectly,
but it doesn't work with cuda_sbm->setMinDisparity(minDisparity)