Future vision for product
We wanted to use Computer Vision to make keeping track of your coins simpler.
What it does
Pi-ggy Bank uses Computer Vision and Artificial Intelligence to work out which coins are being rolled into the money box.
How we built it
The piggyback works by using a 4-stage pipeline of image processing techniques.
The image is segmented using OpenCV to locate coins in the image. The coins are extracted from the image using the locations of coins and then the “histogram features” are then computed. A few hundred training images were extracted using the first stage and then using stage 2 a Support Vector Machine (SVM) classifier is trained. To predict the dropped coins, a series of images are captured after the initial drop and the SVM classifier predicts the coins in each image. The most common prediction is then used as the predicted coin.
Challenges we ran into
The conditions of the training images often did not match the conditions of the test images e.g., different times of the day so lighting is different. Mitigated by normalising lighting conditions.
The aim was to have a Raspberry Pi set up to display the total of the coins in the box on an LCD display, however were unable to get the Pi to connect to the internet soon enough to use it.
Accomplishments that we're proud of
It is our first hardware hack that we have made! AND IT WORKS!
What we learned
Megan: I have learned about how to use OpenCV for segmentation (locating the coins) Jack: It is possible to get something working with very little data Wai-Ching: Getting electronic components to work with the Raspberry Pi is harder than it looks.
What's next for Pi-ggy_Bank
- The final goal of Pi-ggy_Bank would look like the 3D model below. Ideally, the product would simply be a lid with all the components attached, which can be used with any container. The components would include:
- A coin slot for people to drop coins into the container
- IR break beam sensors to detect when a coin has been dropped and send a trigger to the Raspberry Pi to activate the camera
- A ramp to regulate the speed of the coin as it falls and rolls into the container
- As the ramp rolls down the ramp, the camera takes a series of pictures
- The Raspberry Pi deciphers which coin it is, adds it to the total and displays it on the LCD screen