PANDORE Version 6 |
GREYC-IMAGE |
pxyz2lab
Converts XYZ color image to Lab color image.
Synopsis
pxyz2lab primaries [-m mask] [im_in|-] [im_out|-]
Description
pxyz2lab converts color image from
the color space XYZ to the color space Lab.
LAB defines 3 components:
- L est la luminancy
- a is red/blue chrominancy
- b is yellow/blue chrominancy
The conversion uses the matrix:
L=116*((Y/Yn)^(1/3)) if Y/Yn>0.008856
L=903.3*Y/Yn if Y/Yn<=0.008856
a=500*(f(X/Xn)-f(Y/Yn))
b=200*(f(Y/Yn)-f(Z/Zn))
where
if Y/Yn>0.008856 f(t)=t^(1/3)
else f(t)=7.787*t+16/116
Parameters
- primaries is an integer from [0..6]
which defines the type of conversion:
- 0-illuminant E
- 1-illuminant primaries CIE-DIN
- 2-illuminant A primaries macbeth colour chart
- 3-illuminant A primaries CIE
- 4-illuminant C primaries NTSC
- 5-illuminant C primaries CIE
- 6-illuminant D65
Inputs
- im_in: a XYZ color image.
Outputs
- im_out: a Lab color image.
Result
Returns SUCCESS or FAILURE.
Examples
pxyz2lab a.pan b.pan
See also
Color
C++ prototype
Errc PXYZ2LAB( const Imc2dsf &im_in, Imc2dsf &im_out );
Version française
Changement d'espace couleur de XYZ vers Lab.
Author: Olivier Lezoray