heidloff.net - Building is my Passion

Bluemix Selfie Drone now available as Open Source

The Bluemix Selfie Drone is now available as open source. Get the code from GitHub.

The project contains an application to take selfies via a Parrot AR Drone 2.0. Via navigation buttons in a web application the drone can be steered and a series of pictures can be taken. The pictures are stored for later review. Additionally faces on the pictures are recognized and portraits are cropped out which can be tweeted. Check out the screenshot of the web application.


The application has been implemented via IBM Bluemix and the Internet of Things service. The pictures are stored in a Cloudant NoSQL database. The Alchemy Face Recognition API is used to find the faces. The web application has been built via Java and the Liberty for Java runtime.

To run the application you also need to set up the Parrot drone controller which is a Node.js application running on your notebook. This application uses the node-ar-drone module, an implementation of the Parrot networking protocols, to communicate with the drone. To find out more about the app dev capabilities of the Parrat drones check out Parrot For Developers. To find out more about the controller check out the video from Ryan Baxter.

Bluemix made the implementation of the application pretty easy. I used the IoT service because it manages the secure/reliable communications and provides a free tier up to 10 devices for testing. The service has the ability to create organizations, register devices and applications and ensure only applications that are registered to the organization can communicate to the device end points.

I used the AlchemyVision Face API to identify faces on the pictures. There is a simple REST API that you can try online. The API also returns the gender and age of the recognized people which I didn’t use in this application. It even recognizes specific people from a corpus of 60,000 well known people.

I chose the Cloudant NoSQL database because it’s really easy to store the pictures as attachments. It’s also easy to create a database and the design programmatically the first time the application code accesses the database. Plus for development purposes developers can use the database service for free as long as they use less than 20GB of data and less than 100,000 API calls per month.

As runtime I picked Liberty for Java but I also could have used other runtimes like Node.js. I decided to use Java simply because personally I have most experience in Java and I didn’t see a compelling reason to use another technology. There is also a good sample how to use web sockets which I needed to display the pictures and there are also many other samples and tutorials I could leverage. I did the frontend via AngularJS which invokes REST APIs implemented in the Java application.

Featured Blog Posts
The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.
Trending Tags