Help for XYYTOSPEC

PURPOSE:
To convert color images from xyY to RGB coordinates for a specific output
device.
This is the same function performed by program XYYTORGB but without Candella.

EXECUTION:
typically:
xyytospec inp=(x,y,Y) out=(r,g,b) device=...
or:
xyytospec out=(r,g,b) device=... 'macbeth


METHOD:
   xyytospec accepts images in device independent coordinates. These are
x and y chromaticity coordinates and Y tristimulus value. The program reads 
color calibration files for the device you specify and converts the xyY 
input values into RGB intensity DN values for that specific device. This
assures that your eyes will respond with the correct color response
for the true scene when they observe the images upon that device. No other 
device can be trusted.

   The program reads in a calibration file for the specified device. This is 
an ascii file with data in records like this:
STEP#                Yn      x       y       R-DN    G-DN    B-DN
1               0.122616  0.278170  0.298730   0.0   0.0   0.0
2               1.267030  0.595390  0.329050  64.0   0.0   0.0
3               5.354223  0.627000  0.332000  128.0   0.0   0.0
4               12.874659  0.632610  0.333000  192.0   0.0   0.0

The first 3 records are skipped by the program so the first record read is:
1               0.122616  0.278170  0.298730   0.0   0.0   0.0

These correspond to a calibration giving the xyY values for a data cube of
all combinations of rgb dn values in some coarse interval like 32 or 64
dn steps. The file must end with a .2

   The method used is to create a 40 by 40 by 40 cube in Luv coordinates
spanning the range of xyY values in the calibration file. Each input pixel
in xyY is converted to Luv space and compared with the cube to see if
a mapping polynomial exists there. If it exists then the Luv value is
converted to rgb using the polynomial.
r=AL+Bu+Cv+D
g=EL+Fu+Gv+H
b=IL+Ju+Kv+M
If no polynomial exists it is computed and stored into the cube.
Equations (as above) are solved by least squares using the 8 nearest Luv
points (in the cube, one in each octant) to the cube coordinate.

Note:
   There is no such thing as RGB unless we specify the
device it is intended for. If you are given three RGB images by someone,
there is no color information in them even if they are in radiance units.
This is because the eye responds to the spectral distribution of the 
scene and this has been lost. Program spectoxyy can write xyY images
from radiance or reflectance images. xyY images retain the human color
response and are device independent.

HISTORY:
6-30-96  J Lorre. 
COGNIZANT PROGRAMMER:  Jean Lorre


PARAMETERS:


INP

3 input images

OUT

3 Output images

DEVICE

Output device name

PATH

Path name for calibration files.

MONITOR

Whether the monitor is left or right.

NEAREST

Nearest # points for fitting

MACBETH

Print macbeth dn values. Optional output files.

See Examples:


Cognizant Programmer: