draw detectedMarkers
This commit is contained in:
@@ -64,6 +64,9 @@ def process(detector: cv.aruco.ArucoDetector, board, img, mtx, dist): # Load pre
|
||||
|
||||
detector.refineDetectedMarkers(img, board, corners, ids, rejected, mtx, dist)
|
||||
|
||||
# Draw a square around the markers
|
||||
cv.aruco.drawDetectedMarkers(img, corners)
|
||||
|
||||
if len(corners) > 0:
|
||||
# Estimate pose of each marker and return the values rvec and tvec---(different from those of camera coefficients)
|
||||
pose, rvec, tvec = cv.aruco.estimatePoseBoard(corners, ids, board, mtx, dist, None, None)
|
||||
@@ -72,8 +75,6 @@ def process(detector: cv.aruco.ArucoDetector, board, img, mtx, dist): # Load pre
|
||||
# Draw Axis
|
||||
cv.drawFrameAxes(img, mtx, dist, rvec, tvec, 0.02)
|
||||
|
||||
# Draw a square around the markers
|
||||
cv.aruco.drawDetectedMarkers(img, corners)
|
||||
|
||||
cv.imshow('img', img)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user