Debian Codegraph @

doc/iccgamutmapping.html

raw symbols SCIP
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <title>About ICC profiles and Gamut Mapping</title>
5 <meta http-equiv="content-type" content="text/html;
6 charset=windows-1252">
7 </head>
8 <body>
9 <h2><u>About ICC profiles and Gamut Mapping</u></h2>
10 <h3>How ICC profiles support different intents</h3>
11 cLUT (Color Lookup Table) based ICC profiles support multiple <span
12 style="font-weight: bold;">intents</span> by having a table for
13 each intent. In a typical device cLUT profile, there are up to 6
14 cLUT's, three for input (AtoB tables, that convert from device space
15 to PCS (Profile connection space)), and three for output (BtoA
16 tables, that convert from PCS to device space). The tables allow the
17 use of different color transforms, each transform being tailored for
18 a different effect:<br>
19 <br>
20 AtoB0, BtoA0:&nbsp;&nbsp; Perceptual<br>
21 AtoB1, BtoA1:&nbsp;&nbsp; Colorimetric<br>
22 AtoB2, BtoA2:&nbsp;&nbsp; Saturation<br>
23 <br>
24 The colorimetric intent is meant to convey the exact device color
25 behaviour, without any gamut mapping. Typically it is used to store
26 the devices behaviour (characterization), and is also used where
27 exact color reproduction is required, such as for proofing. The
28 Colorimetric tables double up for both relative colorimetric and
29 absolute colorimetric with the application of a white point
30 restoration.<br>
31 <br>
32 The Perceptual and Saturation tables are meant to contain gamut
33 mapping combined with the device characterization. The allowance for
34 this in both the AtoB direction, as well as the BtoA direction
35 permits a profile to gamut map from the device gamut to some
36 intermediate gamut, and then from the intermediate gamut to the
37 device gamut.<br>
38 <br>
39 [Note that Shaper/Matrix profiles are always Colorimetric intent,
40 since there is only a single transformation, and it does not have
41 the necessary flexibility to accommodate gamut mapping.]<br>
42 <h3>ICC Version 2 behaviour<br>
43 </h3>
44 Apart from defining the general purpose of the different tables, the
45 ICC Version 2 specification doesn't specify exactly how they are to
46 achieve this, so it is up to the profile maker to make a choice in
47 this regard. There is no common gamut boundary specified for the
48 PCS, and such an approach limits the achievable intents in any case
49 (see ICC Version 4 behaviour for an explanation why).<br>
50 <br>
51 What I've chosen to do with Argyll profiles, is to make all the AtoB
52 tables the same as colorimetric. This means that the conversion used
53 for the source profile is always colorimetric, and also means that
54 the source gamut seen by the destination profile is the source
55 colorspace gamut. This means that the gamut mapping is done solely
56 in the BtoA tables, and that their task is to map the source
57 colorspace gamut to the destination colorspace gamut. So to
58 construct the perceptual and saturation intent mapping tables, a
59 source profile or source gamut needs to be specified, so that a
60 gamut mapping can be constructed.<br>
61 <br>
62 The advantages of this approach is that the behaviour is precisely
63 defined, a full range of gamut mapping options is available, and
64 compatibility with matrix profiles (which do not have gamut mapping
65 transforms) and other foreign profiles can be assured, by simply
66 using such profiles as colorimetric sources. The main disadvantage
67 is that the gamut mapping will only operate exactly as intended when
68 the profile is linked with the source profile it was setup for. This
69 is really a fundamental limitation of the idea of having
70 pre-computed gamut mapping color transforms, that the ICC profile
71 format was intended to support.<br>
72 <br>
73 Some non-Argyll profiles have gamut mapping transforms in their
74 Perceptual and Saturation A2B tables, and this means that the
75 apparent gamut of a source through these tables may be different to
76 the actual device gamut. To accommodate using these profiles with
77 CMM's (Color Management Modules) that do not permit the separate
78 choice of intent tables for the source and destination profiles,
79 Argyll will by default use the gamut defined by the source profile
80 perceptual table to create the gamut mapping of the destination
81 perceptual table, and the source saturation table to make the
82 destination saturation table. Note that this can affect the exact
83 nature of the gamut mapping, the distortion of the source gamut
84 changing the apparent relationship between it and the destination
85 gamut - see "ICC Version 4 behavior" for an illustration of the kind
86 of changes this causes. [This default can be overridden though using
87 the colprof -nP and -nS flags.]<br>
88 <h3>ICC Version 4 behaviour</h3>
89
90 (Note that ArgyllCMS does not support ICC V4)<br><br>
91
92 By default, ICC Version 4 profile operates similarly to the ICC V2
93 profile in regard to gamut mapping, with the exception that a
94 minimally specified reference medium and reference viewing
95 conditions are introduced for perceptual (and presumably saturation)
96 tables, allowing at least the luminance range to have a well defined
97 behavior when mixing and matching the perceptual A2B and B2A tables
98 of different profiles. A slight adjustment was made to the permitted
99 tag contents, to allow things like Display profiles to contain the
100 full range of AtoB and BtoA tables, so that they could also be gamut
101 mapped. An optional part of ICCV4, introduces a more comprehensively
102 specified <span style="font-weight: bold;">Profile Reference Medium
103 Gamut</span> (PRMG) as an intermediate gamut boundary between the
104 source colorspace, and the destination colorspace. If this option is
105 used, then an additional tag in the ICCV4 profile indicates that
106 this is the case. This then solves the problem of the gamut mapping
107 having to know the source and destination gamuts to operate.
108 Instead, the gamut mapping is split into two parts, the first where
109 the source gamut to RMG is done by the AtoB tables, and then the RMG
110 to destination gamut is done by the BtoA tables. Profiles can
111 therefore be mix and matches, while retaining true gamut mapping.<br>
112 <br>
113 This approach has a number of drawbacks though. One is that the
114 colors get gamut mapped twice. Gamut mapping is sometimes not very
115 precise, and the geometry of the transforms may not cancel out,
116 especially since different profile vendors may choose different
117 algorithms in their gamut mapping. By "cancel out", I mean that even
118 if you were linking the same source colorspace to the same
119 destination colorspace, the gamut may be expanded (say) in the
120 process of mapping to the PRMG, and then compressed again in mapping
121 from the RMG to the device space, and these expansions and
122 compressions may not quite match. Given that the PRMG is a
123 relatively large gamut, larger than many real devices actual
124 behavior, this sort of expansion and re-compression will be the
125 normal thing.<br>
126 <br>
127 The chief drawback, is that only one (non colorimetric) intent can
128 really be supported, that of saturation. <br>
129 <br>
130 The typically expected behavior of perceptual intent gamut mapping,
131 is to compress any areas of the source gamut that lie outside the
132 destination gamut, but for areas that fall within the destination
133 gamut, change them as little as possible, consistent with keeping
134 smooth and proportional with respect to the compressed colors. This
135 preserves the source "look" as much as possible, while ensuring that
136 out of gamut colors are smoothly brought within the destination
137 gamut.<br>
138 <br>
139 Typical behavior of a saturation intent, is (at least), to not only
140 compress out of gamut source colors to fit within the destination,
141 but to expand any source boundary that falls within the destination
142 gamut outwards match the destination gamut. Some practical
143 saturation gamut mappings may go further than this, and expand a
144 little beyond the destination gamut to ensure fully saturated
145 boundary colors, and also enhance the saturation of all colors
146 mapped through it.<br>
147 <br>
148 &nbsp;By mapping the source gamut to the RMG in the A2B, all
149 information about what areas of the source gamut are inside or
150 outside of the destination gamut are lost, so the destination gamut
151 mapping can not known which colors may be left unchanged, and which
152 really need compressing. All it can do is map the RMG to match the
153 destination gamut, thereby effecting a saturation style intent. <br>
154 <br>
155 If the source was not expanded out to fill the RMG in some area by
156 the A2B, then the resulting output will be over compressed and end
157 up looking dull, because the B2A table has no choice but assume that
158 there may be colors that do fill the RMG.<br>
159 <br>
160 Once again, this is all a fundamental limitation of using
161 pre-computed gamut mappings. The only effective way of overcoming
162 such limitations is to move to a more active color management
163 architecture, in which gamut mappings are computed at link time, to
164 accommodate the actual source and destination gamuts.<br>
165 <br>
166 <br>
167 <img alt="Illustration of perceptual and saturation gamut mapping."
168 src="gamutmapping1.jpg" style="width: 665px; height: 215px;"><br>
169 <br>
170 <br>
171 <br>
172 <br>
173 <br>
174 </body>
175 </html>