diff --git a/samples/tutorials/data/get_disparity.cc b/samples/tutorials/data/get_disparity.cc index ff9ae4a..b5f1fd5 100644 --- a/samples/tutorials/data/get_disparity.cc +++ b/samples/tutorials/data/get_disparity.cc @@ -34,8 +34,8 @@ int main(int argc, char *argv[]) { api->Start(Source::VIDEO_STREAMING); cv::namedWindow("frame"); - cv::namedWindow("disparity"); - // cv::namedWindow("disparity_normalized"); + // cv::namedWindow("disparity"); + cv::namedWindow("disparity_normalized"); while (true) { api->WaitForStreams(); @@ -49,16 +49,16 @@ int main(int argc, char *argv[]) { cv::imshow("frame", img); } - auto &&disp_data = api->GetStreamData(Stream::DISPARITY); - if (!disp_data.frame.empty()) { - cv::imshow("disparity", disp_data.frame); - } - - // auto &&disp_norm_data = api->GetStreamData(Stream::DISPARITY_NORMALIZED); - // if (!disp_norm_data.frame.empty()) { - // cv::imshow("disparity_normalized", disp_norm_data.frame); // CV_8UC1 + // auto &&disp_data = api->GetStreamData(Stream::DISPARITY); + // if (!disp_data.frame.empty()) { + // cv::imshow("disparity", disp_data.frame); // } + auto &&disp_norm_data = api->GetStreamData(Stream::DISPARITY_NORMALIZED); + if (!disp_norm_data.frame.empty()) { + cv::imshow("disparity_normalized", disp_norm_data.frame); // CV_8UC1 + } + char key = static_cast(cv::waitKey(1)); if (key == 27 || key == 'q' || key == 'Q') { // ESC/Q break;