1 | initial version |
I think that what you are trying to accomplish by:
disparity.convertTo(disparity32, CV_32F);
bringWithinRange(disparity.ptr(), disparity32.ptr(), disparity.cols, disparity.rows, min_disp, num_disp);
namedWindow("Disparity", 0);
imshow("disparity", disparity32);
Can be accomplished simply by this:
disparity.convertTo(disparity8, CV_8U, 255/(num_disp*16.));
namedWindow("Disparity", 0);
imshow("disparity", disparity8);