I have an RGB image -ndarray- and I want to count the occurrence of some colors like [255,0,0] or [0,0,255] in this image.
example of image data
np.ones((3, 3, 3)) * 255
array([[[255., 255., 255.],
[255., 255., 255.],
[255., 255., 255.]],
[[255., 255., 255.],
[255., 255., 255.],
[255., 255., 255.]],
[[255., 255., 255.],
[255., 255., 255.],
[255., 255., 255.]]])
So as result I want something like this
{
'[255,255,255]' : 9,
}