ChipScan uses classical computer vision, not a neural network, and runs entirely on your phone. What follows is an honest account of how it reads a stack — including the parts that are hard and the places it still gets things wrong.
1. The aim box is the design, not a limitation
An earlier version of ChipScan searched the whole photo for chips. It worked by assuming that anything which was not table felt must be a chip.
Against a real room, that assumption collapses. Your table occupies the lower half of the frame; above it sit a leather rail, a window, a television, furniture. All of it is "not felt", all of it merges into one region, and the app confidently reports the sofa as a stack of chips. No amount of threshold tuning fixes this, because the information needed to tell a chip from a chair simply is not in the rule.
So ChipScan stopped searching. You frame one stack inside the aim box, and it reads only what is inside. The room behind your table never enters the calculation. This is a structural fix rather than a statistical one — the failure is not made less likely, it is made impossible.
2. Finding where the stack meets the table
Every measurement downstream is anchored to the bottom of the stack, so that is found first.
ChipScan works out your table colour from the photo itself — there is no calibration step — then walks upward from the bottom edge of the frame through the continuous run of table surface. Where that run stops is where the chips begin.
The direction matters more than it sounds. Searching downward from the top of the frame instead finds whatever warm-coloured object happens to be highest in the shot: a wooden sideboard, a sunlit wall. That put the base line above the chips, which quietly ruined every count that depended on it.
3. A poker chip's own proportions set the spacing
A standard chip is about 39 mm across and 3.3 mm thick. Those two numbers are locked together: if you can measure how wide a chip is in the photo, you know how tall one must be.
In theory that ratio is about 1:11.8. Measured across real photos it comes out nearer 1:10.5, because these shots are taken close — the near face of the rim is roughly one chip-radius closer to the lens than the silhouette edges, which magnifies it slightly.
So ChipScan measures the chip's diameter and derives the spacing between chips from it, to within about 8%. That turns an open-ended question — "how many chips are in this blur of stripes?" — into a much narrower one: "how many rungs of a ladder whose spacing I already know?"
4. The edge-spot spiral
This is the interesting part, and the reason chip counting is harder than it looks.
Nearly every clay or composite chip carries a set of pale spots spaced around its rim — three of them, typically. Stack the chips and you get a ladder of light marks, one rung per chip, which is exactly the signal you want to count.
Except that consecutive chips in a stack are never at the same rotation. Each sits a little turned relative to the one below, so within any vertical slice of the rim the pale coverage does not line up — it spirals.
The consequence: the spiral produces its own strong, regular pattern at two to three times the true chip spacing. Any algorithm that simply looks for the dominant repeating pattern locks onto the spiral instead of the chips, and reports roughly half or a third of the real count.
Every counting method we tried fell for it. So did we: the reference photo set used to measure accuracy was originally labelled by eye, and those hand counts were wrong in exactly the same way — undercounting tall stacks by up to five chips, and never once exceeding nine. Twenty of the forty-six reference stacks had to be re-counted, seam by seam at full resolution, and cross-checked against the 1:10.5 proportion before the numbers could be trusted.
That correction mattered more than any algorithm change. Scored against the corrected labels, the approach that had looked best turned out to be the one most thoroughly fooled by the spiral.
5. Two counters, chosen by stack height
ChipScan carries two independent counting methods, because they fail in opposite situations and the reason is mechanical rather than accidental.
The comb fit
The first searches directly for the answer. It proposes a candidate count and a candidate stack height together, derives the spacing as one divided by the other, and scores how well a comb of evenly spaced teeth explains the pattern down the rim. Because it estimates its own spacing, it is vulnerable to the spiral — but only once a stack is tall enough for the spiral to establish itself. On short stacks there is no room for the false pattern to form, and this is the more accurate of the two.
The pinned counter
The second fixes the spacing in advance from the measured chip diameter, so the spiral is not merely down-weighted, it is unreachable: the false spacing lies outside the range the method will consider. It also models the top of the stack explicitly, using a small piece of geometry — only the topmost chip shows a complete ellipse, because every seam lower down has its far half hidden by the chip resting on it. That gives the counter a principled way to know where the stack ends rather than guessing.
ChipScan uses the first method below six chips and the second at or above it. Six is not a tuned number: it is roughly where the spiral gains enough vertical room to form. Using the first counter's own answer to make that choice is safe even when that answer is wrong, because its error is always an undercount — the spiral cannot invent chips that are not there, so a stack it calls tall is certainly tall.
6. Colour: measuring a chip against itself
Identifying colour sounds like the easy half. It was the worse of the two for a long time.
The original approach compared each chip against fixed colour definitions — this range of hues is red, that range is green. Under the warm, uneven light of a real room this fails badly: a dark green chip under a table lamp falls below any fixed threshold for "not black", and a maroon chip loses enough saturation to read as grey.
The fix uses something already in every photo. The pale edge spots are a known-neutral material, sitting on the same object, under the same light, at the same distance. Dividing each chip's colour by the colour of its own spots turns the reading into a ratio — and the illuminant, whatever it was, cancels out.
Two details make it work in practice. The felt is not usable as the reference: orange felt has almost no blue in it, so correcting against it divides by something near zero and the correction explodes. And the chip's colour is decided by a vote across many pixels rather than an average, because an average over a mixed surface — pigment, pale spots, shadow, printed artwork — lands on a colour that no part of the chip actually is.
This single change took colour identification from 39% to 91% on the reference set.
7. Why not machine learning?
- The signal is geometric, not learned. A ladder of evenly spaced marks at a spacing fixed by the chip's own proportions is something you can measure directly. There is no hidden pattern here that needs a model to discover.
- There is not enough data. A few dozen annotated photos is far below what a custom detector needs to generalise beyond the table it was photographed on.
- Every step is inspectable. When a count is wrong we can dump the exact signal the counter saw and point at the reason. That is how the spiral was found. A model that is quietly wrong in the same way would have looked like ordinary noise.
- It runs on your phone, immediately. No model to download, no server round trip, nothing leaves the device.
8. How accurate is it, really?
ChipScan is measured against a set of real photographs — 46 chip stacks across 23 shots, on a real table, in real domestic lighting, with the counts established by hand at full resolution and checked against chip geometry.
Against that set:
- Colour: 91% correct.
- Count: 67% within one chip; 33% exactly right.
The count figure is not evenly distributed, and the shape of it is more useful than the average:
- Stacks of 2–5 chips: 88% within one
- Stacks of 6–9 chips: 50%
- Stacks of 10 or more: 44%
Short stacks are close to reliable. Tall ones are not yet, which is why the app suggests splitting a stack once it reads eight or more — two short scans are quicker than correcting one bad long one.
It is also why every count goes through a confirm step, with the rows it counted drawn over the photo. ChipScan is built to be checked, not trusted blindly, and it would rather show you its working than quote you a number it cannot stand behind.
These figures are from the current reference set and will move as the app improves. They are measured on one table with one set of chips; your table may do better or worse.
Known limits
- Shoot from a low angle. The count comes from the pattern down the side of the stack. From directly overhead there is almost no rim visible and the reading is unreliable.
- One stack per scan. A second stack directly behind the one you are aiming at can be counted along with it.
- Leave some table visible below the chips. That is how the bottom of the stack is found.
- Smooth-rimmed chips. Chips with no edge spots at all give nothing to count. The technique depends on that pattern existing.
- Blue and purple chips are untested. The reference photos contain green, red, black and grey chips only, so colour identification for other hues has not been verified.
Privacy, as a consequence of the design
All of the above happens on your phone. Frames are analysed in memory and discarded; only the resulting numbers are saved, and only when you choose to save them. There is no server to send anything to, which is a stronger guarantee than a policy promising not to. See the privacy policy for the full detail.