-
Notifications
You must be signed in to change notification settings - Fork 59
Dominant color of an image #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Well, defining a color is not an easy task. Once you convert your pixels from RGB to Hue, you apply binning: you want to cluster the 255 (or 180) possible hues into something like "red-ish", "green-ish", "blue-ish", "yellow-ish" and so on... Even a simple bit shift of 3-4 bits will work fine. Now you have an array where you want to find the most frequent item: https://www.geeksforgeeks.org/frequent-element-array/ Does it sounds feasible? If you also need to know the Saturation and Value of this color, it's harder. Let me know if this is the case. |
Ciao, Hello, |
Ciao,
prima di tutto complimenti per il tuo lavoro.
Come posso ottenere il colore dominante di un'immagine ?
Grazie
Hello,
first of all congratulations on your work.
How can I get the dominant color of an image?
Thanks
The text was updated successfully, but these errors were encountered: