I am now currently storing my RGB values of the image with a vector <cv::Vec3b>
.
To avoid confusion, let me try clarify my question more. For instance I have a vector of size 10. And the values stored are as shown:
Vector address RGB Values(R,G,B)
[0][0][0]= 255,255,255
[1][1][1]= 40,42,40
[2][2][2]= 40,42,40
[3][3][3]= 40,42,40
[4][4][4]= 40,2,60
[5][5][5]= 9,9,0
[6][6][6]= 40,2,60
[7][7][7]= 40,42,40
[8][8][8]= 255,255,40
[9][9][9]= 255,255,40
as observed, The most occurring values is (40,42,40). How do I get these values? I wish to find the most occurring RGB values of the vector. Does anybody have any suggestions, code sample on how I can do it? Thanks.