What it does
Music games are more fun when you can pretend to look as cute as Nayeon moving her bunny ears to the rhythm of "What Is Love". Featuring taps, holds and swipes, RabbitMania streamlines the process of looking dumb in front of your friends by making you manipulate the bunny ears in ways you never thought possible. Through the use of state-of-the-art if-else statements for webcam motion detection, RabbitMania tracks the bunny ears with unrivalled  precision, enabling you to feel bad when you can't raise the ears within 0.1s of the beat. The game now features rhythm tracks for popular songs such as "Caravan Palace", "Lone Digger", "Fireflies", "Kill the Beat" and "Bad Apple", come and try it out for yourself!
How we built it
We chose to use our own algorithm in favour of traditional libraries such as OpenCV or ML classification libraries due to performance concerns, as a music game requires the processing of a live video feed at a high FPS to preserve the accuracy of judgement.
The algorithm we used is surprisingly simple and elegant: first, filter out all the white pixels in the image, then consider the median X and Y as a baseline. The swipes are tracked by measuring the speed of change of the median X over time. We then consider the pixels in the bottom 20% of X values (leftmost) and the top 20% of X values (rightmost) and take the 5th percentile pixel in Y (almost topmost) in each set. The difference in Y between the median Y and the chosen pixel on each side is used to determine if the bunny ears are up or not, by comparing them with a multiple of the standard deviation in Y. This algorithm turned out to be very reliable, yet fast.
Challenges we ran into
Our wrists really hurting after testing the game for hours on end. Will never look at a pair of bunny ears the same way again.
Accomplishments that we're proud of
Getting a full combo of 160 on one of the songs.
What we learned
What's next for RabbitMania
Can we get a HPB endorsement? How about integration with Healthy 365? I'm sure this burns lots of calories, right?