使用cv2的接管表坐标。
我找到了实时更改的x,y坐标,我想将其分配给cv2.puttext
函数的位置值。但是它一直失败。我如何使用实时移动的x,y坐标
? “它不断失败”是当我在CV2.putText
坐标x,y代码:
image_hight, image_width, _ = image.shape
x_coodinate = results.pose_landmarks.landmark[mp_pose.PoseLandmark.LEFT_SHOULDER].x * image_width
y_coodinate = results.pose_landmarks.landmark[mp_pose.PoseLandmark.LEFT_SHOULDER].y * image_hight
cv2.puttexxt
代码:代码:代码:
cv2.putText(image, str(results.pose_landmarks.landmark[mp_pose.PoseLandmark.LEFT_SHOULDER].x * image_width),(x_coodinate,y_coodinate), cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0,0,0), 1, cv2.LINE_AA)
I found the x,y coordinates that change in real time, and I want to assign this to the position value of the cv2.puttext
function. But it keeps failing. How can I use x,y coordinates that move in real time?`
extra explain)
'it keeps failing' is when i apply in cv2.puttext
Coordinate x,y code:
image_hight, image_width, _ = image.shape
x_coodinate = results.pose_landmarks.landmark[mp_pose.PoseLandmark.LEFT_SHOULDER].x * image_width
y_coodinate = results.pose_landmarks.landmark[mp_pose.PoseLandmark.LEFT_SHOULDER].y * image_hight
cv2.puttext
code:
cv2.putText(image, str(results.pose_landmarks.landmark[mp_pose.PoseLandmark.LEFT_SHOULDER].x * image_width),(x_coodinate,y_coodinate), cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0,0,0), 1, cv2.LINE_AA)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论