Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Return frame from library #18

Open
mejavier opened this issue Dec 11, 2019 · 2 comments
Open

Return frame from library #18

mejavier opened this issue Dec 11, 2019 · 2 comments

Comments

@mejavier
Copy link

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.

@Cipulot
Copy link

Cipulot commented May 27, 2020

@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.

@cirvladimir
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants