Converting image from HSI back to RGB changes color composition after processing I component
Show older comments
Hello all,
I am trying to accomplish a certain process on color images. But performing the same on all R, G, B planes individually is very time consuming and computationally expensive. So I figured that since the I component of HSI would be good enough to alter the visual statistics of the image ( mean and variance). However when I convert it back to RGB, keeping the hue and saturation components as is, the output image is very different from the input in terms of color composition. Any ideas how can I go back to RGB without destroying the color profile?
Answers (1)
Image Analyst
on 28 Apr 2013
0 votes
How did you do the conversion? Did you actually use V instead of I and use rgb2hsv()? Changing the V component slightly should not change the Hue and Saturation and the colors should look pretty much the same, just brighter or darker according to whatever modifications you made in the V channel. I can't say much more without your image and your code.
2 Comments
Parth Parikh
on 28 Apr 2013
Image Analyst
on 28 Apr 2013
Edited: Image Analyst
on 28 Apr 2013
If you wrote your own functions for going from HSI to RGB, then I can't debug or fix them because I don't know what they are.
There are no histogram matching routines built into MATLAB. You'd have to write them yourself, like I did in my histogram matching application.
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!