easyTello icon indicating copy to clipboard operation
easyTello copied to clipboard

Return frame from library

Open mejavier opened this issue 6 years ago • 2 comments

Hi, Thank you for this amazing library.

I am going to use it to autopilot, based on image processing with OpenCV.

The best way to use easyTello would be to modifiy the methods "_video_thread" and "streamon" to return a frame in OpenCV format, but I don't know hoe to do this.

Could you modifiy tello.py to do this?

Thank you very much.

Javier.

mejavier avatar Dec 11 '19 18:12 mejavier

@openexpertise you can modify the _video_thread to yield the frame based on a flag. This way you will have the frame as a return value without exiting the loop, that will cause the thread to stop and exit the app. Or instead of calling yield frame I would call queue.put(i) where queue was the Queue.Queue passed in during construction of the thread.

Cipulot avatar May 27 '20 12:05 Cipulot

After you turn the stream on with .streamon() you can get the last captured frame with .last_frame in a different thread.

cirvladimir avatar Aug 24 '20 19:08 cirvladimir