-
-
Example of HTTP response JSON data representing the GoPro's "state". That is, what settings are currently configured.
-
This is an example of how a user might call the GoPro API. Very straightforward interface.
-
This is the GoPro header file. Full list of the functions I have implemented thus far and the syntax of them.
Inspiration
The overall motus is my wanting to delve into the field of computer vision. I needed a camera, and I already owned the GoPro, so writing an API to allow me to remotely control and receive data from the GoPro allows me to make use of it for my later purposes. It was also a fun exercise in handling HTTP requests in a relatively low-level language!
What it does
The API allows me to interface with the GoPro remotely by connecting to its wireless interface and sending HTTP GET requests. The interface is very simple, providing just a GoPro object type with very high-level functions to configure the various settings of the GoPro, like the resolution, framerate, capture mode, etc. or to remotely capture pictures or retrieve a live stream.
How I built it
Months back I ran into a Github repository that detailed the WiFi interface that the modern GoPro's conform to(https://github.com/KonradIT/goprowifihack). Making use of this information, and the socket functionality in the C++ boost::beast package, I was able to make a relatively abstract interface for the device.
Challenges I ran into
Boost is a bit tricky to build and integrate to a CMake build environment :)
Accomplishments that I'm proud of
I'm pretty proud of the structure of my code in this particular project. It also all came together moderately quickly. (Just a weekend, to be exact :) )
What I learned
Tons about HTTP and web sockets in general, beyond what I had learned in class previously.
What's next for GoProAPI_CPP (Inspired, I know)
Towards the end of the hack-a-thon I was working on integrating the API with my OpenGL rendering engine, so I could make a graphical interface for controlling the settings and also to render a real-time stream from the GoPro. I will continue along that path, and then hopefully start using it to experiment with computer vision classification of its streams.
ASIDE: I don't quite know how to provide a compelling video demo of this. Welcome to show in person if that's a possibility! Please don't disqualify me!
Log in or sign up for Devpost to join the conversation.