Disparity difference between BM and BM_GPU
Dear all,
I am new in OpenCV, and I am testing most of the provided samples to see how they work. I have OpenCV 2.4.11, running on a Ubuntu x86_64 PC, powered with a small GeForce GT 720.
In this context, I have tested the provided cpp stereo matching codes, especially the BM algo : CPU and GPU. I have tested the codes with the provided pictures : it works perfectly using the CPU, but not really using the GPU code (almost black). This is the same for all pictures provided in the OpenCV package...
provided BM code on CPU
provided BM code on GPU
My question is : Is it normal ? Or I have to tune some things in the provided code/pictures
Thanks in advance for your answers.
Best Regards,
Stephane
My first guess is that the scaling of the visualised picture is incorrect for the imshow function... however the problem could lie deeper. Can you link the sample code you are running?
I think you need to normalize the disp (type 16S) variable after computing the BM method. Using some like this:
bm_gpu->compute(d_imageL, d_imageR, d_disp);
d_disp.download(disp);
normalize(disp, disp8U, 0, 255, CV_MINMAX,CV_8U);