'How to find the point of a Mediapipe Pose Estimation line that's on the edge of an OpenCV frame?

In this picture, how can I get the x-y coordinates of the points in the red circles for the visible white lines?

enter image description here

I know how to find the landmark x-y points:

for i in results.pose_landmarks.landmark:
  if i.visibility >= 0.90:
    x = int(i.x*cols)
    y = int(i.y*rows)
    allpts.append((x,y))

But how can I get the (x,y) coordinates of the red points where the landmark for the end of the white lines are not visible in the frame?



Sources

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

Source: Stack Overflow

Solution Source