Bluemix Takes Selfies to the Next Level With Drones

Share this post:

With the latest technology it’s getting easier and easier for people to take pictures, record videos and share them. While two decades ago only professional photographers could afford equipment to produce high quality digital media, today smartphones come with cameras which often produce amazing results. To allow people to take even more impressive pictures, selfie sticks and action cameras have become very popular.

To take this one step further, personally I think drones will become more popular to take pictures and record videos from angles as you couldn’t do this before. There are already quite a few drones that specialize on exactly this use case. The application below shows an easy implementation of a Selfie Drone. While the sample below uses an older drone, you can easily imagine quality improvements with more modern drones, for example drones that have cameras facing to the bottom which can be controlled separately from the actual drone.

I tweeted the portrait on this picture which Alchemy identified

The Bluemix Selfie Drone application is available as open source. 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.

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 Bluemix’s 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 by 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 also 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.

More stories
May 7, 2019

We’ve Moved! The IBM Cloud Blog Has a New URL

In an effort better integrate the IBM Cloud Blog with the IBM Cloud web experience, we have migrated the blog to a new URL:

Continue reading

April 19, 2019

Reach Out to the IBM Cloud Development Teams on Slack

Get the help you need fast—directly from the IBM Cloud Development Teams and other users on Slack.

Continue reading

April 11, 2019

Permanent Redirect to from

Starting on April 27, 2019, we will be turning on permanent redirects from to All of the same functionality that existed on is still available in

Continue reading