Drone Detecting White Marker for Stabilization

On a hackathon I implemented trivial image processing algorithm to locate white piece of paper on grey carpet floor to be used for drone horizontal stabilization.

Yesterday I attended a hackathon choosing to join up with colleagues to develop an android app for DJI Phantom 3. We aimed to stabilize the drone horizontally to be able to screw a light bulb into a socket mounted on the ceiling. Ultimately we didn’t succeed, although the journey was very interesting.

White Spot Locator

I mainly focused on locating white piece of paper on grey carpet floor in a picture. I succeeded in that, but lost lots of time setting up my system and using computer of others to implement my code.

I simply blurred the image using gaussian resizing to reduce noise and then implemented threshold for brightness to filter in sufficiently white pixels. After that I located the center of white spot averaging over coordinates of white pixels.

The algorithm suffered from being quite slow as processing took 20 seconds, until I had another look post-hackathon and improved that to 40 miliseconds. Interestingly the algorithm doesn’t require any libraries.

Source

Revised source in my repo, Original hackathon source

Example

Source Image:

Source Image

Blurred:

Blurred

Thresholded:

black and white image with a threshold applied

Marked:

Marked

Lessons Learned

Lesson for me is that whenever speed is needed addressing potential risk is critical. Single small thing off will result in failure. Periodical reevaluation of risk and possible investment is needed.

Preps

Having a little time evening before, I underestimated importance of environmental preparation. Crippled by strange internet connection provided, I was ultimately not able to set my Android Studio straight and had to use computer stations of others.

Morale

Abundance of food is not a good thing as it breaks focus and leads to overeating. As night progresses, sleep deficit will also take its toll on morale and attention.

Micro Iterations

Perhaps strictly periodical stand-ups, risk and investment reviews would improve the implementation.

Sticking To Plan

Sticking to single plan until proven completely impossible is better than experimenting around when severely time constrained.

Created on 04 Nov 2016.
Thank you










About Vaclav Kosar How many days left in this quarter? Twitter Bullet Points to Copy & Paste Averaging Stopwatch Privacy Policy
Copyright © Vaclav Kosar. All rights reserved. Not investment, financial, medical, or any other advice. No guarantee of information accuracy.