hanyazou / TelloPy

DJI Tello drone controller python package
Other
690 stars 293 forks source link

Accessing camera in picture mode #15

Closed marcollirite closed 6 years ago

marcollirite commented 6 years ago

Hi, firstly thanks for this great python-tello interface!

Is there a way to access the Tello's camera in picture mode? I'm able to save frames from the video feed. However, these are lower quality than what is possible in camera mode (at least through the app), and sometimes they capture pixelation from the video stream.

Any help would be greatly appreciated!

hanyazou commented 6 years ago

I found that @ToxicFrog's fork might have the function.

https://github.com/ToxicFrog/TelloPy https://github.com/ToxicFrog/TelloPy/commit/22f8c95476a92840d08639b752fc86e4fef4d0d6

ToxicFrog commented 6 years ago

That change (TAKE_PICTURE_COMMAND) is for taking still images and saving them as JPEG. There's other commands for changing camera exposure settings and JPEG compression quality that I haven't added support for yet.

There's a separate commit (https://github.com/ToxicFrog/TelloPy/commit/45b92bceed5c8699aad02f9fa4341cf6b4083181) that adds support for toggling the video stream between "photo mode" (high res 4:3) and "video mode" (low res 16:9); you can capture both photos and videos in either mode.

marcollirite commented 6 years ago

Thanks for getting back to me. I spoke with ToxicFrog on the Tello forums and have managed to implement my own (worse) version of it in my own environment, but thanks for the solution.