Adobe math in Lab mode

RG
Posted By
Rags Gardner
Jul 20, 2006
Views
850
Replies
6
Status
Closed
The subject of Adobe’s quasi 15-bit math has been discussed in the forums before. In addition, errors in the Lab mode histograms and in the JavaScript SolidColor object have been posted in the scripting forums and acknowledged by Adobe. Since I have some new information, I would like to re-open the discussion.

The fact that RGB-LAB-RGB conversions will alter colors has also been discussed. I agree that this will happen if the image contains out of gamut colors in one or both of the color spaces. And that 8-bit rounding can destroy any image. But in 16-bit mode, with all image colors in gamut, any rounding errors should be minimal. This does not seem to be the case.

While doing some color testing, I discovered some simple cases that demonstrate the situation.

With ProPhoto RGB as your default RGB color space and with an image open in ProPhoto RGB, if you enter the RGB values 238, 203, 0 in the Color Picker the corresponding Lab values will show as 88, 19, 127. If you then paint with this color, or place the eyedropper over the foreground color the Info panel will show Lab values of 88, 19, 128. The range of Lab ab values is –128 to +127. The Color Picker will not allow you to enter an ab value of +128. This +128 shows as 16384 in the 16-bit display, which is +127 in Adobe’s quasi 15-bit math.

For another example, set the Info panel to display both RGB and Lab in 16-bit. Avoid, the “Actual Color” or you can get confused since the display will change dynamically. If you enter the Lab values 100, 0, 0 the L channel shows as 32768 in the 16-bit display. And the RGB values are 255 at 32737. But if you enter RGB 255 it shows as 32768 and the equivalent L value is 100 at 32768. Clearly the math is not symmetric.

Open a small new image in Lab mode. Set the histogram to the all channels view. Then paint with lab colors. You will see that ab –1 and 0 are at levels 127 and 128 respectively. Then use ab +1 and 0. They are both at level 128. Level 254 will correspond to +127. This should have been level 255. So, the mid-point is ambiguous and the max highlight is wrong. Actually, every positive value is wrong.

One might make an argument that the Info displays are the only errors. But I have seen enough to convince me that the math is just plain wrong. Since Lab is the Adobe reference space, these errors are being propagated throughout the color space conversions. I see them in the scripting interface, in the histograms, and now in the Info panels. It looks to me like there is a mixture of true 16-bit math and some quasi 15-bit math in the Adobe Lab routines. Not consistent!

That said, I believe it is time for Adobe to drop the quasi 15-bit math. Leaf Aptus has cameras that shoot true 16-bit math already. One half of this dynamic range is lost simply by converting to 15-bit math. How long will it be before 16-bit cameras are affordable to more of us? Some have suggested that these are not true 16-bit in the first place. But both Leaf and Dalsa (the sensor manufacturer) insist it is.

I sincerely hope that Adobe is going to address this in CS3 if not sooner.

Cheers, Rags 🙂

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

DM
Don_McCahill
Jul 21, 2006
So with 16 bit color you have 281,474,976,710,656 possible colors. What is wrong with 140,737,488,355,328 possible colors when you only have 15 bit color. I defy any one, anywhere to detect the difference of a color sample that is 16 bit from one that is identical, except for 1 bit lower or higher on each of the channels.

Just because it is technically possible doesn’t mean you need it.
CN
Cybernetic Nomad
Jul 21, 2006
or that it is desireable. The benefits of 15bits + 1 have been explained here before
RG
Rags Gardner
Jul 21, 2006
Don,

I agree that you can’t see the difference between 15 and 16 bit. My primary point was that the inconsistent math is introducing larger errors in the RGB values. And of course, that repeated conversions amplify them.

Cheers, Rags 🙂
LH
Lawrence_Hudetz
Jul 21, 2006
16 bit process my not produce more accurate color but where it may make a difference is on banding. Canon has a new 17" wide printer which can print in 16 bit mode, and at least for this device, no color differences are noted between 8 and 16 bit, but banding issues are minimized. I haven’t run my own tests yet, but the supplier send a rep to a training seminar put on by Canon and he told me that’s where the usefulness lies.

What I don’t know is whether the nozzles are actually run at 16 bit or perhaps an advanced dithering process is employed.
GH
Gernot_Hoffmann
Jul 21, 2006
Rags,

thanks for your observations.

1. Now you are saying ‘the math is not symmetric’.

Here is a simple example for a non-symmetric
math though float accuracy is assumed:

Input: 53
Float: 53.0
Sqroot: 7.28
Round: 7

Input: 7
Float: 7.0
Square 49.0
Round: 49 (instead of 53)

RGB <—> Lab is strongly nonlinear, which
is ‘simulated’ by squareroot and square above.

2. Personally, I won’t bother about lacking accuracy,
but I’m observing this as well:
<http://www.fho-emden.de/~hoffmann/swatch16032005.pdf>

The doc is entirely coded in Lab. It contains plenty
spot patches, starting at p.3.
With Lab numbers, sRGB (s) and AdobeRGB numbers (a).

Set RGB space sRGB (or AdobeRGB)
Load p.3 in PhS in mode Lab
Read Lab values: OK, correctly rounded.
Read RGB values: often wrong by one unit of 255 in one
or more channels.

3. The dynamic range for Leaf Aptus isn’t 16 bit:
<http://tinyurl.com/zuck5>

Dynamic Range 12 f-stops
Color Depth 16 bit per color

16 bit data acquisition needs much better specs, mainly
for the ADC and the noise.

Best regards –Gernot Hoffmann
GH
Gernot_Hoffmann
Jul 22, 2006
In fact, there is just one function for
integer inputs and integer outputs which
can be reproduced accurately in both
directions ( here called ‘symmetry’):

y(x) = x

It’s accurate because the inverse function
is the same as the original function.

Best regards –Gernot Hoffmann

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

Related Discussion Topics

Nice and short text about related topics in discussion sections