ResistorScanner

by thegouger

thegouger / ResistorScanner

Android app using OpenCV that scans resistor colour bands to determine their values

128 Stars 43 Forks Last release: Not found MIT License 6 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Resistor Scanner

Resistor Scanner is an Android app that uses OpenCV to scan resistor colour bands and determines their values.

Google Play

Screenshot

Screenshot

Tested devices

Tested on a Nexus 4. Note that white balance differences with other phone cameras might require tweaking colour ranges in ResistorImageProcessor.java

How it works

ResistorCameraView extends JavaCameraView and enables the flash and zooms in fully (I found this was the best way of getting clear images with a somewhat consistent white balance)

ResistorImageProcessor contains the colour detection logic. It scans a small area below the red line indicator for the colours defined by COLOUR_BOUNDS, and generates contours for these regions. It stores the colour code value vs x-coordinate of the centroids of these contours in a dictionary.

The resistor value is then calculated by iterating through the x-coords of the centroids in ascending order and using their associated codes. (This requires the resistor tolerance band to be placed on the right side).

Note that this app works best when the resistors are on a light background.

Demo

App demo

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.