Inspiration

We, as a group, were always fascinated with the scene in the original Alice in Wonderland where Alice plays a fascinating game of croquet with the Queen. We previously attempted working with a python computer vision library, and wanted to integrate those motion-tracking capabilities into a project that brought this magical game to life!

What it does

This project simulates a game of croquet, where the user can utilize a virtual mallet in order to hit the balls through each hoop to score. Hitting the outside of a hoop is detected, along with a swing's trajectory, angle, power, etc. This data is then stored in a cloud database for further data analysis.

How we built it

We used a tkinker frontend in python to generate the croquet court and various hoops, as well as the camera-view window for motion-tracking. We also used an Express / MongoDB backend in JavaScript for API calls and database queries, in order to keep track of the data for each user's attempted swing.

Challenges we ran into

Some challenges included creating formulas that correctly detect and simulate the angles and power for hitting the ball, which accurately accounted for different resolutions and scaling of the camera-view window.

Accomplishments that we're proud of

We were able to utilize a computer vision library that detects head and hand movement. Flamingo sprites were overlayed in order to authentically portray Alice's game with the Queen.

What we learned

We learned a lot, in terms of the tkinter and openCV frameworks. This specifically included overlaying images over live video-feed, with the position being tracked by motion-detection.

What's next for Wonderland Croquet!

We plan on implementing data analysis on the queried swings, where users can compare their average powers, scores, etc. and implement machine learning techniques to adequately model different methods of hitting the ball.

Share this project:

Updates