amymcgovern / pyparrot

Python interface for Parrot Drones
MIT License
276 stars 129 forks source link

how can I take photo with bebop2? #144

Open EagleX1995 opened 5 years ago

EagleX1995 commented 5 years ago

bebopVision.open_video() won't return current images. All I get were the old images.

amymcgovern commented 5 years ago

Did you read the documentation and the sample code? That is not how you get images.

https://pyparrot.readthedocs.io/en/latest/vision.html

EagleX1995 commented 5 years ago

I had run the sample code demoBebopVision.py The program returned the images from the previous execution.

amymcgovern commented 5 years ago

What OS are you on? sounds like your ffmpeg program didn't clean out the old images.

EagleX1995 commented 5 years ago

The latest macOS. So please tell me how can I clean out the old images. Thank you very much.

amymcgovern commented 5 years ago

that makes it easy! It should be deleting them automatically though. Since Mac OS is my primary environment, I'll go look into that. In the meantime, find the images directory which should be inside your pyparrot installation and remove everything in there.

EagleX1995 commented 5 years ago

Thank you. This is really helpful. Feels like removing all images under the directory after each execution can be the simplest solution for me. I was keeping rebooting and reseting my bebop LOL

amymcgovern commented 5 years ago

Yeah this is definitely in the directory and not on the bebop since you are using ffmpeg. If you use the demoBebopVisionGUI version that won't happen (which is what I use 99% of the time).

amymcgovern commented 5 years ago

I fixed this today. ffmpeg now cleans out the images directory each restart by default (but it can be turned off if you prefer that).

amymcgovern commented 5 years ago

Also fixed the bug where ffmpeg wasn't being killed properly!