资源简介
这是一个波长到RGB的matlab转换程序
代码片段和文件信息
function Value=WavelenghToRGB(Wavelength)
Gamma = 0.8;
IntensityMax = 255;
Blue=0;
Green=0;
Red=0;
factor=0;
if and(Wavelength >= 380 Wavelength <= 439)
Red = -(Wavelength - 440) / (440 - 350);
Green = 0.0;
Blue = 1.0;
elseif and(Wavelength >= 440 Wavelength <= 489)
Red = 0.0;
Green = (Wavelength - 440) / (490 - 440);
Blue = 1.0;
elseif and(Wavelength >= 490 Wavelength <= 509)
Red = 0.0;
Green = 1.0;
Blue = -(Wavelength - 510) / (510 - 490);
elseif and(Wavelength >= 510 Wavelength <= 579)
Red = (Wavelength - 510) / (580 - 510);
Green = 1.0;
Blue = 0.0;
elseif and(Wavelength >= 580 Wavelength <= 644)
Red = 1.0;
Gree
- 上一篇:压缩感知的图像去噪
- 下一篇:基于matlab的QPSK系统仿真
评论
共有 条评论