1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-15 20:37:07 +08:00

Replace undefined valid to markersOfBoardDetected

This commit is contained in:
Sergei Shutov
2022-12-22 15:48:26 +02:00
parent 22d0e7180b
commit 8cc11b28b9

View File

@@ -204,7 +204,8 @@ Finally, a full example of board detection:
cv::solvePnP(objPoints, imgPoints, cameraMatrix, distCoeffs, rvec, tvec);
// If at least one board marker detected
if(valid > 0)
markersOfBoardDetected = (int)objPoints.total() / 4;
if(markersOfBoardDetected > 0)
cv::drawFrameAxes(imageCopy, cameraMatrix, distCoeffs, rvec, tvec, 0.1);
}