11 Replies Latest reply on Dec 3, 2008 7:26 AM by (Peter_Hanna)

    DNG specs and dual illuminant

      I am currently testing the DNG profile editor and the camera specific profiles and I really like the results so far. At first impression they seem to significantly improve controllability of images taken at sunset for example. (Specifically blue saturation of the eastern sky, Canon 40D).

      After briefly scanning over the DNG specs i understand that the specs allow for a dual color matrix which accommodates the ACR/LR workflow.

      However, isn't this somewhat restrictive?

      The whole point of the DNG profiler is that it enables one to optimize the converter for the colorresponse of the camera under certain lighting conditions. A single colortemperature may be the result of wildly different lighting conditions which result in a significantly different colorresponse in the camera.

      So, wouldn't it be more appropriate to be able to add an entire list of "named colormatrices" which can correspond to given lighting conditions? Like the usual sunny, shady, daylight, incandescent, fluorescent, etc...

      ACR/LR can simply pick the 2 most appropriate matrices to do its interpolation thingy, but it would be really useful if in addition one could add "named sets" of matrices which allows ACR/LR to do their interpolation thingy with a specific set (possibly over more than 2 profiles).

      That way one can create a specific "daylight response" set which combines a 2800K sunset profile with a 5500K daylight response. (and then possibly an additional 10K n.sky response or something). Or an "artificial lighting" set of say a 2800K bulb light response combined with a 5000K tube light response.

      In ACR/LR the WB popup can be used to select one of these sets...

      Anyways: my point really is the DNG specs themselves. If it is eventually to become an industry wide open standard, the colormatrix implementation should probably not be coupled so intimately with the whitebalancing paradigm of ACR/LR.

      (if this has been previously discussed, my apologies, I haven't scanned the entire list of discussion threads).
        • 1. Re: DNG specs and dual illuminant
          MadManChan2000 Adobe Employee
          Essentially your point boils down to generalizing from 2 white points to some larger number N. This can be done, though with diminishing returns. The real issue with mixed lighting is uneven color casts across the frame, for which no profile can compensate adequately. (A more sophisticated analysis would be needed to handle this case.)

          Another issue is that if you want to get picky about specific lighting situations, then even generalizing to N white points isn't going to help, because a white point doesn't really contain all the information you need (it's just a pair of numbers). What one really needs is the spectrum of the illuminant at the time of capture.

          The current method to deal with this is to build separate profiles for different lighting conditions of similar color temperature. For example, I have a home depot CFL bulb and a standard tungsten-filament bulb that both measure ~2850 K but they have massively different properties (and resulting colors).

          Regarding your point about the specs: the color matrix implementation is a standard mapping from illuminant-relative XYZ values to non-WB linear camera coordinates. Same goes with the forward matrix, except that it's a mapping from WB linear cam coords to D50-relative XYZ. These are fairly standard mappings when doing colorimetric characterization and are not specific to CR/LR.
          • 2. Re: DNG specs and dual illuminant
            Level 1
            rereading the specs doc i see that multiple camera profiles can be stored in a DNG file using the "ExtraCameraProfiles" tag. So apparently that is possible.

            My point then is:

            why do you need 2 colormatrices within a profile entry where you actually are referring to 2 separate colorresponses?

            Why not simply have multiple profile entries and then have ACR/LR select the 2 most appropriate profile entries (if more than one is available)?

            Additionally one could think of a "profile-interpolation-sets" entry that allows one to hint to the processing application which combination of profiles to use for interpolation (and the corresponding name).

            This way i can store a light bulb response and a sunset response, as well as a 5000K tube response and a true daylight response in 4 separate profiles. i would then like to store 2 interpolation sets, one combining the sunset and daylight response with a name like "daylight", and another set combining the bulb and 5000K tube response with a name like "artificial light".

            Then in ACR/LR i would like to be able to select the "daylight" set and it will select the sunset-profile and daylight-profile to do its interpolation thingy. I don't necessarily need more than 2 profiles for interpolation, although i wouldn't know why this shouldn't be possible.

            Processors that do not support interpolation can simply resort to selection of a single response by selecting a single profile.

            WB and colorresponse are intimately coupled and I would strongly suggest that Processors implement the profile selection and temp&tint combo in a single GUI category. Interpolation between profiles is merely a convenience option in ACR/LR and not a requirement for correct rawdata interpretation. I therefore believe that the current dual matrix tags in DNG are superfluous, restrictive, and an incorrect representation of the colorresponse paradigm in general.
            • 3. Re: DNG specs and dual illuminant
              MadManChan2000 Adobe Employee
              > why do you need 2 colormatrices within a profile entry
              > where you actually are referring to 2 separate
              > colorresponses?

              Because each color matrix corresponds to a different lighting condition. A color matrix maps illuminant-relative XYZ coordinates to non-WB linear camera coordinates. Thus, having a pair of color matrices (in our case for Illuminant A and D65) allows one to get an accurate WB mapping of camera neutrals over a wide range of conditions, as well as compensate for variations in the sensor response as the illuminant changes, again over a wide range of conditions.

              > Why not simply have multiple profile entries and then have
              > ACR/LR select the 2 most appropriate profile entries (if
              > more than one is available)?

              > Additionally one could think of a
              > "profile-interpolation-sets" entry that allows one to hint
              > to the processing application which combination of
              > profiles to use for interpolation (and the corresponding
              > name).

              Please define "most appropriate". What is your metric for determining this?

              (The answer is that the problem is undetermined, and cannot be solved with the information available.)

              > This way i can store a light bulb response and a sunset
              > response, as well as a 5000K tube response and a true
              > daylight response in 4 separate profiles. i would then
              > like to store 2 interpolation sets, one combining the
              > sunset and daylight response with a name like "daylight",
              > and another set combining the bulb and 5000K tube response
              > with a name like "artificial light".

              > Then in ACR/LR i would like to be able to select the
              > "daylight" set and it will select the sunset-profile and
              > daylight-profile to do its interpolation thingy. I don't
              > necessarily need more than 2 profiles for interpolation,
              > although i wouldn't know why this shouldn't be possible.

              You can already do this effectively.

              You build one profile, one for the former "set" and one profile for the latter "set". Each profile has two endpoints, defined by the 2 lighting conditions you desire (e.g., tungsten-filament bulb and 5000K fluorescent tube). Use the calibration illuminant tags to specify the appropriate white points. Save the first profile as, e.g., "Nikon D60 Daylight" and the 2nd profile as, e.g., "Nikon D60 Artificial Light".

              Then, of these 2 profiles, choose the appropriate one from the Profile popup menu in CR/LR.

              > Processors that do not support interpolation can simply
              > resort to selection of a single response by selecting a
              > single profile.

              This suggested implementation is neither DNG spec-conforming, nor desirable. One of the reasons for DNG having a specified early-stage processing model (see Chapter 6 of the DNG 1.2 spec) is that tone and color results can be consistent across implementations.

              There is no technical reason not to include the interpolation between the endpoints, given that the dng_sdk already provides reference code to do this.

              > Interpolation between profiles is merely a convenience
              > option in ACR/LR and not a requirement for correct rawdata
              > interpretation.

              Please define "correct."

              If "correct" means accurate scene-referred color, then your statement is false.

              > I therefore believe that the current dual matrix tags in
              > DNG are superfluous, restrictive, and an incorrect
              > representation of the colorresponse paradigm in general.

              Disagree. You have not provided a technical argument (i.e., in terms of the color math) to support this claim.

              Eric
              • 4. Re: DNG specs and dual illuminant
                Level 1
                I understand that I can now create these responses. I very much appreciate Adobe's efforts and making available of the DNG profiler. I'm a happy camper already.

                And I do not claim anything, it is not a mathematical problem, it is simply my believe or opinion that a profile should describe a single colorresponse for a single illuminant.

                This bests corresponds with conventional photography wisdom of selecting a WB according to original shooting conditions as well as conventional colormanagement wisdom of a single colorresponse/illuminant for a single device. Adjustment of WB T can still be allowed within reason.

                To allow for a wider range of WB T adjustments WITHOUT having to select different colorresponses may be implemented by interpolation between colorresponses.

                Interpolating between 2 colorresponses should then consist of selecting 2 or more profiles based on the properties desired.

                One of those properties might be "convenience", i.e. interpolating between an artificial 2850K colorresponse and a D65 daylight response to cover most processing demands.

                Another property might be "accuracy". This could consist of interpolating between an entire set of daylight response profiles so that sunset images aren't processed with an artificial light profile.

                However, defining a profile as describing 2 colorresponses for 2 illuminants and "claiming" that interpolation between those responses is in any way relevant to scene referred colormatching for a single device or DNG file is, with all due respect, simply ridiculous. For "correct" rawdata interpretation i'm pretty sure i only need a single colorresponse and illuminant, namely the colorresponse and illuminant matching the exact conditions at the time of capture. Lacking the exact response and for the sake of convenience we limit the colorresponses to a useful set of typical conditions.

                Selecting one of these "typical condition" responses may result in a colorcast. In order to partly or wholly eliminate this colorcast most processors allow for a WB adjustment using a temperature slider. This is directly taken from the conventional photographer's notion of white balance. Select a "cloudy" response under cloudy shooting conditions, and adjust WB to reduce colorcasts.

                But the ACR/LR (and DNG specs) paradigm has now reversed the logic: we start with a complete temperature scale to define a whitebalance and "under the hood" something needs to select the corresponding colorresponse. It claims to be able to do so with only 2 colorresponse definitions. Namely an artificial light response at 2850K and a true daylight response at 6500K. To accommodate a temperature range from 2000K to 50,000K mind you.

                Apparently (and i quote from the DNG specs) "this combination has been found to work well for a wide range of real-world digital camera images".

                Not exactly a mathematical argument so i will allow myself a non-mathematical rebuttal:

                dual matrix tags are superfluous because 2 profiles containing a single matrix carry the same amount of information, these profiles can be distinguished and selected based on illuminant and directly relate to existing colormanagement conventions. It doesn't seem particularly useful to define new profile types with multiple matrixes that need to be interpolated "by convention" just because Adobe believes that that is the way of the Jedi...

                dual matrix tags are restrictive because one can easily conceive an interpolation scheme using more than 2 profiles. Either define an array to accommodate an arbitrary list of matrices or define an array of singular profiles, but there is no technical reason to limit the interpolation of the entire temperature scale to just 2 matrices and designate these with specific tags in the DNG specs.

                dual matrix tags are an incorrect representation of the colorresponse paradigm because there is no singular relation FROM colortemperature TO colorresponse. Any attempt to create this relation is a convenience or intelligence on the processor's side, it has no place in an open standard.

                Note also that if you really aim for consistency of tone and color results across implementations then Adobe should also disclose their debayer colormixing code, it is not solely dependent on interpolation of colormatrixes...

                (my apologies in advance if this "sounds" somewhat feisty. Just want to make a point for discussion's sake and all for the advance of the DNG specs and profiles. Again: I am certainly a happy camper now, can't wait to see the next incarnations of these tools!)
                • 5. Re: DNG specs and dual illuminant
                  MadManChan2000 Adobe Employee
                  > This bests corresponds with conventional photography
                  > wisdom of selecting a WB according to original shooting
                  > conditions as well as conventional colormanagement wisdom
                  > of a single colorresponse/illuminant for a single device.
                  > Adjustment of WB T can still be allowed within reason.

                  > To allow for a wider range of WB T adjustments WITHOUT
                  > having to select different colorresponses may be
                  > implemented by interpolation between colorresponses.

                  That's exactly what a dual-illuminant profile accomplishes.

                  Note that the DNG spec does not require that profiles be dual-illuminant. A profile may in fact be single-illuminant, and some cameras which support in-camera DNG create such profiles.

                  > Interpolating between 2 colorresponses should then consist
                  > of selecting 2 or more profiles based on the properties
                  > desired.

                  > One of those properties might be "convenience", i.e.
                  > interpolating between an artificial 2850K colorresponse
                  > and a D65 daylight response to cover most processing
                  > demands.

                  > Another property might be "accuracy". This could consist
                  > of interpolating between an entire set of daylight
                  > response profiles so that sunset images aren't processed
                  > with an artificial light profile.

                  Again, this can already be done with the current DNG 1.2 spec. You can define one profile to be used with natural daylight images and another profile to be used with artificial light images. These profiles can be either single-illuminant or dual-illuminant; it is the choice of the profile author (or profile-building software).

                  The choice of which profile to use for a given image falls outside the scope of the DNG spec.

                  Consider the following example. Suppose a camera shoots DNG raw files. If the camera knew that a given image was shot under natural light (e.g., it has a built-in spectroradiometer that measures the spectrum of the incoming light and determines that it's a flavor of daylight) then it could then generate a "daylight" DNG profile that is then embedded in the DNG, to be used for that specific image.

                  This is all possible with the DNG 1.2 spec, as it's currently written. However, the generation of the an appropriate profile is a higher-level functionality that falls outside the scope of the spec itself. In other words, the spec dictates the format of a profile and its behavior, but it does not dictate how that profile gets generated in the first place (i.e., based on which measurements, etc.).

                  > However, defining a profile as describing 2 colorresponses
                  > for 2 illuminants and "claiming" that interpolation
                  > between those responses is in any way relevant to scene
                  > referred colormatching for a single device or DNG file is,
                  > with all due respect, simply ridiculous.

                  Why?

                  > For "correct" rawdata interpretation i'm pretty sure i
                  > only need a single colorresponse and illuminant, namely
                  > the colorresponse and illuminant matching the exact
                  > conditions at the time of capture.

                  For a single image, yes.

                  Questions: (1) Do you actually have the color response information for your camera's sensor, and if so, where did you obtain it from? (2) Do you actually have the spectrum of the illuminant at the time of capture, as well as the reflectance spectrum of the materials being photographed?

                  If you have both, then you can generate an optimal profile for that capture. That was the point I made above: the on-the-fly profile generation is something that can be done if you have this info, and it's completely compatible with the existing DNG 1.2 spec. There is nothing in CR, LR, or the DNG spec that prevents this.

                  The real issue is that in most cases, the practical answer to both of my above questions is no. (Even if you have #1, #2 is almost certainly no.)

                  > dual matrix tags are superfluous because 2 profiles
                  > containing a single matrix carry the same amount of
                  > information

                  Again, as noted above, the DNG spec allows for single-illuminant profiles, so if you wish to go that route, you are free to do so.

                  > dual matrix tags are an incorrect representation of the
                  > colorresponse paradigm because there is no singular
                  > relation FROM colortemperature TO colorresponse.

                  The calibration illuminant tag indicates the actual light source, not just the color temperature. For a given illuminant there is actually a single mapping between illuminant and color response.

                  > Note also that if you really aim for consistency of tone
                  > and color results across implementations then Adobe should
                  > also disclose their debayer colormixing code, it is not
                  > solely dependent on interpolation of colormatrixes...

                  No, the two issues are completely independent except for pixel-level effects which are largely irrelevant to the overall color and tone appearance.

                  Eric
                  • 6. Re: DNG specs and dual illuminant
                    Level 1
                    >For a given illuminant there is actually a single mapping between illuminant and color response.

                    Exactly, I completely agree. And given that illuminant is a discrete value, a profile should contain a single illuminant & response, and be done with it.

                    Let's take a closer look at the LR interface. It contains a WB popup with presets for WB settings. Some of these presets have names that are remarkably similar to illuminants. I don't dare name them as such because I am pretty sure that all that happens under the hood is a different setting for the temperature & tint sliders.

                    These settings are then translated to an interpolated response. We then have 3 illuminants at stake that may have no relation to each other whatsoever.

                    We interpolate between an artificial light response and a true daylight response, which is questionable to begin with, but we do so to process for example a fluorescent illuminent request???

                    I rest my case...
                    • 7. Re: DNG specs and dual illuminant
                      Panoholic Level 2
                      > given that illuminant is a discrete value, a profile should contain a single illuminant & response, and be done with it

                      What if you change your mind and decide for another WB?
                      • 8. Re: DNG specs and dual illuminant
                        Ben Richardson-xhqdJd
                        Would anyone be able to reveal exactly which Illuminant A and D65 light sources (the specific physical source) Adobe use while building their profiles?

                        While I'm sure they're not off-the-shelf items, it would save a lot of double guessing for anyone serious about investigating the possibilities of the PE.

                        Thanks, Ben
                        • 9. Re: DNG specs and dual illuminant
                          Level 1
                          I've seen somebody on the Camera Raw team use a SpectraLight Jr. I don't think that X-rite still sells that model. There's a SpectraLight III that offers six different lighting temps...
                          • 10. Re: DNG specs and dual illuminant
                            MadManChan2000 Adobe Employee
                            Ben, regarding the possibilites of the DNG Profile Editor ... the Chart Wizard feature of PE uses the actual CIE standard reference illuminant values for A and D65, not a physical device.
                            • 11. Re: DNG specs and dual illuminant
                              Oscar Rysdyk..

                              Sorry, to butt in here. I am going nuts trying to get a key for Convert to BW Pro...Is there any way possible to obtain this? I've been googling your name looking for an e-mail.

                              Again sorry to barge in on this thread..