mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08: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:
commit
9e8b9a0ebb
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user