I am having gray scale satellite images, and I want to apply the JSEG segmentation algorithm for that I need LUV color space. How can I convert them into LUV colorspace using java?
I'm a bit confused if there is any gain in converting from gray to luv (or any other colorspace infact) as the data for colors is not there (maybe you can try to feed the gray channel copied three times as input for the segmentation algorithm).
Anyway, you can find my Java implementation to convert BGR image to LUV. The color image appears to result in something fairly reasonable, while the gray image results in something strange. Despite the "bug", hopefully you get the idea and can go forward form there (code is untested and may contain bugs)...
I'm a bit confused if there is any gain in converting from gray to luv (or any other colorspace infact) as the data for colors is not there (maybe you can try to feed the gray channel copied three times as input for the segmentation algorithm).
Anyway, you can find my Java implementation to convert BGR image to LUV. The color image appears to result in something fairly reasonable, while the gray image results in something strange. Despite the "bug", hopefully you get the idea and can go forward form there (code is untested and may contain bugs)...
firstly it is better to take color satellite images directly, the convert these image into other color space. in addition you can get a good help in matlab. but in your case you can implement this case in three steps:
converting gray scale images into indexed images.
converting indexed images into rgb color images.
converting rgb color imaged into any other color space.
OpenCV... Mixed feelings... ;-) If you are not into image processing - A GREAT thing... If you want to understand what happens behind the scenes - no so great.
So - if one is doing studies on some other field than image processing I would agree with Martin, but if you want to develop something new on this field one should be able to understand something like known color space conversion and code it in 15 minutes. If not then you need to learn more,...,- ok I need to learn more as it took almost 20 minutes to code rgb2luv...
My point here is that it depends - as everything does...