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.





What really caught our eye is the Goliath’s unique positioning system. While most CNC machines have the luxury of end-stops or servomotors capable of precise positional control, the Goliath has two “base sensors” that are tethered to the top of the machine and mounted to the edge of the workpiece. Each sensor connects to the host computer via USB and uses vaguely termed “Radio Frequency technology” that provides a 100Hz update for the machine’s coordinate system. This setup is sure to beat out dead-reckoning for positional awareness, but details are scant on how it precisely operates. We’d love to know more if you’ve used a similar setup for local positioning as this is still a daunting task for indoor robots.
