3.42857

3.4 | 7 ratings Rate this file 160 downloads (last 30 days) File Size: 32.59 KB File ID: #7021

Spectral and XYZ Color Functions

by Jeff Mather

 

01 Mar 2005 (Updated 04 Mar 2005)

No BSD License  

Label plots with spectra. Convert wavelengths to RGB. Functions for color matching and illuminants.

Download Now | Watch this File

File Information
Description

This is the beginning of a set of functions for working with color as wavelengths (spectral color) and in the xyY and XYZ color spaces.

Current functionality includes:

spectrumLabel - Add a color bar containing the visible spectrum to a plot's X axis.

spectrumRGB - Converts wavelengths of light to equivalent RGB values (in the sRGB space).

colorMatchFcn - Raw data of popular color matching functions (spectra to XYZ) for various standard observers:
  * CIE 1931 2-degree
  * CIE 1964 10-degree
  * CIE 1931 2-degree modified by Judd (1951)
  * CIE 1931 2-degree modified by Judd (1951) and Vos (1978)
  * Stiles and Burch 2-degree (1955)
  * Stiles and Burch 10-degree (1959)

illuminant - Raw data for the A, D65, and E standard illuminants.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.0.1 (R14SP1)
Zip File Content  
Other Files spectrumLabel.m,
createSpectrum.m,
spectrumRGB.m,
illuminant.m,
colorMatchFcn.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (10)
21 Jul 2005 Wu John

Good job! Thank you,but how about the other light source in illuminate.m?

01 Oct 2005 colour rainbow

could you able to create function for r2xyz
for 1xm or 1xn matrix

18 Oct 2005 marwan reyadh

please how can i convert an image from RGB of size n*n*3 to an image with of size n*n*n

28 Oct 2005 Levent Onural

Thanks a lot, I have been looking for how I could generate the matching functions for 5 hours. Excellent piece of work...

06 Apr 2006 ben taylor

Does anyone know hot to convert it the other way? I have an RGB image of black body radiation and I am writing a program that will give me a 3d temperature plot, but I need to convert from RGB to wavelength to temperature.

Thanks,

03 Jan 2007 Vishnuvenkatesh Dhage  
26 Apr 2007 NOne None

None

20 Jun 2007 jeongwoon lee  
12 Dec 2007 Neeraj Adsul  
07 Oct 2008 Franck Riberi

Need demo files absolutely.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
color Jeff Mather 22 Oct 2008 07:42:16
spectrum label color spectra wavelength d65 illuminant visible c Jeff Mather 22 Oct 2008 07:42:16
spectrum label color spectra wavelength d65 illuminant visible c Ture VP 17 Nov 2008 05:29:11
color Shin-Ying Lu 31 Mar 2009 18:00:28
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com