Lucifer
Lucifer

Reputation: 29632

How To Read Color Value?

I want to Reading Color from Android Application. Here I have developed one Application, in which from Camera, I am reading the color. I want to perform some action while reading/catching red color in my camera.

Please guide me regarding this.

Upvotes: 0

Views: 258

Answers (1)

c05mic
c05mic

Reputation: 558

One of the possible solutions is that, you can get the Color of an individual pixel of a bitmap using,

bitmap.getPixel(int x, int y)

You should have the image as a Bitmap object and should specify the x and y co-ordinates of the pixel for which you want the color.

Bear in mind that, checking pixel-by-pixel is time consuming and not an effective method.

Upvotes: 3

Related Questions