Inspiration
We wanted to create a project that would implement both cameras and image processing. We figured that detecting cards in a game of blackjack in order to count them would be simple enough to finish in one night yet still provide a challenge and allow us to learn about image processing, php, and web development.
How it works
A photo is automatically taken by a camera, which is then processed by a computer. First, the cards are cropped out of the image. They are then hashed, and compared to over 400 sample images that we have. The best match is the card that is in the spot.
Challenges I ran into
We had issues learning the details of PHP, as none of us had extensive experience with that language. We also had trouble finding a hash algorithm that worked. The one we did find did not have well documented PHP bindings and was difficult to find out how to use.
Accomplishments that we're proud of
We are proud that we managed to, with little PHP experience, design an advanced PHP application that worked.
What I learned
How to use PHP, image processing, various libraries, and general coding knowledge.
What's next for Hack BlackJack
We could significantly improve the calculation speed by precomputing the hashes of the sample images. This would also save space, as the images would not need to be stored. Adding card counting to the program, which currently does just detection, would also be nice.
Built With
- css
- html
- javascript
- phash
- php
Log in or sign up for Devpost to join the conversation.