17 Replies Latest reply: Dec 5, 2012 5:17 PM by Bill_Janes RSS

    ACR not applying linear segment w/ProPhoto

    Bill_Janes Community Member

      I was using Imatest to check the DR of my Nikon D800e with the Stouffer stepwedge. I was using ACR 7.2 with the Adobe standard profile and PV 2010 with a linear tone curve (sliders set to zero, point curve = linear). When rendering into ProPhotoRGB, I noticed that there was no linear segment at low luminances and the expected linear segment was present with sRGB.

       

      The Imatest plot is shown along with the calculated response using the densities of the step wedge and the ProPhoto equations. The linear segment starts at target densities of -2.5. This causes ProPhoto to have a slightly greater total dynamic range than sRGB. This is no big deal, but my investigation was to investigate an assertion that ProPhotoRGB has a greater dynamic range than sRGB. It is true that saturation clipping occurs earlier with the narrower space, but luminance clipping should and DR should be about the same.

       

      http://bjanes.smugmug.com/Photography/Imatest/D800e-DR/i-trcSCXv/0/M/DensityResponses-M.png

       

      http://bjanes.smugmug.com/Photography/Imatest/D800e-DR/i-5ZnzQSt/0/XL/DR_CompositeB_Flat-XL.png

        • 1. Re: ACR not applying linear segment w/ProPhoto
          MadManChan2000 Adobe Employee

          ACR/LR does use a linear segment for the initial part (dark shadows) part of the encoding curve for ProPhoto.  The source code is shown in the DNG SDK, file dng_color_space.cpp, if you're interested.  Briefly, the transition point between the linear and non-linear part is (assuming a [0,1] coordinate space):

           

          x = 8.2118790552e-4

          y = 0.019310851

          • 2. Re: ACR not applying linear segment w/ProPhoto
            Vit Novak Community Member

            Emm .... I must admit that I don't entirely understand the code (studied it before, when playing with those profiles, but I'm a delphi programmer), but to me, it looks like the curve actually has two linear segments, both of length zero, one at point (0,0) and another at (8.2118e-4,0.019). However, I see that a kind of spline is used at the bottom (dng_function_GammaEncode_1_8) , unlike for instance sRGB curve which is coded by the book, that's why I think it's like that. And also, there was a difference between my code and ACR output in shadows ...

            • 3. Re: ACR not applying linear segment w/ProPhoto
              Bill_Janes Community Member

              MadManChan2000 wrote:

               

              ACR/LR does use a linear segment for the initial part (dark shadows) part of the encoding curve for ProPhoto.  The source code is shown in the DNG SDK, file dng_color_space.cpp, if you're interested.  Briefly, the transition point between the linear and non-linear part is (assuming a [0,1] coordinate space):

               

              x = 8.2118790552e-4

              y = 0.019310851

              Eric,

               

              Thanks for the reply, but I do not know how to interpret the code. However, if I compare the calculated encoding of the stepchart values with those I get with Imatest, the linear segment appears to be moved much to the left. With sRGB, the inflection point is as expected.

               

              ProPhotoGraph.png

              sRGB_Graph.png

              • 4. Re: ACR not applying linear segment w/ProPhoto
                sandy_mc Community Member

                Interesting.

                 

                I'd never looked at this before, but the ProPhoto inflection point (at least if you take ROMM = ProPhoto) is specified at 0.001953. The above code seems to inflect a lot earlier.....I'm missing something here.....

                 

                 

                • 5. Re: ACR not applying linear segment w/ProPhoto
                  Vit Novak Community Member

                  If I understand correctly, function used for this in DNG SDK is dng_function_GammaEncode_1_8. Part of the curve below y = 0.019 is cubical spline, which starts with slope 32 and ends with slope 13.06. Above that, it is power function with exponent 1/1.8. So, there is no linear part at the bottom. Note that x and y axis on my diagram have different scale

                   

                  Anyway, I don't see the connection of the (non-standard) shape of this curve with dynamic range. It's just a function used to convert linear values to nonlinear, and hopefully, something close to inverse of this function will be used at the end of display chain to transform nonlinear values back to (linear) intensity of colors, displayed on the output device

                   

                  Edit: added standard photo pro curve (green) - I hope I used the correct formula in my old code libraries ...

                   

                  Gamma18b.gif

                  • 6. Re: ACR not applying linear segment w/ProPhoto
                    sandy_mc Community Member

                    Taking a closer look at the code, I don't think that the ProPhoto implementation in the DNG SDK has a linear segment at the bottom at all - it's actually a spline curve that's designed to smoothly go from a linear slope of 32 at 0 to the same slope as a gamma 1.8 curve at the inflection point. But I haven't actually printed out a curve. However, that's consistent with what Bill is seeing.

                     

                    Sandy

                    • 7. Re: ACR not applying linear segment w/ProPhoto
                      sandy_mc Community Member

                      Looks like Vit and I came to the same conclusion simultaneously.....but Vit's got a curve(!)

                       

                      Sandy

                      • 8. Re: ACR not applying linear segment w/ProPhoto
                        Bill_Janes Community Member

                        Vit Novak wrote:

                         

                        If I understand correctly, function used for this in DNG SDK is dng_function_GammaEncode_1_8. Part of the curve below y = 0.019 is cubical spline, which starts with slope 32 and ends with slope 13.06. Above that, it is power function with exponent 1/1.8. So, there is no linear part at the bottom. Note that x and y axis on my diagram have different scale

                         

                        Anyway, I don't see the connection with the (non-standard) shape of this function and dynamic range. It's just a function used to convert linear values to nonlinear, and hopefully, something close to inverse of this function will be used at the end of display chain to transform nonlinear values back to (linear) intensity of colors, displayed on the output device

                         

                        The purpose of my investigation was to see if sRGB and ProPhotoRGB renderings wtih ACR had the same dynamic range. ProPhoto does have a wider color gamut, but I thought that the DRs should be the same. The observed differences may be due to integer rounding at very low luminances.

                        • 9. Re: ACR not applying linear segment w/ProPhoto
                          Vit Novak Community Member

                          I understand that. Yes, some sites are providing some DR measurements for cameras (or software for it), but my personal opinion is that value of those measurements is about the same as length of linear part of the photo pro gamma encoding curve in ACR implementation    for instance, on DxO site, measured DR of some compact cameras is almost the same as DR of DSLR-s, which is a nonsense

                           

                          Useful measurement should be performed on the raw image directly from the sensor and not on the rendered image. For some sensors, manufacturers are providing this information in a form of signal to noise ratio, but unfortunately, not for DSLR-s ...

                          • 11. Re: ACR not applying linear segment w/ProPhoto
                            deejjjaaaa Community Member

                            > Useful measurement should be performed on the raw image directly from the sensor and not on the rendered image. For some sensors, manufacturers are providing this information in a form of signal to noise ratio, but unfortunately, not for DSLR-s ...

                             

                            well, the data that those sensor manufacturers provide for their sensors do not actually exactly reflect the data in the raw files written by firwmare of 3rd party camera manufactureres that are using those sensors, more so that those sensors are probably CCDs with much more circuitry added by actual camera manufacturer like ADC off sensor... and DxO is testing the data in raw files (another story that they are shooting targets that you never encounter in a real life and they use "engineering" definitions of DR)... so what is the beef if a modern small sensor has low readout noise and some big sensor does not ? move towards midtones and picture will better for a big guy... there is no replacement for displacement in the end (unless you use totally obsolete technology).

                            • 12. Re: ACR not applying linear segment w/ProPhoto
                              Bill_Janes Community Member

                              deejjjaaaa wrote:

                               

                              well, the data that those sensor manufacturers provide for their sensors do not actually exactly reflect the data in the raw files written by firwmare of 3rd party camera manufactureres that are using those sensors, more so that those sensors are probably CCDs with much more circuitry added by actual camera manufacturer like ADC off sensor... and DxO is testing the data in raw files (another story that they are shooting targets that you never encounter in a real life and they use "engineering" definitions of DR)... so what is the beef if a modern small sensor has low readout noise and some big sensor does not ? move towards midtones and picture will better for a big guy... there is no replacement for displacement in the end (unless you use totally obsolete technology).

                               

                              The engineering definition of DR is an industry standard and is reported on by Kodak and Dalsa (and their successors) in their data sheets. Photographic DR varies according to how much noise one can accept in the shadows, and each observer may have their own opinions. DXO does provide a full SNR plot from which one can calculate the DRs for any given noise floor. Shown are examples for the Nikon D4 and D800e.

                               

                              DR_NoiseFloors.png

                              The larger CCDs in MFDBs do collect more light and have better SNR in the midtones where their high read noise is relatively low in proportion to shot noise. The question is how much SNR is enough? If you can not see the noise at a given image size, does it matter?

                              • 13. Re: ACR not applying linear segment w/ProPhoto
                                deejjjaaaa Community Member

                                > The engineering definition of DR is an industry standard and is reported on by Kodak and Dalsa (and their successors) in their data sheets.

                                 

                                true - but you do not deal with sensors directlty and not even with sensors testing equipment that sensor manufacturers have... unlike Kodak/TrueSense and Dalsa you only deal with the data written by camera's firmware and after the signal was through camera (not Kodak/TrueSenses' or Dalsa's) manufacturer's circuitry...

                                • 14. Re: ACR not applying linear segment w/ProPhoto
                                  deejjjaaaa Community Member

                                  but we digress... so what about the curves ? does what Eric say (above) contracit to what you see (in the code) ?

                                  • 15. Re: ACR not applying linear segment w/ProPhoto
                                    Vit Novak Community Member

                                    Yes, I know that in most cases data from sensor are a bit polished before writing to raw file. Also, I know that DR is usually measured with a reference to certain level of noise.

                                     

                                    For me, DR is just a ratio between the brightest signal that can be recorded with the sensor (just before saturation level) and the darkest that can be visible in the noise. How much is enough ? Well, something in the range of a negative film would be nice ...

                                    • 16. Re: ACR not applying linear segment w/ProPhoto
                                      ssprengel CommunityMVP

                                      Sensors aren’t going to have reciprocity failure like film so won’t be able to avoid oversaturation in the non-linear way film does.

                                      • 17. Re: ACR not applying linear segment w/ProPhoto
                                        Bill_Janes Community Member

                                        deejjjaaaa wrote:

                                         

                                        but we digress... so what about the curves ? does what Eric say (above) contracit to what you see (in the code) ?

                                        Eric has not commented any further. I didn't look at the C++ code, but the rendering into ProPhotoRGB that I observed does not seem to be according to the ProPhoto tone curve. I don't know if this has anything to do with the slightly greater DR than I saw with sRGB.