Back to projects
Hardware + Software

Project-O

An automated One Piece TCG card sorter — uses computer vision to identify cards via camera, then routes them through an Arduino-controlled chute into sorted bins using a 6-pass radix sort algorithm.

Processing Pipeline

01

Feed

Card enters chute

02

Capture

Camera snapshot

03

Identify

dhash + OCR match

04

Route

Arduino serial cmd

05

Sort

Bin placement

System Specifications
Sort AlgorithmLSD Radix Sort (6-pass)
Bins11 rotating carousel
MatchingPerceptual hash (dhash)
ControllerArduino / ESP32
AccuracyNear-perfect with OCR fallback
Key Format6-digit canonical (band.set.num)
Source Code & Build Guide

Stack

Vision

PythonOpenCVimagehashNumPy

Hardware

Arduino/ESP32pyserial

Mechanical

OpenSCAD3D printing

How It Works

Project-O is a physical card sorting machine for the One Piece Trading Card Game. It uses OpenCV and perceptual hashing (dhash) to identify individual cards from a camera feed, then sends serial commands to an Arduino/ESP32 that controls a rotating chute to route each card into the correct bin. After 6 passes of radix sort, hundreds of cards end up in perfect canonical order.

The system includes a full computer vision pipeline (edge detection, perspective warp, hash matching with OCR tie-breaking), a Python sort controller with session logging, and 3D-printable mechanical parts designed in OpenSCAD. Cards are encoded into 6-digit canonical keys for sorting across card sets (OP, EB, ST, PRB, P).

Engineering Takeaways

>Perceptual hashing (dhash) for fast image matching
>Radix sort applied to physical card sorting with 11 bins
>Serial communication between Python and Arduino
>Designing 3D-printable mechanical parts in OpenSCAD