Image Processing Toolbox User's Guide |
Create a color transformation structure
Syntax
C = makecform(type
) C = makecform(type
, 'whitepoint', WP) C = makecform('icc', src_profile, dest_profile) C = makecform('icc', src_profile, dest_profile, 'SourceRenderingIntent', src_intent, 'DestRenderingIntent', dest_intent) C = makecform('clut', profile, LUTtype) C = makecform('mattrc', MatTrc, 'Direction',direction
)
Description
C = makecform(type
) creates the color transformation structure C
that defines the color space conversion specified by type
. To perform the transformation, pass the color transformation structure as an argument to the applycform
function.
The type
argument specifies one of the conversions listed in the following table. makecform
supports conversions between members of the family of device-independent color spaces defined by the CIE, Commission Internationale de l'Éclairage (International Commission on Illumination). In addition, makecform
supports conversions to and from the sRGB standard. For a list of the abbreviations used by the Image Processing Toolbox for each color space, see the Remarks section of this reference page.
1 For the 'xyz2lab'
, 'lab2xyz'
, 'srgb2lab'
, and 'lab2srgb'
transforms, you can optionally specify the value of the reference illuminant, known as the white point. Use the syntax
where WP
is a 1-by-3 vector of XYZ values scaled so that Y = 1. The default is the CIE illuminant D50 as specified in the International Color Consortium specification ICC.1:2001-04 and ICC.1:2001-12. You can use the whitepoint
function to create the WP
vector.
C = makecform('icc', src_profile, dest_profile) creates a color transform based on two ICC profiles. src_profile
and dest_profile
are ICC profile structures returned by iccread
.
C = makecform('icc', src_profile, dest_profile, 'SourceRenderingIntent', src_intent, 'DestRenderingIntent', DEST_INTENT) creates a color transform based on two ICC color profiles, src_profile
and dest_profile
, specifying rendering intent arguments for the source, src_intent, and the destination, dest_intent, profiles.
Rendering intents specify the style of reproduction that should be used when these profiles are combined. For most devices, the range of reproducible colors is much smaller than the range of colors represented by the PCS. Rendering intents define gamut mapping techniques. Possible values for these rendering intents are listed below. Each rendering intent has distinct aesthetic and color-accuracy tradeoffs.
C = makecform('clut', profile, LUTtype) creates the color transformation structure C
based on a color lookup table (CLUT) contained in an ICC color profile. profile
is an ICC profile structure returned by iccread
. LUTtype
specifies which clut
in the profile
structure is to be used. Each LUTtype
, listed in the table below, contains the components of a 8-bit or 16-bit LUTtag that performs a transformation between device colors and PCS colors using a particular rendering.
C = makecform('mattrc', MatTrc, 'Direction',
creates the color transformation structure direction
)
C
based on a Matrix/Tone Reproduction Curve (MatTRC)
model, contained in an ICC color profile. direction
can be either 'forward'
or 'inverse'
and specifies whether the MatTRC
is to be applied in the forward or inverse direction. For more information, see section 6.3.1.2 of the International Color Consortium specification ICC.1:2001-04 (www.color.org
).
Remarks
The Image Processing Toolbox uses the following abbreviations to represent color spaces.
Example
Convert RGB image to L*a*b*, assuming input image is uint8
.
See Also
applycform
, iccread
, iccwrite
, isicc
, lab2double
, lab2uint16
, lab2uint8
, whitepoint
, xyz2double
, xyz2uint16
For a full list of the toolbox color space conversion functions, see Color Space Conversions.
label2rgb | makelut |
© 1994-2005 The MathWorks, Inc.