[argyllcms] Re: Camera Profiling using ArgyllCMS

  • From: Graeme Gill <graeme@xxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Thu, 27 Nov 2008 13:08:25 +1100

Hal V. Engel wrote:

The LProf profile also shows a reversal in the red channel near the black point. This could be because of a problem with the profiling algorithm and/or because of too little smoothing. I suspected that increasing the smoothness

There are many differences between the three profiles. The profile maker
profile has XYZ PCS, and includes both matrix and CLUT tables. Given this,
it's probably hard to know which of these a CMM or application
is actually using.

I note that a profile made with Argyll using an XYZ PCS CLUT is a better
fit to the data than Lab (ie. colprof -ax), and will not clip
the gamut in the blue due to the Lab PCS encoding limitations.
(Often an XYZ PCS is a good choice for input devices).
A matrix shaper profile could also be created using -as.

I'm not sure what you mean by a red channel reversal - there is none
in the per channel curves, perhaps you mean the CLUT ?

The source of such a reversal will be in the patch data. This
could be due to noise, reference file inaccuracy, or possibly
even sensor metameric differences to the standard observer
(although this would be hard to explain given the characteristics
of the colorants typically used to create an IT8 chart). Metameric
differences are one of the primary issues with input devices, as spectral
sensitivity differences between a sensor and human vision leads
to the situation where there are colors that appear the same to
the camera that appear different to an observer, and visa-versa.
This is not something that can ever be compensated for once
the color has been acquired by the input device sensor.

When I tried the same thing with the OP's target image I was not able to eliminate the reversal in the red channel. So I also suspect that there is a problem with how the red channel is being handled by the profiling algorithm.

A possibility is that it is a result of all these packages creating the profile
the wrong way around. The natural mapping is from PCS to device, so the device
to PCS model should really be created by inverting the natural PCS to device 
This makes a difference if there are any many to one mappings in the natural 
Inverting has to face up to this and choose a unique mapping, whereas creating 
model by swapping the device and PCS values (as all the packages do), tries to
fudge over it.

There is also another difference between how LProf and Argyll do this compared to ProfileMaker. Specifically ProfileMaker appears to create the same CLUT curve for all three channels which means that no correction is done for response shifts in the individual channels at different luminosity levels. Where as LProf and Argyll create distinct curves for each channel. I know that the author of UFRAW believes that using a single curve for all three channels is the correct approach and it appears that authors of ProfileMaker agree him. At some point I will add a switch to LProf to allow users to

Without understanding the rationale, I wouldn't be following them blindly.

One thing I notice about the matrix based profiles is that profilemaker
restricts the XYZ of the primaries to be +ve. This may be to comply
with the ICC spec, although there is no reason that the camera response
has to have primaries with non-negative XYZ, and the best fit to
the IT8 data has such green and blue primaries. A more interesting question
is whether this is symptomatic of un-damped extrapolation, the IT8 test
patches being of relatively small gamut, and therefore not controlling
the model very well for highly saturated input.


Graeme Gill.

Other related posts: