'Using realmeter coordinates for cv2.puttext coordinates

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)            


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source