How can I transform wavelength data into RGB data when using the Image Processing Toolbox?
13 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2010-5-18
编辑: MathWorks Support Team
2023-8-18
I want to be able to convert my wavelength (or frequency) data into RGB data (image), using the Image Processing Toolbox.
采纳的回答
MathWorks Support Team
2023-8-18
编辑:MathWorks Support Team
2023-8-18
The ability to perform wavelength to RGB transformations is not available in Image Processing Toolbox.
To work around this issue in MATLAB 7.0 (R14) or later versions, you can use 2 files that were uploaded to MATLAB Central (you will still need the Image Processing Toolbox to use them):
1. spectrumRGB - Converts spectral wavelengths to RGB values.
2. colorMatchFcn - Raw data for various color matching functions.
These files can be found by searching for the keyword, "spectrumRGB," at the following URL:
An example of using these files is:
sRGB = spectrumRGB(380:780);
figure; imshow(repmat(sRGB, [10 1 1]))
Note that MathWorks does not guarantee or warrant the use or content of these submissions. Any questions, issues, or complaints should be directed to the contributing author.
There are other applications that perform this transformation. You can use the tool found in:
The code used to generate the colors is based on the work of Dan Bruton.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!