PANDORE Version 6 GREYC-IMAGE

prgb2xyz



Converts RGB color image to XYZ color image.



Synopsis

prgb2xyz primaries [-m mask] [im_in|-] [im_out|-]

Description

prgb2xyz converts color image from the color space RGB (Red, Green, Blue) to the color space XYZ. Within the XYZ colorspace, each value is represented as a set of positive values from 0..1.

The conversion uses the conversion matrix. For example, for the case primaries = 4 (illuminant C primaries NTSC):

    |  0.607   0.174   0.200 |
    |  0.299   0.587   0.114 |
    |  0.000   0.066   1.116 | / VALMAX

where VALMAX is the maximum value (eg. 255 for bytes images).

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Converts parrot.pan from rgb to xyz and conversely.

   prgb2xyz 4 parrot.pan a.pan
   pxyz2rgb 4 a.pan b.pan

See also

Color

C++ prototype

Errc PRGB2XYZ( const Imc2duc &im_in, Imc2dsf &im_out, int primaries );

Version française

Changement d'espace couleur de RGB vers XYZ.


Author: Olivier Lezoray