Optical recognition of resistor codes

This is an iOS/iPhone app that uses the camera to optically recognize resistor color code bands. I find this interesting because I tried writing something like this one time. I couldn’t sleep at 3am after a London-Tokyo flight. I wanted to make an augmented reality app that would let the user scan the camera over a bunch of resistors or a circuit and the resistor values would be overlaid on each one. About 5 minutes into coding, I realized that it’s a significant image segmentation problem, with a non-trivial color recognition problem given different white balances, contrasts, and colors of paint. That wasn’t going to help me sleep.

The author of Resistor Photo ID simply makes the user take photographs in a stereotyped way with particular kind of background, thus limiting the variability. The program also makes the user do the image segmentation by dragging little ROIs to cover the color bands. These are clever compromises, and in the final analysis, it works. Not without errors, but it works.

Yes, you’re right, it takes almost no time to simply measure a resistor using a multimeter. You’re very clever. But what if the resistor is already in a circuit, and thus cannot be measured in isolation? Yes, yes, like you, I also enjoy the mild, learned synesthesia that comes with internalizing the resistor color code. But what if, like this author, you’re colorblind?

Colorblind-proof two-color scheme for co-localization
Daltonize your figures for the colorblind audience members