From 8cda9a8252b24421aa2283ca071db5734e90c243 Mon Sep 17 00:00:00 2001 From: manongjohn Date: Sat, 5 Mar 2022 00:09:45 -0500 Subject: [PATCH] Add missing checkerboard calibration pattern warning --- toonz/sources/stopmotion/stopmotioncontroller.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/toonz/sources/stopmotion/stopmotioncontroller.cpp b/toonz/sources/stopmotion/stopmotioncontroller.cpp index 2a3c10c0..fa3f5af6 100644 --- a/toonz/sources/stopmotion/stopmotioncontroller.cpp +++ b/toonz/sources/stopmotion/stopmotioncontroller.cpp @@ -4113,7 +4113,14 @@ void StopMotionController::captureCalibrationRefImage(cv::Mat &image) { bool found = cv::findChessboardCorners( image, m_stopMotion->m_calibration.boardSize, corners, cv::CALIB_CB_ADAPTIVE_THRESH | cv::CALIB_CB_FILTER_QUADS); - if (found) { + if (!found) { + TFilePath patternFp = ToonzFolder::getLibraryFolder() + + "camera calibration" + "checkerboard.tif"; + DVGui::warning( + tr("Unable to find complete checkerboard pattern. Check pattern " + "position and camera settings.\n\nPrint and use %1 to calibrate.") + .arg(patternFp.getQString())); + } else { // compute corners in detail cv::cornerSubPix( image, corners, cv::Size(11, 11), cv::Size(-1, -1),