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.
Revised source in my repo, Original hackathon source
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.
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.
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.
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.