Track all color from a video source
Hi all, I've been looking up in the forum about the color tracking with cv.jit objects and blob, but I still don't get it quite much, so I'll just ask straight forward what I need...
I get it is possible to look for a color in a source video but I need to get what are the most repeated colors in the source video... Like, for example, if the source is a camera and a woman with a red dress and some random background (like the place, idk) is on the camera (visually obviously more red than every other color) and get that the most repeated color is red, and then black or some background color... I hope I'm explaining myself ok, but it is possible? At least to get up to the top 5 colors...
I'm new to jit objects so that's why I'm here asking...
PD: sorry if this is a repeated topic...
you could convert rgb values to hue saturation and level HSL and do some sort of math correlating the hue and level values.
Jninek, I was thinking of doing that, and I have a js convertor for RGB to HSL, but first I need to know how to get the top 5 colors in the image... that's what I need...
...maybe this gives some hints, but I think the human perception of what you call top 5 colours might be not well algorithmically described by simply counting pixels in fixed bands in either RGB or HSL space.
https://cycling74.com/tutorials/best-practices-in-jitter-part-1
...this here seems to be state of the art approach in image processing science
https://adamspannbauer.github.io/2018/03/02/app-icon-dominant-colors/
https://stackoverflow.com/questions/3241929/python-find-dominant-most-common-color-in-an-image