fix(sample): nullptr check.
This commit is contained in:
parent
165efd7c79
commit
7e4645f8a9
|
@ -78,6 +78,7 @@ int main(int argc, char *argv[]) {
|
|||
if (left_datas.size() > 0 && right_datas.size() > 0) {
|
||||
auto &&left_frame = left_datas.back().frame_raw;
|
||||
auto &&right_frame = right_datas.back().frame_raw;
|
||||
if (right_frame->data() && left_frame->data()) {
|
||||
if (left_frame->format() == Format::GREY) {
|
||||
cv::Mat left_img(
|
||||
left_frame->height(), left_frame->width(), CV_8UC1,
|
||||
|
@ -109,6 +110,7 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
cv::imshow("frame", img);
|
||||
}
|
||||
}
|
||||
|
||||
if (img_count > 10 && imu_count > 50) { // save
|
||||
// save Stream::LEFT
|
||||
|
|
Loading…
Reference in New Issue
Block a user