makecform
Create color transformation structure
Syntax
Description
The makecform
function supports conversions between members
of the family of device-independent color spaces defined by the Commission
Internationale de l'Éclairage (International Commission on Illumination,
or CIE). makecform
also supports conversions to and from the
sRGB and CMYK color spaces. To perform a
color space transformation, pass the color transformation structure created by
makecform
as an argument to the applycform
function.
creates a color transformation based on two ICC profiles,
C
= makecform('icc',src_profile
,dest_profile
)src_profile
and
dest_profile
.
creates a color transformation based on two ICC color profiles,
C
= makecform('icc',src_profile
,dest_profile
,'SourceRenderingIntent',src_intent
,'DestRenderingIntent',dest_intent
)src_profile
and dest_profile
,
specifying the rendering intent for the source and destination profiles.
adds the option of specifying the rendering intent.C
= makecform('mattrc',profile
,'Direction',direction
,'RenderingIntent',trc_intent
)
adds the option of specifying the rendering intent.C
= makecform('graytrc',profile
,'Direction',direction
,'RenderingIntent',trc_intent
)
Examples
Convert sRGB Image to L*a*b*
Convert RGB image to L*a*b*, assuming input image is sRGB.
rgb = imread('peppers.png'); cform = makecform('srgb2lab'); lab = applycform(rgb,cform);
Convert RGB to XYZ
Convert from a non-standard RGB color profile to the device-independent
XYZ profile connection space. Note that the ICC input
profile must include a MatTRC
value.
InputProfile = iccread('myRGB.icc'); C = makecform('mattrc',InputProfile.MatTRC, ... 'direction','forward');
Input Arguments
Output Arguments
More About
References
[1] International Color Consortium. https://www.color.org.
Version History
Introduced before R2006a