Big progress this week. We now have a function that will take a picture that is cropped and rotated to just the resistor, and the x-positions of the bands and returns the colors of the bands with reasonable reliability.
It works by taking the average HSV for a strip that is around the area of an x-position given. It then uses the saturation and value to determine if it is black, gray, or white. If it is none of those, it uses the hue value to decide if it is red, orange, yellow, green, blue, or violet. A hue value corresponding to red, orange, or yellow coupled with a low saturation tends to be brown but I have yet to determine exactly where this threshold is.
I will commit this code after I find a way to do so without interfering with the pre-existing android code.
More to come...