draw detectedMarkers

This commit is contained in:
2025-11-24 21:53:21 +01:00
parent 92f55249b9
commit 4431f3a574
3 changed files with 12 additions and 3 deletions
+4
View File
@@ -61,6 +61,10 @@ def process_video(detector: cv.aruco.CharucoDetector, board):
def process(detector: cv.aruco.CharucoDetector, board, img, mtx, dist): # Load previously saved data
gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
diamond_corners, diamond_ids, marker_corners, marker_ids = detector.detectDiamonds(gray)
# Draw a square around the markers
cv.aruco.drawDetectedMarkers(img, marker_corners)
if diamond_corners is not None:
# Draw a square around the markers
cv.aruco.drawDetectedDiamonds(img, diamond_corners, diamond_ids)