Skip to main content
news

Re: Is RGB to Lab lossy? -...

Eric Stevens
SubjectRe: Is RGB to Lab lossy? - was(Re: Lenses and sharpening)
FromEric Stevens
Date10/07/2014 10:39 (10/07/2014 21:39)
Message-ID<be973ahjtsprq2f870a6ss6u5lrtr1enes@4ax.com>
Client
Newsgroupsrec.photo.digital
FollowsMartin Brown
FollowupsSandman (12h & 42m)
nospam (12h & 47m) > Eric Stevens

On Tue, 07 Oct 2014 08:44:45 +0100, Martin Brown <|||newspam|||@nezumi.demon.co.uk>wrote:

--- snip ---

Eric Stevens
In the context of the present discussion, the question is, does the conversion to Lab colour incur any more damage than one can expect in the course of ordinary editing? My understanding of nospam's claim is that it does. My (admittedly limited) experience with it suggests that conversion to Lab causes no significant damage; certainly less than I am going to inflict on the image by the changes I want to make.

Martin Brown
Since CIELAB is a colour space intended to manage just noticeably colour differences more optimally than the naive RGB colour space it isn't too surprising that you cannot *see* a difference in the final JPG taken from RGB or via CIELAB. But they are very slightly different.

Agreed, but the question is, does the difference matter? In particular does it matter enough to earn the reputation that nospam is trying to assign to it? I would generally answer 'no' to both of thos questions.

Eric Stevens
As to the extent of the damage, I can only refer to my original experiment described in Message-ID: <uuou2atgm5l6j5rn9d47jk7mn8s927cpdk@4ax.com>

------------------------------------------

This one continues to bother me. I am still inclined to agree with Dan Margulis. I'm not quite sure what procedure Andrew Rodney is proposing to prove his point so, using Photoshop CC, I have carried out my own test as follows:

1. Find a JPG with a suitable range of colors. This one came from my wife's collection: https://dl.dropboxusercontent.com/u/31088803/Lab%20test%20IMG_2154.jpg I saved a copy as a PSD (see below for the reason).

2. Copy and convert to Lab. I couldn't save to JPG from Lab so I saved to PSD. See https://dl.dropboxusercontent.com/u/31088803/Lab%20test%20IMG_2154-via-Lab.jpg

3. I then loaded the two PSD files into a new file as separate layers. (1) above was the background layer and (2) was the next. I subtracted the 2nd layer from the first with the result shown in https://dl.dropboxusercontent.com/u/31088803/Lab%20test%20Difference.jpg That's right: solid black.

Martin Brown
It is only solid black so long as you don't use the histogram tool to look in detail at the noise floor (also I am not sure how you did the differencing - you may be missing half the differences if you did a simple subtraction which clipped to zero as opposed to an absolute difference where any discrepancy is rendered as a positive difference).

Use the histogram tool and you will see that the images do differ in the luminance least significant bit. This would be undetectable in practice but it is non-the-less a difference (ie not lossless).

Eric Stevens
4. To confirm the point I took a screen shot. See https://dl.dropboxusercontent.com/u/31088803/Lab%20test%20Screen.jpg Note the histogram. All of the pixels appear to be down at the zero end of the scale: that is, jet black.

The only conclusion I can reach is that there is no difference between a PSD created from a RGB file and a PSD created from the same image when it has first been converted from RGB to Lab.

Martin Brown
In practice you will not be able to see the difference and without pixel peeping you can't see the difference on a simple difference image but it is still there - just below your visual threshold.

The histogram of a subtraction will give you the answer.

Eric Stevens
I'm not wedded to the perfection of the method I have used and I would be interested to hear from anyone who has a meaningful criticism.

Martin Brown
The only thing that did surprise me was that the resulting errors are entirely in luminance there is no chroma noise introduced at all. (this might be an artefact of how you did the differencing)

I did nothing fancy at all. --

Regards,

Eric Stevens

Sandman (12h & 42m)
nospam (12h & 47m) > Eric Stevens