Skip to content

Instantly share code, notes, and snippets.

@Daiver
Created April 11, 2013 07:58
Show Gist options
  • Save Daiver/5361559 to your computer and use it in GitHub Desktop.
Save Daiver/5361559 to your computer and use it in GitHub Desktop.
cv::Mat res;
cv::StereoBM bm(CV_STEREO_BM_NORMALIZED_RESPONSE);
bm(left, right, res);
//std::cout<<res;
std::cout<<"type "<<res.type()<<"\n";
cv::Mat tmp = cv::Mat::zeros(res.rows, res.cols, res.type());
for(int i = 0; i < res.rows; i++)
{
for(int j = 0; j < res.cols; j++)
{
tmp.at<uchar>(i, j) = res.at<uchar>(i, j);
std::cout << (int)res.at<uchar>(i, j) << " ";
}
std::cout << std::endl;
}
cv::imshow("some", normalize(tmp));
cv::imshow("any", normalize(res));
cv::waitKey();
exit(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment