I've been tinkering with using HSV to manipulate bitmap images. I don't really know a whole lot about this stuff but I thought it might be interesting to mess with.
I found some code online to do the conversion and ported it to Blitz.
The original code can be found at:
http://www.cs.rit.edu/~ncs/color/t_convert.html
In my version I've created a type for each pixel which contains the R,G,B and H,S,V values. They are kept as floating point in the 0-1 range apart from hue which is 0-6 (It's 0-360 in the original code).
I found you can immediately improve an image by normalising the V channel - improving contrast and bringing out detail. Normalising the other channels seems to improve the image too - not entirely sure why.
Anyway, here's my code if you are interested. It's not fast (or meant to be) - this stuff isn't great for realtime work.
www.zee-3.com/video/HSV.zip
If you remove the drawimage command you get a random image made of coloured circles.

The top row of images shows the effects of normalising the channels V,S,H. The other rows I'm tinkering with enhancing\decreasing stuff like saturation. Tinting the image by shifting the H channel and even blurring the various channels.
If this evolves into anything useful I'll post it in the code archive.
I found some code online to do the conversion and ported it to Blitz.
The original code can be found at:
http://www.cs.rit.edu/~ncs/color/t_convert.html
In my version I've created a type for each pixel which contains the R,G,B and H,S,V values. They are kept as floating point in the 0-1 range apart from hue which is 0-6 (It's 0-360 in the original code).
I found you can immediately improve an image by normalising the V channel - improving contrast and bringing out detail. Normalising the other channels seems to improve the image too - not entirely sure why.
Anyway, here's my code if you are interested. It's not fast (or meant to be) - this stuff isn't great for realtime work.
www.zee-3.com/video/HSV.zip
If you remove the drawimage command you get a random image made of coloured circles.
The top row of images shows the effects of normalising the channels V,S,H. The other rows I'm tinkering with enhancing\decreasing stuff like saturation. Tinting the image by shifting the H channel and even blurring the various channels.
If this evolves into anything useful I'll post it in the code archive.