Sunday, March 29, 2009

Converting color spaces in C++

I recently posted my first bit of open source code on my website. It came about because I've had to do some converting of RGB colorspace into HSV for purposes of histogram matching for my research. There is code out there that can be found through The Googles but I've never been satisfied with any of them for various reasons. I've tried to make my code much more readible, straightforward, and clean than whizbang-look-at-all-the-c++-tricks-I-used code obscurity. I've also added the ability to convert RGB to HSL and back. I didn't see much use in having HSL<->HSV but this would not be hard to get by using RGB as a middle man. Have a look at it, use it, improve it, but make sure you follow the license! RGB-HSL-HSV converter project or the direct c++ code.

No comments:

Post a Comment