From bf6c367399ba718db36f7ad5d2592835fb7b9da6 Mon Sep 17 00:00:00 2001 From: Alex Bailo Date: Sat, 3 Feb 2024 13:52:04 +0100 Subject: [PATCH] wip --- McCalib/src/McCalib.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/McCalib/src/McCalib.cpp b/McCalib/src/McCalib.cpp index f43a4c3d..694d4893 100644 --- a/McCalib/src/McCalib.cpp +++ b/McCalib/src/McCalib.cpp @@ -279,6 +279,12 @@ void Calibration::detectBoardsInImageWithCamera(const std::string frame_path, const int frame_idx) { LOG_INFO << "Got here1 "; cv::Mat image = cv::imread(frame_path); + if(image.empty()) + { + std::cout << "Could not read the image: " << frame_path << std::endl; + return 1; + } + LOG_INFO << "Got here1-2 "; // Greyscale image for subpixel refinement cv::Mat graymat;