The experimental results were combined into the specification of the CIE RGB color space, from which the CIE XYZ color space was derived. They resulted from a series of experiments done in the late 1920s by William David Wright using ten observers and John Guild using seven observers. The CIE 1931 RGB color space and CIE 1931 XYZ color space were created by the International Commission on Illumination (CIE) in 1931. The system was designed in 1931 by the "Commission Internationale de l'éclairage", known in English as the International Commission on Illumination. The mathematical relationships that define these color spaces are essential tools for color management, important when dealing with color inks, illuminated displays, and recording devices such as digital cameras. The CIE 1931 color spaces are the first defined quantitative links between distributions of wavelengths in the electromagnetic visible spectrum, and physiologically perceived colors in human color vision. While with the XYZ coordinates the Z is dependent on the X and Y, with the Lu'v' coordinates I cannot find such dependancy which I could implement in the code.CIE RGB color cube (image encoded with an ICC profile) I am having trouble creating the L, u' and v' mesh grids. I've tried adapting your code to it but it did not work. I am trying to plot the CIE 1976 Lu'v' chromaticity diagram. Title('CIE Chromaticity') xlabel('x') ylabel('y') Mask=roipoly(rgb,nciex,nciey) mask=cat(3,mask,mask,mask) įigure imshow(rgb.*mask+~mask) hold on Rgb=applycform(cat(3,x,y,z),makecform('xyz2srgb')) To see only the valid colors you can uncomment the 'mask' line and comment out the other one. Also note that an srgb display can't display the whole gamut so the colors out side of this region shouldn't be trusted. The first function used can be found on the file exchange. To plot any points or contours you'll have to convert the CIE coordinates to MATLAB image coordinates (see the creation of nciex and nciey for example). I didn't plot the wavelengths around the arc, but you should be able to Wedges with the color of the common center point being white. Play with the reference wavelengths, wl0, if you think you might be ableīasically, instead of a single polygon, we now have a series of small Isn't identical to the plot from wikipedia, but it's close. This code can be vectorized - I just didn't bother. % blue blue cyan green yellow orange red red % x_bar, etc are column vectors at wavelengths, wl. I finally had a chance to work on this some more. The hues are rather dark and it does not look like a CIE plot. The code you presented above has a bug : the reshape should be on x, y and I am using the following table for the tristimulus values and x, y and z : I will try to take it from here, but was wondering if you had any further Spectra of a bunch of LEDs onto a colored CIE plot like the one in the URL. I am trying to plot out CIE values (as isolated points) calculated from the Shape, marking out the locus of monochromatic emissions. The area inscribed by this shape is white/blank (needs to be coloredĪccording to the CIE coordinates). Thanks for the quick turn around (and happy new year !).Īll I get is a closed dark line defining the shape (that is what the patchĬommand does after the initial plot command plots an open curve in blue). Have to add contours / points to the plot to represent actual I have searched on file exchange, and though there are some hits thatĬome close (mainly relating to conversion of color spaces), there is Plot (the axis), while mixed colors define the interior. Monochromatic colours form the locus of the To the wavelength of light, which in turn corresponds (roughly) to theĬolour shown on the plot. The axis is in "bent" into that shape and each x axis value corresponds As I'm not sure exactly what you are trying to do I'll let you The colors on that patch are about the correct hue, but most are tooĭark. What is shown on the web page, you need to make a patch: Start by downloading the 1931 CIE color matching functions, x_bar, y_bar Have to add contours / points to the plot to represent actual experimental I have searched on file exchange, and though there are some hits that comeĬlose (mainly relating to conversion of color spaces), there is reallyĬan anyone suggest how this plot may be plotted ? After plotting, I would Monochromatic colours form the locus of the plot (theĪxis), while mixed colors define the interior. The wavelength of light, which in turn corresponds (roughly) to the colour The axis is in "bent" into that shape and each x axis value corresponds to
0 Comments
Leave a Reply. |