I would like to find the most present color in an image. (in Java/Android) I have a Mat object from openCv which refer to the image, I can get RGB value of each pixel easily, but I think that just average the red, blue and green separately isn't a viable algorithm.
I think it's better to search the most frequent {r,g,b} as a triple.
Do you agree ? And could you help me to implement this algorithm, I have no idea ! Thank you in advance