[argyllcms] Re: Custom Illuminant

  • From: <robert@xxxxxxxxxxxxxxxxxx>
  • To: <argyllcms@xxxxxxxxxxxxx>
  • Date: Wed, 16 Jul 2014 12:31:56 +0100

Hi Graeme,

Thanks for your reply. It's a slow process for me!

I've made some further changes to my description (highlighted within <<>>)
to reflect your corrections.

This note only describes the effect of the -g flag in colprof for a
Perceptual mapping only . however it can also be used for a Saturation

The -g flag only affects the Perceptual B2A table (in order for this to be
generated by colprof, the -s flag is also required).

-g uses a gamut file which is produced either from tiffgamut (from a set of
images), or iccgamut (from an icc profile).  I'll refer to this gamut as the
Image Gamut, or IG.

If -g is not used, the Perceptual mapping is from the gamut of the source
profile (which I will call SG) to the gamut of the destination profile
(which I'll call DG).  The B2A0 table, which is responsible for the
Perceptual mapping, effectively 'squeezes' the whole of SG into DG.  All of
the colors that were present in SG will be remapped to new colors in DG,
even if none of the colors in SG were outside of the DG gamut (the effect of
the 'squeeze').  Where SG is smaller than DG, the boundary colors are not
shifted. <<If there are image colors outside SG, they will be clipped to the
DG boundary. This can only happen if the profile is used to map an image
with a large gamut from a larger colorspace than the one specified in
colprof. in other words if the profile mapping is incorrectly applied.>>

The -g flag effectively replaces SG by IG (with the white and black points
coming from SG), so that the mapping now effectively 'squeezes' IG into DG
<<with further possible mapping if the source and destination white points
are different.>>

The effect is a Perceptual mapping that is less drastic than the full SG to
DG mapping (which can result in desaturation of the more saturated colors,
for example, because they are shifted to inside the DG gamut if SG is larger
than the image gamut).  <<A possible problem, but one that may possibly give
a more pleasing effect, is that if the image contains colors that are
outside IG (which could happen if the image was not part of the set used to
create IG), these colors will be clipped to DG, and so the perceptual
relationship will no longer be fully maintained.>>  For this reason,
profiles using -g should <<normally>> only be used when the image gamut is
known to be inside of IG: this can only be guaranteed if the image is part
of the set of images used in tiffgamut to make IG.  With caution, the
profile could be used for an image that was not used to created IG, IF it is
known, within reason, that its gamut is approximately within IG, <<or at
least not much larger>>. <<At any rate, for all conversions a visual check
should normally be done, and where the CMM is seen not to handle the
conversion as desired, the image should be adjusted manually.>>

The reason for this sort of approach is to attempt to reduce the
desaturation that can be the result of a Perceptual mapping from a large
color space to a smaller one.  (It is also applicable to Saturation
mappings). <<However, it should be noted that the desaturation effect will
be greatest for mappings from large gamuts to small ones, so that choosing a
working space with a smaller gamut may present an alternative approach: in
which case the generation of a profile with an IG could be restricted to
problematic images.>>

If the image gamut is not known to be within IG and we do not wish to
produce a new profile . but we wish to soften the full SG to DG squeeze, an
alternative strategy to using the -g flag <<may be>> to do a Relative
Colorimetric mapping to an intermediate-sized gamut (for example from
ProPhoto to Adobe RGB), followed by a Perceptual mapping to DG. <<However,
normally using the right options with tiffgamut + collink + cctif will
achieve the desired effect .. which I currently have NO idea how to use but
clearly need to look at!>>

Thanks again!


Other related posts: