Closed 1158755456 closed 4 years ago
my code is as follows,maybe you can tell me what's wrong:
gaze = GazeTracking() cap = cv2.VideoCapture() cap.open('one.mp4') n_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) for i in range(n_frames):
ret, frame = cap.read()
gaze.refresh(frame)
frame = gaze.annotated_frame()
text = ""
......
cv2.imshow("video", frame)
if cv2.waitKey(1) == 27:
break
my code is as follows,maybe you can tell me what's wrong:
gaze = GazeTracking() cap = cv2.VideoCapture() cap.open('one.mp4') n_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) for i in range(n_frames):
ret, frame = cap.read() gaze.refresh(frame) frame = gaze.annotated_frame() text = "" ...... cv2.imshow("video", frame) if cv2.waitKey(1) == 27: break
Hello, may I ask if you have solved it? How do you input a video for tracking?
When I tried to input the video stream, I could not detect the pupil coordinates. Can you give an example?