fix(api): plugin error

This commit is contained in:
TinyOh 2019-03-13 18:18:21 +08:00
parent 3c4f8b986b
commit 0025a555ba

View File

@ -41,13 +41,15 @@ int main(int argc, char *argv[]) {
auto &&left_data = api->GetStreamData(Stream::LEFT);
auto &&right_data = api->GetStreamData(Stream::RIGHT);
cv::Mat img;
cv::hconcat(left_data.frame, right_data.frame, img);
cv::imshow("frame", img);
if (!left_data.frame.empty() && !right_data.frame.empty()) {
cv::Mat img;
cv::hconcat(left_data.frame, right_data.frame, img);
cv::imshow("frame", img);
auto &&disp_data = api->GetStreamData(Stream::DISPARITY_NORMALIZED);
if (!disp_data.frame.empty()) {
cv::imshow("disparity", disp_data.frame);
auto &&disp_data = api->GetStreamData(Stream::DISPARITY_NORMALIZED);
if (!disp_data.frame.empty()) {
cv::imshow("disparity", disp_data.frame);
}
}
char key = static_cast<char>(cv::waitKey(1));