From f4007aa78ca597531ec9a7973e57d536108f23b7 Mon Sep 17 00:00:00 2001 From: TinyOh Date: Wed, 13 Mar 2019 14:22:28 +0800 Subject: [PATCH] fix(api): fix get_imu_correspondence --- samples/tutorials/data/get_imu_correspondence.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/samples/tutorials/data/get_imu_correspondence.cc b/samples/tutorials/data/get_imu_correspondence.cc index a32a8df..77d3398 100644 --- a/samples/tutorials/data/get_imu_correspondence.cc +++ b/samples/tutorials/data/get_imu_correspondence.cc @@ -55,16 +55,15 @@ int main(int argc, char *argv[]) { auto &&left_data = api->GetStreamData(Stream::LEFT); auto &&right_data = api->GetStreamData(Stream::RIGHT); + if (left_data.frame.empty() || right_data.frame.empty()) { + continue; + } auto img_stamp = left_data.img->timestamp; LOG(INFO) << "Img timestamp: " << img_stamp << ", diff_prev=" << (img_stamp - prev_img_stamp); prev_img_stamp = img_stamp; - // if (left_data.frame.empty() || right_data.frame.empty()) { - // continue; - // } - cv::Mat img; cv::hconcat(left_data.frame, right_data.frame, img);