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 01:44 (10/07/2014 12:44)
Message-ID<2v963atfma569hkhho2a0437uk7t2jr12c@4ax.com>
Client
Newsgroupsrec.photo.digital
FollowsAlan Browne
Followupsnospam (21h & 41m) > Eric Stevens
Alan Browne (2d & 12m)

On Mon, 06 Oct 2014 17:42:50 -0400, Alan Browne <alan.browne@FreelunchVideotron.ca>wrote:

Alan Browne
On 2014.10.06, 17:27 , Eric Stevens wrote:

Eric Stevens
On Sun, 05 Oct 2014 22:37:46 -0400, Alan Browne <alan.browne@FreelunchVideotron.ca>wrote:

Alan Browne
On 2014.10.05, 20:55 , PeterN wrote:

PeterN
On 10/5/2014 6:57 PM, Alan Browne wrote:

Alan Browne
On 2014.10.05, 14:42 , PeterN wrote:

We went through all this some many months ago. I demonstrated clearly that the amount of 'loss' was negligible in practical terms.

PeterN
I would use the terem "color change." anstead of loss.

Alan Browne
Any change is a quality loss. Whether that is colour difference, tone, brightness, sharpness ... whatever, it's a loss.

PeterN
Then you are using a different definition of quality.

Alan Browne
Not at all. A non lossy process would have:

RGB-A -->X-format -->RGB-B

with RGB-A identical to RGB-B

But - the fact is that with Lab

RGB-A -->Lab -->RGB-B

RGB-A =/= RGB-B, therefore there was quality loss.

Eric Stevens
But hang on: we do accept a certain degree of quality loss as part of the normal process of editing. It doesn't take much manipulation to turn a smooth histogram into something like http://pe-images.s3.amazonaws.com/basics/adjustment-layers/fix-white.gif Push things a bit harder and you can get http://www.snoopy.me.uk/misc/365project/histogram/comb3.jpg or even https://aperture64.files.wordpress.com/2014/09/combing.gif

Alan Browne
The 'issue' refers to the questions: "If I take my JPG and throw it into LAB ('cause I want to do something easier done there) and then throw it back, is there a loss? Is it important?"

1. Yes. 2. Negligible.

So in a "normal process of editing" where one goes from a high quality image (raw) to the Adobe "editing space" format and then save as a:

PSD: no loss (other than editing effects) TIFF: no loss (other than editing effects) JPG: lossy

But if one went to Lab space and back along the way, then it will always be lossy even if nothing was done in Lab space.

True, but as I found in my experiments (as described again, below) the loss on conversion is close to zero. The argument is not whether or not there is any loss in going through Lab space but whether or not the loss is significant. nospam seems to equate even the smallest loss arising from Lab conversion as significant but he forgets that the fact that he has loaded the image into an editor is going to wreak considerably more damage to the original image. That's why I think he is talking nondense when he advocates not using Lab so as to avoid damage.

Eric Stevens
The production of histograms like the first one is common and generally acceptable. The second histogram is worse but even then may be acceptable. Only the last one is so bad that it will nearly always be unacceptable. The point of all this is that some degree of quality loss is virtually inevitable as soon as you start to manipulate an image.

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.

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.

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.

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.

Alan Browne
I'll try your method above when I have a chance. I've gone through this exercise in the past and the difference (by subtraction) was visible (faint, but unmistakable).

https://www.dropbox.com/s/3uwyuwun56nc370/HugoBossBeltBuckle_20140323_0002-SD.jpg?dl=0

The only issues are:

1. Lossy formats. Repeatedly opening and then saving a JPG at a lower quality level will increase loss. This will be visible at some point.

2. Format conversion. For all the mentioned reasons, including the quantization error the Martin Brown pointed out, there is a change in the image and therefore it is quality loss. There is no other term.

Eric Stevens
============================>> The histogram of the JPG(RBG) --->Lab --->PSD when compared with JPG(RBG) --->PSD shows only very slight evidence of differences between the two.

Alan Browne
The better way to see is to do image subtraction. While a histo may bear witness to change, an imaage subtraction will always bear witness.

Eric Stevens
However JPG(RBG) --->Lab --->JPG(RBG) appears to be identical to the original JPG(RBG).

So far I don't think I have found any evidence of damage worth worrying about.

Alan Browne
Never said different.

--

Regards,

Eric Stevens

nospam (21h & 41m) > Eric Stevens
Alan Browne (2d & 12m)