Wavelength in every rgb value?
23 views (last 30 days)
Show older comments
Hello,
Although I'm not keen in advanced physics and math, I believe I have quite simple question, however as I googled for info, there were a lot of different and ambiguous answers.
Now, what I need to do is to retrieve approximate wavelength value from every pixel RGB values (corresponding wavelengths for red,green and blue) in a photo.
As I understand I'll have some problems with gray (black, white) and violet colors.
Another thing I don't get is whether I need to know pixel spacial coverage in the photo or is it enough to convert photo to HSV form and somehow process Hue values(which I have an idea how, but not completely sure). If so, must each band separated before or after HSV conversion(if it is the way at all).
What I need it for is spectral signature analysis, maybe there is some other way to determine wavelength values of the pixel?
I would really appreciate if someone with better knowledge in this field would help me and give me a start.
0 Comments
Answers (2)
Walter Roberson
on 31 Aug 2012
Edited: Walter Roberson
on 10 Jan 2016
RGB to wavelength cannot be done, in general.
Image Analyst
on 31 Aug 2012
Many colors are not a single wavelength, for example brown or skin tones. There has been some work in the area:
Heikkinen, V.[Ville], Lenz, R.[Reiner], Jetsu, T.[Tuija], Parkkinen, J.[Jussi], Hauta-Kasari, M.[Markku], Jääskeläinen, T.[Timo],
Evaluation and unification of some methods for estimating reflectance spectra from RGB images,
JOSA-A(25), No. 10, October 2008, pp. 2444-2458.
They probably take the spectral responsivity curves of the three sensors in the camera and add them together weighted by the RGB values. But I don't think you need to do that. I think you probably just need to look at my color segmentation demos in my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
0 Comments
See Also
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!