View Single Post
  #724  
Old October 6th 14, 04:33 PM posted to rec.photo.digital
Martin Brown
external usenet poster
 
Posts: 821
Default Is RGB to Lab lossy? - was( Lenses and sharpening)

On 06/10/2014 14:19, PeterN wrote:
On 10/5/2014 10:37 PM, Alan Browne wrote:
On 2014.10.05, 20:55 , PeterN wrote:
On 10/5/2014 6:57 PM, Alan Browne wrote:
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.


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

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


Then you are using a different definition of quality.


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.


It seems to me that the assumption in that logic is:
the quality of RGB-A quality of RGB-B.
LAB has a larger color gamut than RGB. If there is no processing in LAB
I would think that there would be no need for interpolation on the
return trip.


The problem is not one of interpolation but that there are unavoidable
minor rounding errors in the nonlinear transform from RGB to CIELAB and
also on the way back due to the finite representation of the results. See:

http://en.wikipedia.org/wiki/Lab_color_space

There is no assumption here beyond the very definition of a lossless
transform. Applying a lossless transform and then its inverse to the
result you must be able to get to back your original image *EXACTLY*.

Do the round trip x + 10 times without processing and one might see a
difference. It is doubtful that there will be a noticable difference
from 10 round trips. Meanwhile there are color modification processes
that are easier to perform in LAB than RGB. I would think that if the
changes made in LAB created color outside the RGB gamut there would have
to be some interpolation. The interpolation coud mae a better image, or
it could make the changed image horrific.


It isn't interpolation - if anything it is a quantisation effect with
very different steps in CIELAB than in RGB. See for example:

http://en.wikipedia.org/wiki/Lab_color_space

Some pixel values may converge to an attractor on the first or second
pass around the loop and after that do not change at all. A few unlucky
ones may drift away from the original colour (but probably not by much).

Out of gamut values pretty much end up clipped against the nearest RGB
boundary on a minimise the absolute perceived colour error basis.

In another area, I have found images to be fine with a color cast, but
when I remove the cast, to my eye the image looks horrific.


CIELAB does a better job of managing just noticeable visual differences
and allows better adjustment of visual saturation and lightness.


--
Regards,
Martin Brown