Re: [Gimp-developer] Don't make an architectural mistake based on a groundless premise



Elle Stone (ellestone ninedegreesbelow com) wrote:
You cannot get from "sRGB as PCS" to LAB without first converting from "sRGB
as PCS" to XYZ. LAB is a mathematical transform of XYZ, not sRGB.

This is the normal path from User_RGB to LAB: User_RGB -> XYZ -> LAB. Two
conversions.

You want to take this path, yes? User_RGB -> XYZ -> "sRGB as PCS" -> XYZ ->
LAB. Four conversions, going through XYZ twice.

[I am most likely talking about stuff that you already know, but it
might be worth reiterating to keep the discussion understandable for
people not that deep in the topic]

Note that - as long as we're talking about linear RGB spaces (which pure
sRGB is not, but AFAIK we're talking about "linear RGB with the sRGB
primaries" here) - all but the last conversions in your chain boil down
to applying a matrix to a vector. You can easily multiply these matrices
together to build a matrix that does the first three conversions in a
single operation.

Some years ago I was working with a camera manufacturer to improve the
image quality from the sensor. We ended up doing the following sequence
of operations:

  * input is RGB data specific to the sensor used
  * this gets transformed to XYZ
  * conversion into the cone response domain (Bradford)
  * shift the white point (for white balance)
  * via Bradford back to XYZ
  * conversion to sRGB (which was the desired output format)

We by no means had enough computing power available to do all these
steps individually. But it also wasn't necessary since they could be
performed within a FPGA with a single matrix multiplication and a
lookup table (for the gamma aspect of sRGB).

But despite talking about a single conversion it is logically composed
from a series of conversions and it is important to keep that in mind to
get a clear understanding what is actually happening.

We must not confuse the logical conversion chain with the computation
that is actually performed.

Bye,
        Simon

-- 
              simon budig de              http://simon.budig.de/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]