This page explains one of the most powerful but least understood aspects of DNG - its embedded camera details.
These camera details enable some software products to handle DNG files even when they don't handle the native raw files for the camera concerned. It reveals the power of using DNG for a camera's native raw file format. It is one of the reasons why DNG is suitable as an archival raw file format, unlike all other known raw file formats.
The term Camera details is used here in a much wider sense than simply "colour profile". The details also include many other camera characteristics needed by (some) raw converters.
The term Camera profile, used by ACR, provides a subset of the Camera details here. The DNG 184.108.40.206 specification formalises the concept of Camera profile, corresponding to the ACR usage. (This page originally inadvertently used the term Camera profile for what it now calls Camera details).
Raw converters and camera details
In order to do its work, a raw converter (or other raw image processor) needs more than the raw image data. It also needs to know how to interpret the data. What do the numbers mean? What are the dimensions (in pixels) of the sensor? Which of the numbers correspond to pixels with "red" filters, which to "green", which to "blue"? Or are there other colours too? What is the relationship between those colours and a known colour space? What are the other values that need to be taken into account, such as the strength of the anti-alias filter? (Plus answers to several other questions). This set of parameters are referred to here as "camera details", describing the camera in sufficient detail.
Rarely do two current camera models have the same camera details. Typically there are significant differences from one camera model to another, even from the same manufacturer. Therefore, raw converters need to be able to select the correct camera details to process the raw image data contained in a raw file they have been given. Raw converters have camera details for many current and past camera models built into them, and choose the correct one according to the identification of the camera model contained within the raw file itself. (See note 1).
This is why raw converters need to be upgraded for new camera models. It is relatively rare that the raw file format itself is significantly different from those already known. Normally it is "just" the camera details that have changed. Even if a new camera model actually has the same camera details as another, a raw converter doesn't know this unless it is told. (Some may make an "intelligent guess", perhaps based on the similarity of the camera model name).
Embedded camera details in DNG
Every DNG file holds comprehensive camera details. One method of creating a DNG file is to use a DNG Converter, often from Adobe, (including ACR or Lightroom, which can also act as DNG Converters), but several others exist too. The DNG Converter needs to have built-in camera details which it then embeds in the resultant DNG file.
Another method of creating a DNG file is for the camera to use DNG as its native raw file format. The Ricoh GR Digital camera is one example. The camera knows its own details, (built-in by the camera manufacturer), and embeds these in the DNG file together with the raw image data.
Raw converter exploitation of embedded camera details
Ideally, when raw converters read the raw image data from a DNG file, they read the camera details from that file too. (At least as a user option). This is the target, and most powerful, exploitation of DNG. Such converters can support DNG files of camera models of which they have no prior knowledge. (But see note 2).
Some raw converters can read the raw image data from a DNG file, but can't read the camera details from that file. They still have to use built-in camera details. Therefore they can't support DNG files of camera models they don't otherwise have support for. (See note 3).
End notes - qualifications and further details
Why not ICC Profiles?
"There are complex technical reasons why "ICC Profiles" are not the ideal solution for digital camera calibration. One is they limit extended white balance and highlight recovery algorithms, which perform best when applied in the same processing stage as the first color matrix in the processing pipe. If this matrix stage is buried somewhere in a black box ICC profile, then it means that extended highlight recovery algorithm would need to be moved somewhere else in the processing pipe, where it might not perform as well.
"There is also a fundamental problem with ICC profiles in that the ICC profile connection space uses "output referred" colorimetric values, whereas raw converters needs "scene referred" colorimetric values so they can perform the mapping between scene referred values and output referred values under user, rather than profile, control."
Each software company has its own details for the cameras it supports. They overlap, because some details can't be avoided. But other details offer unique advantages for the software products that use them. Camera details are not standard, although specific components of them may be.
The camera details in DNG files are based on the camera details used by Adobe's ACR. (This is one of the reasons that new versions of ACR and the DNG Converter are always released at the same time). It requires extra work for non-Adobe raw converters to exploit DNG's camera details. It can be done, and many non-Adobe products do so, but the extra work has caused some products to make a simpler start with DNG support. This is not a fault in DNG - a common raw format can't contain lots of overlapping types of camera details. Overcoming this should be largely a one-time task by the development team, and not have to be repeated for each camera model.
Reading and exploiting the camera details from DNG files cannot enable a raw converter to handle a sensor configuration that it doesn't otherwise support. This is a natural consequence of the fact that DNG is a raw file format, and its raw image data still needs to be processed with the same algorithms as the raw image data in the camera's native raw files.
Consider a raw converter that can handle only Bayer sensors, but does so in a generic way. If it can read and exploit camera details from DNG files, it should be able to handle DNG files for all camera models that have Bayer sensors. The reason is that the required code is the same for all of these cameras, and only the parameters used by that code change from one camera model to another. These parameters are supplied by the camera details.
But a non-Bayer sensor, for example a Sony 4-colour sensor, or a Fujifilm Super CCD sensor, requires different code, not just different parameters. That different code needn't be specific to any particular camera model, or even to any particular manufacturer. Code that can generically handle 4-colour sensors should be able to handle not just the Sony F828, but also any other 4-colour sensor, as long as it can exploit the camera details from their DNG files. Similarly, code that can generically handle offset sensors should be able to handle all Fujifilm offset sensors, and also any launched in future by another company. (Even that is over-simplifying things - yet more code is needed for the Fujifilm Super SR CCD sensor! But the principle applies of needing just one set of code for offset sensors with 2 samples per pixel, whatever the camera manufacturer).
This is a source of frustration for some people whose cameras have such less-common sensor configurations. They wonder why a "common (or universal) raw file format" like DNG doesn't solve this problem. But no true raw file format can solve this problem! The photographer's use of "raw" postpones the processing of the raw image data to the raw converter, so that is where the necessary code must exist. Once that raw image data is in the memory of the raw converter, it doesn't make a difference to the code whether it came from a DNG file or a native raw file.
DNG offers a solution to this problem too - "Linear DNG". This is a variant of DNG containing image data that is no longer raw. Raw converters need extra code to handle Linear DNG, but it then enables them to perform many of their tasks even in many cases where they don't otherwise support the sensor configuration concerned.
A software product may support DNG comprehensively from the start. Adobe's earlier products (at least from "2.4" onwards) have such support. This was partly because those products supported various different sensor configurations before DNG support was added to them, and also because DNG's camera details are based on ACR's camera details. Products from other companies typically start with less comprehensive DNG support and can then evolve their DNG support over time. Here are possible stages:
- Raw image data support: the raw converter can read the raw image data from a DNG file, but can't read the camera details from that file. It still has to use built-in camera details. Therefore it can't support DNG files of camera models it doesn't otherwise support.
- Camera detail support: in addition to raw image data support, the raw converter can also read the camera details from the DNG file. The converter can process DNG files of camera models of which it has no prior knowledge, as long as it supports the sensor configuration.
- Linear DNG support: in addition to camera details support, the raw converter can process Linear DNG files. The converter can support DNG files of camera models which have (some) sensor configurations that it doesn't otherwise support. (There are even sub-stages of Linear DNG support. For example, a raw converter may support Linear DNG with just 3 samples per pixel, which would exclude Linear DNG for 4-colour sensors. Others support Linear DNG with 4 or more samples per pixel).
- Support for extra sensor configurations: this is really little to do with DNG. A raw converter that supports Bayer sensors may add support for 4-colour sensors and/or offset sensors. If it already supports DNG, it is likely that such support will apply both to the native raw files and also DNG files of such camera models. If it already supports camera details in DNG files, it is likely that such support will apply even to camera models, with that sensor configuration, of which it has no prior knowledge.
It is unfortunately typically difficult to identify which of these stages are supported by any given raw converter. (Adobe products typically support all of these stages. Silkypix provides detailed information! Rawshooter made it clear that it only provided raw image data support, before it was taken over the Adobe. The support provided by some other products can be deduced from experience).