Re: [Gimp-developer] Luminosity in LAB does not agree with Wikipedia or Matlab
- From: Graeme Gill <graeme2 argyllcms com>
- To: gimp-developer-list gnome org
- Subject: Re: [Gimp-developer] Luminosity in LAB does not agree with Wikipedia or Matlab
- Date: Tue, 20 Dec 2011 07:04:20 +1100
Richard Gitschlag wrote:
> Out of curiosity I looked through the C source for the decompose plugin and noticed that the LAB
> decomp actually performs a cube root (and offset) of its input values during its calculations,
> which is why a linear input gradient produces a nonlinear result.
> Perhaps there can be an additional L*a*b* color option added to the plugin that incorporates the
> gamma correction into its processing? Performing it manually after the decomp does lose some
> quality in the color channels for obvious reasons, but if it could be included as part of the
> plugin's execution then it would not.
How about just implementing the conversion correctly ? To convert from RGB to L*a*b*,
one has to convert from RGB to XYZ, then XYZ to L*a*b*. A typical working RGB space (like
sRGB, AdobeRGB etc.) has a gamma encoding. So RGB to XYZ removes the gamma
encoding (since XYZ is linear light), and then L*a*b* uses a 1/3 power which models
perceptual linearity. Of course to display an L*a*b* value you have to convert it
to XYZ and then to the display's RGB space. [And yes there are many
possible avenues for optimising the performance of such conversions.]
Graeme Gill.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]