converting RGB value to wavelength

53 views (last 30 days)
Hello everybody I extracted RGB values per pixel from an image for a certain area which is white . is there a way to convert these value to wavelength and get a plot of intensity as a function of wavelength ? Thanks

Accepted Answer

Walter Roberson
Walter Roberson on 7 Feb 2017
  2 Comments
farfar
farfar on 8 Feb 2017
Thanks.so it means that there is no way to get a specific wavelength from an image ? what if i want to know how much blue wavelength is on the image ? having all B value can not give me the result?
Walter Roberson
Walter Roberson on 9 Feb 2017
What is "blue wavelength" ?
Do you mean that you have a range of wavelengths and you want to detect the total energy contribution from that range? Even if it is not pure? So for example for "metalic gold" (212,175,55) you would want to know the energy contribution of the blue wavelength that went into it, even though humans would not perceive any impression of blue?
If you look at http://hyperphysics.phy-astr.gsu.edu/hbase/vision/colcon.html#c1 you will see that the sensitivity of the human blue and green cones cross over at roughly 480 to 485 angstroms or so. NASA gives the wavelength of blue as roughly 475 angstroms. So for light that we would consider "blue", there is going to be significant excitation of the green cones as well, nearly as much as the blue cones at those wavelengths; and likewise, the blue cones are going to be excited by areas that you would consider "green". And if you refer to my linked discussion, where I talk about energy integrated over time: green light received with (say) 1/4 efficiency by the blue cone or blue sensor is going to be indistinguishable from a wavelength at the cone or sensor peak that is 1/4 the intensity.
Humans seldom deal with pure wavelengths, and humans automatically deal with adjusting perception based upon intensity over all three cones. Green for example at 510 angstroms is pretty close to the cross-over where blue is dropping and red is picking up, so the interpretation of green is based in part on the fact that the blue and red cones are also excited in roughly equal measures to each other. You might shift the wavelength a little toward the blue and adjust the intensity so the blue and green cones get the same energy as before -- but the effect on the red would not match and that would change the perception.
Anyhow... yeah, it is difficult to separate out the wavelengths. Standard photographs are not designed to measure wavelengths. You need something more specially designed, such as a colorimeter

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 9 Feb 2017
There have been papers published on ways to estimate spectrum given RGB values (see proceedings from the Color Imaging Conference). I think they must have prior knowledge of the spectral sensitivity of the sensors on the CCD - I don't see how they could do it without that. But even then, it's just an estimate since there are lots of spectra that could give the same RGB values.

Categories

Find more on Dictionaries in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!