1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

Merge pull request #26695 from albertoZurini:py_pose_coordinates

fix: cast coordinates to int32 for compatibility with line function
This commit is contained in:
Alexander Smorkalov
2025-01-03 11:43:30 +03:00
committed by GitHub
@@ -36,7 +36,8 @@ Now let's create a function, draw which takes the corners in the chessboard (obt
**cv.findChessboardCorners()**) and **axis points** to draw a 3D axis.
@code{.py}
def draw(img, corners, imgpts):
corner = tuple(corners[0].ravel())
corner = tuple(corners[0].ravel().astype("int32"))
imgpts = imgpts.astype("int32")
img = cv.line(img, corner, tuple(imgpts[0].ravel()), (255,0,0), 5)
img = cv.line(img, corner, tuple(imgpts[1].ravel()), (0,255,0), 5)
img = cv.line(img, corner, tuple(imgpts[2].ravel()), (0,0,255), 5)