mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-16 13:57:05 +08:00
Replace undefined valid to markersOfBoardDetected
This commit is contained in:
@@ -204,7 +204,8 @@ Finally, a full example of board detection:
|
|||||||
cv::solvePnP(objPoints, imgPoints, cameraMatrix, distCoeffs, rvec, tvec);
|
cv::solvePnP(objPoints, imgPoints, cameraMatrix, distCoeffs, rvec, tvec);
|
||||||
|
|
||||||
// If at least one board marker detected
|
// 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);
|
cv::drawFrameAxes(imageCopy, cameraMatrix, distCoeffs, rvec, tvec, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user