CUDA StereoBM setMinDisparity-Function
Hello,
is it possible to change the minDisparity-Parameter in the cuda::StereoBM
function like in cv::StereoBM
?
I would like to change that Parameter with a trackbar, but it's not working.
My minimal snippet:
void onTrackbar(int nothing, void* data){
cuda_sbm->setMinDisparity(minDisparity);
cuda_sbm->setNumDisparities(ndisparities);
cuda_sbm->setBlockSize(SADWindowSize);
}
//global
int minDisparity, ndisparities, SADWindowSize;
Ptr<cuda::StereoBM> cuda_sbm = cuda::createStereoBM(ndisparities, SADWindowSize);
//inside main
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);
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)