Topic "colour"

COLOUR			    Monash Image Library			COLOUR


The IMAGE structure includes a parameter called colourspace which indicates
the colour space of the pixels. For most operations this will simply be
grey, but it may be set by some functions to indicate other spaces. The
colour spaces which are presently supported include:

Colour Space	 Value
============	 =====
Grey		    0
RGB		    1
HSL		    2	(Cylindrical)
HSV		    3	(Hexcone)
YIQ		    4
CMY		    5
XYZ		    6	(Either NTSC or CIE)
uvY		    8
UVWs		    9	(U*V*W*)
Luv		   10	(L*u*v*)
Lab		   11	(L*a*b*)
StW		   12
YCbCr8		   13   8 bit CCIR YCbCr (lossy)
YCbCr10		   14   10 bit CCIR YCbCr (lossless)

To support colour spaces accurately and to ensure consistency, images may
have either one or three bands. The pixels may be either 8, 16, 32 bit
integers, 64 bit floats, or even 128 bit COMPLEX numbers. Therefore a 3 Band
64-bit image has 192 (64*3) bitsperpixel.

The cif file format should be used when working with colour spaces. This
format can is independant of the colour space and pixel size of the image.
Other file formats do not store the colour space information.

Most related functions begin with "i_cs..." to indicate that they check and
use the colour space flag. Any other functions, including the "i_rgb..."
functions generally do not, but can still be used for simple operations, as
they work upon three band images.

When an xyz parameter is required, a 0 indicates NTSC, and a 1 indicates
CIE. For most colour space transformations, CIE XYZ should be used.

These parameters should be passed by strings rather than numbers to be
consistent with the rest of the library and more useable.

Related Functions

iCIE_XYZtoRGB converts a CIE XYZ pixel to a RGB pixel
iCMYtoRGB converts a CMY pixel to a RGB pixel
iHSLtoRGB converts a HSL pixel to a RGB pixel
iHSVtoRGB converts a HSV pixel to a RGB pixel
iLabtoXYZ converts a L*a*b* pixel to a XYZ pixel
iLuvtoXYZ converts a L*u*v* pixel to a XYZ pixel
iNTSC_XYZtoRGB converts a NTSC XYZ pixel to a RGB pixel
iRGBtoCIE_XYZ converts a RGB pixel to a CIE XYZ pixel
iRGBtoCMY converts a RGB pixel to a CMY pixel
iRGBtoHSL converts a RGB pixel to a HSL pixel
iRGBtoHSV converts a RGB pixel to a HSV pixel
iRGBtoNTSC_XYZ converts a RGB pixel to a NTSC XYZ pixel
iRGBtoYCbCr10 converts a RGB pixel to a YCbCr10 (lossless) pixel
iRGBtoYCbCr8 converts a RGB pixel to a YCbCr8 (lossy) pixel
iRGBtoYIQ converts a RGB pixel to a YIQ pixel
iStWtoXYZ converts a StW pixel to a XYZ pixel
iUVWstoXYZ converts a U*V*W* pixel to a XYZ pixel
iXYZtoLab converts a XYZ pixel to a L*a*b* pixel
iXYZtoLuv converts a XYZ pixel to a L*u*v* pixel
iXYZtoStW converts a XYZ pixel to a StW pixel
iXYZtoUVWs converts a XYZ pixel to a U*V*W* pixel
iXYZtouvY converts a XYZ pixel to a uvY pixel
iYCbCr10toRGB converts a YCbCr10 (lossless) pixel to a RGB pixel
iYCbCr8toRGB converts a YCbCr8 (lossy) pixel to a RGB pixel
iYIQtoRGB converts a YIQ pixel to a RGB pixel
icedge Executes Colour Edge Detection GUI (under X).
icscast casts a 3 band image to bpp and may either normalise(=1) to [0..255] for 8, 24, 32, 48, 96 bpp images, or [0..1] for 192 and 384 bpp images. or it will standardise(=0) to the original colour space values (only on 192 and 384 bpp images).
icsconvert converts an image from one colour space to another. You may specify either NTSC(=0) or CIE(=1) XYZ conversion Always returns a 192 bpp standardised image
icsdtoi converts 192 bpp image into 24, 48 or 96 bpp by scaling.
icsedge performs uniform colour space edge detection upon image
icsgetpixel returns the pixel values for the cs using NTSC=0 or XYZ=1 xyz
icsitod converts 24, 36, 48 or 96 bpp image to 192 bpp by scaling.
icsmktemp creates a 3 band image of the colour space specified
icsnormalise normalises 192 bpp to a range of 0..1 in all three bands. Warning, colour spaces generally lose any properties after this operation (ie. psuedo-colour).
icspixdtoi converts 3-band double pixel into 3-band long pixel by scaling. When normalise = 1, it will assume the data is in [0..1]
icspixel converts three band pixel from one colour space to another
icspixitod scales 3-band long pixel into a 3-band double pixel. Set normalise to 1 if original data was in [0..1]
icspixnorm normalise three values for the colour space cs
icspixrange adjusts pixel values if beyond colour space range. Returns 1 if a value was changed else 0.
icspixstand standardise three pixel values to the range of the colour space
icsputpixel sets the pixel at row, col to the values of the cs specified
icsstandard scales 192 bpp back to original colour space range
idumpcps dump an image as a colour postscript file
imuldtoi returns multipliers for scaling 192 bpp to 24, 48 or 96 bpp. If normalise = 1, it will assume the data is in [0..1]
imulitod returns multipliers for scaling 24, 48 or 96 bpp to 192 bpp. Set normalise to 1 if original data was in [0..1]
iuvYtoXYZ converts a uvY pixel to a XYZ pixel

Other Topics

index | userguide | full | arithmetic | basic | binary | blocks | colour | compress | display | docs | fft | hist | image | io | makefile | masks | memory | misc | morph | pixel | rgb | stats | transform | error | mapping