Question

I developed an application that is able to recognize the color of a selected image area. It works perfectly for Android 2.2. Now I'm trying to use it on devices 2.3. To make it work properly on 2.2 I had to overcome many problems caused by dithering, and the format of the bits of the screen. Now I have the same problem for 2.3 and I do not know what to invent.

color = mBitmap.getPixel((int)event.getX(), (int)event.getY());

Does not see color differences very small.

Was it helpful?

Solution

The discussion leads me to believe (e.g. "I see a single value greater than both") that you're mathematically comparing an ARGB value to an RGBA value, or something like that. Know you're encoding, particularly which byte holds the "alpha" component, and compare the color components, not the 32-bit value.

OTHER TIPS

what if you use a moving average filter on the image to check nearby pixels, this could help with the dither.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top