Help for COLORRGB
PURPOSE:
To convert a set of N input multispectral images into an output set
of either:
A) 3 multispectral images representing r, g, b for quasi true
color applications.
B) 3 images representing X,Y,Z tristimulus for more accurate
conversion to true color on a physical device.
Examples:
1. To convert 3 input images into quasi true color:
colorrgb in=color.red,color.grn,color.blu out=r.img,g.img,b.img \
color=22,304,173,222,255,322,429,255,213,190,47,187,239,255,255,369,188,174,185,
153,\
258,491,121,103,53
2. To process 3 other images the same way (using the identical transformation):
colorrgb in=color2.red,color2.grn,color2.blu out=r.img,g.img,b.img
METHOD:
Colorrgb constructs three sets of simultaneous linear equations. Each set of
equations represents r,g,b respectively (or X,Y,Z). The user specifies a set
of known colors. These specify the target r,g,b (or X,Y,Z) values. Each color
becomes one equation. The line,sample locations provide the input dn values
for each color in each band. Thus the red equations look like:
r(color1)=k1*dn(band1,color1)+k2*dn(band2,color1)+...+kn*dn(bandn,color1)+k
r(color2)=k1*dn(band1,color2)+k2*dn(band2,color2)+...+kn*dn(bandn,color2)+k
..............
Colorrgb solves for k,k1-kn. These values are stored in the calibration file.
This is really nothing more than the integral for tristimulus. Kodak uses this
method (chemically) to color balance images using the four colors: sky, grass,
cloud, skin.
Note: Input images can be presented in any spectral order. (but see warning)
Warning: A calibration file must be used with input images in the same
spectral order and number that they were presented when it was
generated.
HISTORY:
1-1-2003 J Lorre.
COGNIZANT PROGRAMMER: Lucas Kamp
PARAMETERS:
INP
N input images
OUT
3 byte Output images
COLOR
Color coordinates
and dn values.
AREA
Size of image patch
See Examples:
Cognizant Programmer: