handle empty cameraMatrix
authorAPrigarina <ann73617@gmail.com>
Thu, 18 Feb 2021 13:18:19 +0000 (16:18 +0300)
committerAPrigarina <ann73617@gmail.com>
Thu, 18 Feb 2021 13:18:19 +0000 (16:18 +0300)
samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp

index 87fb460..a6f87f4 100644 (file)
@@ -417,7 +417,7 @@ int main(int argc, char* argv[])
 
     // -----------------------Show the undistorted image for the image list ------------------------
     //! [show_results]
-    if( s.inputType == Settings::IMAGE_LIST && s.showUndistorsed )
+    if( s.inputType == Settings::IMAGE_LIST && s.showUndistorsed && !cameraMatrix.empty())
     {
         Mat view, rview, map1, map2;