Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Bluemix Selfie Drone Now Available as Open Source

DZone's Guide to

Bluemix Selfie Drone Now Available as Open Source

All the code for the Parrot AR Drone selfie application can now be seen on GitHub.

· IoT Zone
Free Resource

Cisco IoT makes digital transformation a reality in factories, transportation, and utilities. Learn how to start integrating with Cisco DevNet.

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. Faces on the pictures are recognized and portraits are cropped out that 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 this 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. 

For a 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 of how to use web sockets, which I needed to display the pictures.

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.

Cisco is a software company. Surprised? Don’t be. Join DevNet to explore APIs, tools, and techniques that developers are using to add collaboration, IoT, security, network priority, and more!

Topics:
iot ,ibm bluemix ,drones ,nosql ,node.js ,java

Published at DZone with permission of Niklas Heidloff, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}