Thursday, April 29, 2010

LabPQR, what is it?

For several years, a group of researchers around Prof. Mitchell Rosen at RIT has been publishing papers on LabPQR. Now that he is publishing on different topics may be a good time to survey LabPQR.

While most color reproduction can be done with colorimetry, some problems require a spectral treatment. Examples include:

  • Spectral printer models
  • Mapping from one device to another
  • Fluorescent inks and/or media
  • Physical media models
  • Ink-media interactions
  • Security printing
  • More than 3 colorant hues (e.g., CMYKOGV)
  • Multiple illuminants (metamerism index minimization)
  • Mapping K generation between two different CMYK printers
  • Scanner and camera characterization

From an implementation point of view, processing spectral color is relatively simple, you just have n-dimensional arrays instead of triplets, plus a few linear algebra functions. The harder problem is when we would like to use an ICC type workflow also for spectral imaging, because the LUT used for the PCS will be huge:

Space needed to store a PCS LUT
bands in bands out levels per band
size [bytes]
3
6
17
30 K
6
6
17
145 M
9
6
17
700 G
31
6
17
8*10^27 G

Storing a multidimensional vector for each pixel is expensive. Can we project on a lower-dimensional vector space? Yes, because the spectra are relatively smooth. With principal component analysis (PCA), the dimension can be quite low: between 5 and 8. We have known how to deal with this for decades (e.g., Judd and McAdam for the Munsell chips in 1964), it just requires linearly more processing.

Rosen et al.'s proposal is to introduce in the ICC workflow such a lower-dimensional space, they call Interim Connection Space (ICS):

interim connection space

The next wish is to maintain compatibility with colorimetry. Can we deviate from the usual PCA method of choosing the largest eigenvectors and build on some other useful basis?

When defining the basis vectors for XYZ, the new basis was chosen so that one vector coincides with luminous efficiency V (λ), achieving compatibility of colorimetry with photometry. A 1995 proposal by Bernhard Hill et al. at RWTH Aachen was to incorporate three colorimetric dimensions, achieving compatibility of spectral technology with colorimetry:

color encoding proposed by Hill at RWTH Aachen

With this, Rosen et al. proposed the following approach they call LabPQR:

  1. Calculate an operator similar to matrix R using regression analysis on a specific printer (unconstrained), or matrix R directly (constrained)
  2. Calculate the residual using principal component analysis
  3. Calculate the tristimulus values XYZ
  4. Calculate PQR from the residual (3 largest EV)
  5. Calculate LabPQR from XYZPQR using the CIE equations for CIELAB

The convenient aspect of LabPQR is that it is very easy to visualize. Instead of a 6-dimensional space one can imagine the conventional CIELAB space, where each point in the color gamut, however, is actually a 3-dimensional gamut in PQR.

This is very similar to the way one does Fourier colorimetry with quaternions. A quaternion may be represented as a complex number with complex real and imaginary parts, the two complex numbers having different and orthogonal complex operators. This is known as the Cayley–Dickson form, after its 19th century discoverers.

Returning to LabPQR, the figure below shows how the encoding is verified. Assuming the requested color is in gamut, one first looks up the CIELAB point using the first 3 coordinated, receiving the PQR gamut at right for that CIELAB point. There one looks up the PQR coordinates for the residual basis functions. The lower part shows the reconstructed spectra.

verification of spectral color reproduction using LabPQR

For out-of-gamut colors the gamut mapping has of course to be done by tessellating the 6-dimensional LabPQR space, as there is no PQR gamut for an interpolated CIELAB value. However, the underlying math is a straightforward extension of interpolating tetrahedrons.

Rosen et al. propose two variants of LabPQR: constrained and unconstrained. In the constrained variant, the colorimetric transform is purely Matrix R, i.e., it is computed as A/(A'A) from the color matching functions A. In the unconstrained variant, the colorimetric transformation is calculated via least squares analysis over a number of tristimulus vectors for spectral values. In both variants, the PQR basis vectors are calculated from metameric black using PCA.

How do the two variants of LabPQR perform in terms of accuracy, i.e., what price in loss of accuracy do we pay for compatibility with conventional metamerism theory?

Based on simulations (no LUT), the constrained model is more accurate in general. However, for a single fixed printer, the unconstrained method allows the use of less principal components: LabPQ.