joshvillbrandt / goprohero

A Python library for controlling GoPro cameras over http.
Apache License 2.0
264 stars 57 forks source link

Exposes numpy preview image to user-facing API #9

Closed tpanzarella closed 7 years ago

tpanzarella commented 9 years ago

Hi Josh,

Here is a quick patch to expose the numpy image to the user-facing API of the GoProHero class. Having access to the image as a numpy array / opencv image directly is nice for doing any sort of image processing or computer vision work directly. Basically you can now:

ok, img = camera.np_image() if ok: imshow(img)

... for example.

There is also other functionality I will likely try to build into this library. I'm interested in getting it set up so that it can be used in autonomous drone operations. So, I hope you don't mind receiving pull requests.

Thanks for putting this library together.

Best, Tom