Skip to content

Commit

Permalink
Merge pull request opencv#26695 from albertoZurini:py_pose_coordinates
Browse files Browse the repository at this point in the history
fix: cast coordinates to int32 for compatibility with line function
  • Loading branch information
asmorkalov authored Jan 3, 2025
2 parents 5e1eed5 + f2878eb commit 9e8b9a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/py_tutorials/py_calib3d/py_pose/py_pose.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9e8b9a0

Please sign in to comment.