2

I'm trying to show a disparity map with stereoSGBM from opencv, but when I show the map, 3 images appear, and I can't find how to show only one disparity map. Here an exemple of what appears (I display it whit the QPixmap class):

The disparity map

Here is my code :

cv::Ptr<cv::StereoSGBM> sgbm = cv::StereoSGBM::create(0, 16, 3);
cv::Mat cv_res;
sgbm->setMode(cv::StereoSGBM::MODE_SGBM_3WAY);
sgbm->compute(left, right, cv_res);
user1810087
  • 5,146
  • 1
  • 41
  • 76
ping_pung
  • 29
  • 3

1 Answers1

0

I had to convert the image to Indexed8.

ping_pung
  • 29
  • 3