For Sean and Neerajen's final project for their AP Physics C course, they had to build a digital seismograph. This project involved many Integrated Circuit chips, PCBs, and resistors.

Lots of resistors.

There were so many resistors in so many different values such that the progress on the seismoeter grinded to a halt. They had to consult a table every time to solder a resistor in. And they didn't finish the seismograph.

But with an app that could tell them the value of the resistor, they would have been able to finish their project. So to prevent any future encounters with resistors, we as a team decided to make Resistora: the image recognition resistance finder.

How it works

The app's UI is quite simple. Open resistora, and align resistor with the two lines in the center of the app screen. Our manually overrided camera control algorithm will zoom in and take a picture for image processing and calculation, which will then be displayed at the bottom.

Challenges I ran into

Working with RGB and hue was very difficult. It is difficult for a computer to differentiate between colors such as Red, Orange, Brown, and Gold. As such, we tried multiple methods to identify the location of the colored bands on each resistor - such as Floodfill, normalizations, and transformations. Ultimately, we were able to find a way to identify the colors and its location using a graphing technique, and local maxima.

Accomplishments that I'm proud of

We used our knowledge from AP Physics to find an efficient solution to image processing. Firstly, each column was averaged. Then, the lightness and saturation were calculated from the image. One interesting thing we noted is that at each band on the resistor, the saturation value would spike. This would mean that all we would have to do is find the local maximas and then find the rgb values at those locations. However, this would occasionally produce false positives which were eliminated by using the lightness data. Whevener the lightness dropped, creating a local minima, this would indicate a band. This actually worked!

What I learned

What's next for Resistora

Built With

+ 5 more
Share this project: