Luminous Landscape Forum

Raw & Post Processing, Printing => Digital Image Processing => Topic started by: mshea on March 12, 2016, 10:03:03 pm

Title: Histogram change LR to PS
Post by: mshea on March 12, 2016, 10:03:03 pm
When I export an image from LR CC to PS CC, I see an obvious change in the histogram. Given that the PS color space is set to Pro Photo (like LR), shouldn't the histograms look the same? I'm viewing both on an Eizo monitor.

Thanks for any input!

Merrill
Title: Re: Histogram change LR to PS
Post by: Guillermo Luijk on March 13, 2016, 08:11:08 am
I never used LR but I think it uses a particular colour profile that matches ProPhoto in colour gammut, but has a different gamma curve (the same or very similar to sRGB's). Since ProPhoto uses a 1,8 gamma curve, there needs to be a change in the histogram when exporting from 2,2 to 1,8 gamma; you'll see an histogram compression towards 0. The important point however is colour gammut: if you don't see any RGB levels clipping to 0 or saturation after the conversion, there is nothing to worry about. The same colours you preserved in LR are preserved in PS, they are simply encoded under a different gamma curve.

Influence of gamma curve in the histogram (colour gammut is always sRGB):
(http://www.guillermoluijk.com/article/gamma/gamma2.2.gif)

Regards
Title: Re: Histogram change LR to PS
Post by: howardm on March 13, 2016, 09:19:02 am
At the risk of stealing the OPs thread, does anyone know *why* ProPhoto was defined w/ 1.8 gamma instead of 2.2 ([as]RGB)?  Practical advantage/disadvantage? Or for that matter, why Melissa was done w/ 1.0 gamma?
Title: Re: Histogram change LR to PS
Post by: AlterEgo on March 13, 2016, 10:55:10 am
why Melissa was done w/ 1.0 gamma?
MelissaRGB has sRGB gamma... or rather sRGB TRC.
Title: Re: Histogram change LR to PS
Post by: mshea on March 13, 2016, 11:22:09 am
Thanks, Guillermo. Yes, interesting as to why the need for a gamma change.
Title: Re: Histogram change LR to PS
Post by: howardm on March 13, 2016, 01:07:59 pm
the mystery 'deepens'............

Although it isn’t officially named
as such, I tend to call the Lightroom edit space Lightroom RGB. Mark Hamburg had suggested it might be more appropriate to call it “bastard- ized RGB” since the space is using ProPhoto RGB chromaticities, but with a gamma of 1.0 instead of 1.8. Meanwhile, the Lightroom viewing space uses the same ProPhoto RGB chromaticities but with an sRGB tone response curve. Melissa Gaul, who was the QE manager for Lightroom, suggested this space should be called Melissa RGB since all RGB spaces to date have been named after men!

http://ptgmedia.pearsoncmg.com/imprint_downloads/peachpit/peachpit/lightroom4/pdf_files/LightroomRGB_Space.pdf
Title: Re: Histogram change LR to PS
Post by: Simon Garrett on March 13, 2016, 02:05:34 pm
the mystery 'deepens'............

Although it isn’t officially named
as such, I tend to call the Lightroom edit space Lightroom RGB. Mark Hamburg had suggested it might be more appropriate to call it “bastard- ized RGB” since the space is using ProPhoto RGB chromaticities, but with a gamma of 1.0 instead of 1.8.

Perhaps for computational simplicity?  Provided that the image is properly colour-managed (and 16-bit data is used), I guess it doesn't really matter what TRC is used internally.

Meanwhile, the Lightroom viewing space uses the same ProPhoto RGB chromaticities but with an sRGB tone response curve. Melissa Gaul, who was the QE manager for Lightroom, suggested this space should be called Melissa RGB since all RGB spaces to date have been named after men!

http://ptgmedia.pearsoncmg.com/imprint_downloads/peachpit/peachpit/lightroom4/pdf_files/LightroomRGB_Space.pdf

To my understanding it uses Melissa RGB for the histogram and RGB values in order to give a relatively perceptually uniform histogram.  In other words, mid-grey will appear half way up the scale.   

For display, it uses the monitor colour space, obviously.
Title: Re: Histogram change LR to PS
Post by: AlterEgo on March 13, 2016, 02:44:36 pm
as such, I tend to call the Lightroom edit space Lightroom RGB.

LR was created way after ACR and they share the raw conversion code... so this is not "Lightroom RGB", as it was simply inherited from ACR...
Title: Re: Histogram change LR to PS
Post by: digitaldog on March 14, 2016, 11:07:30 am
At the risk of stealing the OPs thread, does anyone know *why* ProPhoto was defined w/ 1.8 gamma instead of 2.2 ([as]RGB)?  Practical advantage/disadvantage? Or for that matter, why Melissa was done w/ 1.0 gamma?
  sRGB doesn't have a gamma curve (it has a TRC). MelissaRGB has a 2.2 TRC, it's not linear, the unnamed color space used for actual processing in ACR and LR has a 1.0 TRC.
Title: Re: Histogram change LR to PS
Post by: bjanes on March 16, 2016, 08:39:06 am
  sRGB doesn't have a gamma curve (it has a TRC). MelissaRGB has a 2.2 TRC, it's not linear, the unnamed color space used for actual processing in ACR and LR has a 1.0 TRC.

What is the difference between a gamma curve and a TRC (tonal response curve)? A pure gamma function is a power function, where y = x^gamma. Gamma is the exponent. Going from linear light to gamma 2.2, the equation takes the form y = x^(1/2.2). The inverse function is y = x^2.2. sRGB differs from a power function in that it has a linear segment at the low end and a power function with offsets at the higher end. See Wikipedia (https://en.wikipedia.org/wiki/SRGB). With sRGB the exponents are 2.4 and 1/2.4, not 2.2. With the linear segment and the offsets, the average gamma is about 2.2. On the other-hand, a TRC is essentially a black box function and the overall result can be expressed as a curve showing how the output is related to the input.

Since Mellisa uses ProPhoto chromaticities and the sRGB sTRC it is not a gamma function with an exponent of 2.2. To further complicate the situation, Charles Poynton in his classic Gamma FAQ (http://www.poynton.com/PDFs/GammaFAQ.pdf), he describes the Rec 709 transfer function (which, like sRGB, uses a linear segment and an offset) as gamma encoding.

Bill
Title: Re: Histogram change LR to PS
Post by: digitaldog on March 16, 2016, 10:51:34 am
What is the difference between a gamma curve and a TRC (tonal response curve)?
A gamma curve follows that simple formula, a TRC may not (sRGB comes to mind).
Title: Re: Histogram change LR to PS
Post by: AlterEgo on March 16, 2016, 01:23:15 pm
you can either have a set of parameters for a math formula (to calculate = might be just a simple gamma or more parameters for a complex equation) or a table (to interpolate then)... with sRGB* you can either use just a few parameters for a formula (linear initially, non linear afterwards) or a table
Title: Re: Histogram change LR to PS
Post by: bjanes on March 16, 2016, 01:30:01 pm
A gamma curve follows that simple formula, a TRC may not (sRGB comes to mind).

Quite true, but Mellissa does not have an exponent of 2.2.

Bill
Title: Re: Histogram change LR to PS
Post by: AlterEgo on March 16, 2016, 04:20:12 pm
Quite true, but Mellissa does not have an exponent of 2.2.

Bill

but who said it does ?
Title: Re: Histogram change LR to PS
Post by: Jim Kasson on March 16, 2016, 04:35:39 pm
the mystery 'deepens'............

Although it isn’t officially named
as such, I tend to call the Lightroom edit space Lightroom RGB. Mark Hamburg had suggested it might be more appropriate to call it “bastard- ized RGB” since the space is using ProPhoto RGB chromaticities, but with a gamma of 1.0 instead of 1.8.

If you're implying that there's something wrong with using PPRGB primaries but not the PPRGB TRC, or even that there's something unusual about doing internal image calculations in a linear space, I don't agree.

Whenever I write color image processing code that uses the primaries of any RGB color space, I always do the internal calculations in a linear representation, with nominal black equal to zero, nominal white equal to one, and double precision floating point.

There are a lot of advantages to this. The calculations are more straightforward. The code is easier to read. You can allow intermediate calculations to exceed nominal white (which is not defined in many nonlinear color spaces), or to be below nominal black, (which is defined in hardly any nonlinear color spaces (PhotoCD Ycc --> RGB excepted).

If you mean bastardized in some other, entirely complimentary way, then I apologize for wasting your time with this post.

Jim