Reputation: 4615
Let's say we have one guy wearing a blue shirt. I built haarcascade classifier which detect the shirt object. Once it detect the blue shirt object, how can I get the hexadecimal color value of the blue shirt?
input: image
-> output: #0000FF
(output can be multiple colors if it's possible)
I want to get this result using OpenCV with python or C++. Any useful link or paper? (I've googled it more than an hours but can't find what I want)
Thanks.!!
Upvotes: 1
Views: 140
Reputation: 1671
Converting hex color to RGB and vice-versa
If you already have the shirt segmented, you can take the mean/median rgb prior to hex conversion. If you are using this for recognition, I would also set up the primary axes of your color ellipsoid for specificity. ie establish range and distribution on each of rgb channels. you could do center point and sphere (simple color distance) if you are lazy/ it is a simple enough problem
Upvotes: 1