- Joined
- Mar 21, 2021
- Messages
- 1
- Reaction score
- 3
Hello there,
I've been trying to use the Python djitellopy2 module in order to get a live stream from the drone. I've been using the following code:
drone = Tello()
drone.connect()
drone.streamon()
while True:
c = drone.get_frame_read()
f = c.frame
f = cv2.resize(f, (320, 240))
cv2.imshow('stream', f)
This only results in a frozen cv2 window that says 'not responding'. The drone's light also changes from flashing green to flashing red after a few seconds.
What am I doing wrong?
Thanks in advance!
EDIT: I figured out what the problem was... All I had to do was to add the line cv2.waitKey(1) after the imshow line. Hoping this can be helpful for someone
I've been trying to use the Python djitellopy2 module in order to get a live stream from the drone. I've been using the following code:
drone = Tello()
drone.connect()
drone.streamon()
while True:
c = drone.get_frame_read()
f = c.frame
f = cv2.resize(f, (320, 240))
cv2.imshow('stream', f)
This only results in a frozen cv2 window that says 'not responding'. The drone's light also changes from flashing green to flashing red after a few seconds.
What am I doing wrong?
Thanks in advance!

EDIT: I figured out what the problem was... All I had to do was to add the line cv2.waitKey(1) after the imshow line. Hoping this can be helpful for someone

Last edited: