Create a HSV Range Palette
Hi,
I am defining a Color Range using two HSV structs.
inRange() lets me create a mask of these on the current image. Thats fine, however, I wanted to create some kind of Color Palette for those two HSV structs. The color palette should display all colors that are within that range and output those colors in RGB ofc.
Is there someone having an idea how I could do this?
Thanks
why do you want to do this ? what is the purpose of it ?
Because my supervisor wants me to do that. We are defining color ranges for different colors and he wants to have a small application where u can provide two hsv structs and get the palette of possible colors.
should not be too difficult. just start, and come back, if you run into real problems.
(we won't write your code)
Nah I dont expect code at all, I just wanted some kind of ideas on how to achieve something like that.
I think I would try by starting to iterate all 3 channels in a nested for loop, convert HSV to RGB and set the pixel somewhere, but isnt that quite a very inefficient way of doing it?