Inspiration
Our goals were to have fun and learn! In delving into some ideas that had potential as fun additions to students' lives, we decided on Party Time. We wanted to provide a cool way for students and teens to extend beyond their usual, mundane photo-taking apps by throwing a mini-party with math, colors, and the students themselves, right on their computers. However, we also wanted to have some fun ourselves, and thus decided to implement and develop our algorithms mathematically to match the catchy beat.
What it does
When run, the app opens up the camera and plays music. Your image on the screen is either outlined by colorful lines or the corresponding spaces are full of bright colors. The colors change to the beat of the music, and you can't help but dance along!
How we built it
We wrote it using nothing but Emacs and Clang, linking with OpenCV. One of our team members had previous experience with OpenCV, and he quickly made a mockup of the application using Canny Edge Detection. Later, we spent time dividing the image into connected components and detecting contours. One major challenge was finding an appropriate coloring of the image. The problem can be modeled as a graph problem. The 4-color theorem guarantees that it is possible to color the image such that no two adjacent connected components have the same color. Unfortunately, we found that finding an optimal coloring is an NP-Complete problem. We settled for a quadratic algorithm that had sufficient bounds on the number of distinct colors to meet our requirements. On the second day, we spent most of the time researching and implementing algorithms to develop a beat detector to find the beat of a song. This way, we can flash the colors to the beat of the music.
Challenges we ran into
We originally wanted to make it an app on Android to better connect the app with the growing population that owns a smartphone, but found that Android Studio was difficult to integrate with the code we already had. Instead of losing some of the functionality, we decided to make it the best we could, on a desktop. Additionally, with the music, we found that the mp3 files were more difficult to parse and find the beat of, so we ended up using wav files, whose data is easier to process.
Accomplishments that we're proud of
We're quite proud that we ended up with a project that makes people smile, and for debugging so many of the issues that we never expected.
What we learned
Most of our team learned a lot about OpenCV and we all increased our knowledge about Android Studio before we decided to move on with another platform. We also affirmed our enjoyment of working with our group on a fun CS project, the numerous companies who offered us so many resources during this hackathon, and all the incredible people we met here this weekend!
What's next for Party Time
Hopefully a mobile app to integrate with other social media, additional music and customizations with more beats and colors, and faster/more precise algorithms to make the experience better for all our users!
Log in or sign up for Devpost to join the conversation.