Identify colors using Android camera

Currently working on one tutorial project on color detection in android. I am trying to detect color using android cameras to be displayed in preview or after shooting.

I am looking for something like this image. This is ColorGrab screenshot Android app. Basically, I wanted to identify each color as a distinct color. Let's take an example for this, suppose the application is detected by # FF6CBB, but that color actually looks like pink, but I want to mark this color as RED on my list. So basically I want to convert all colors to base 8 to 10 colors. Therefore, any color code that must fall within a certain range and that range must only represent one color.

In this image, the color code is not actually the Red hex code, but we can make this detected color code in the Red Color category.

In general, my goal of the program is to identify any color code of the color wheel as one color out of 10 different colors. How and how can I calculate this thing? Should I use the shortest Euclidean distance between two colors?

Can anyone tell me an algorithm or a way to calculate this thing.

image 1 

      

Screen Shot of ColorGrab Application

example of color distribution

      

enter image description here

+3


source to share


1 answer


k-nearest neighbors (k = 1 in your case) with euclidean distance might work in your case because you only have 3 dimensions (this method suffers from the curse of dimension )



You can also become obsolete with different distance measurements like Hamming distance

0


source







All Articles