We see a lot of Raspberry Pis used to play games, but this is something entirely different from the latest RetroPie build. This Raspberry Pi is learning how to read playing cards, with the goal of becoming the ultimate card counting blackjack player.
If [Taxi-guy] hasn’t named his project Rain Man, we humbly suggest that he does so. Because a Pi that can count into a six-deck shoe would be quite a thing, even though it would never be allowed anywhere near a casino. Hurdle number one in counting cards is reading them, and [Taxi-guy] has done a solid job of leveraging the power of OpenCV on a Pi 3 for the task. His description in the video below is very detailed, but the approach is simple: find the cards in a PiCam image of the playing field using a combination of thresholding and contouring. Then, with the cards isolated, compare the rank and suit in the upper left corner of the rotated card image to prototype images to identify the card. The Pi provides enough horsepower to quickly identify an arbitrary number of non-overlapping cards; we assume [Taxi-guy] will have to address overlapping cards and decks that use different fonts at some point.
We’re keen to see this Pi playing blackjack someday. As he’s coding that up, he may want to look at algorithmic approaches to blackjack strategies, and the real odds of beating the house.
Continue reading “A Raspberry Pi Rain Man in the Making”
Virtual card games proliferate the interwebs, but this card-playing telepresence device is unique. [Patrick] calls the project Vanna, and we’d bet that’s an homage to the tile-flipping TV star [Vanna White]. Much like she flips the blank tiles to reveal letters, this device can flip the hand of cards either face up or face down.
Each of the six card trays is connected to a stepper motor. The local player deals the hands, placing each card in a tray so that it faces the webcam for the remote player. That remote player has an on-screen interface that can discard by tilting the tray forward and dropping the card on its face, or play a card by tilting toward to the local player so they can see its face value. All becomes clear in the clip after the break.
The hardware is USB controlled from a Windows machine thanks to the PIC 18F4585 which controls it. But it should be quite simple to get it talking to the OS of your choice.
Continue reading “Telepresence robot lets you play a hand of cards”