Monday 11 November 2019

When RAW files are converted to DNG, are any irreversible demosaicing happening or not?


I know this almost touches some other questions already asked here, but it's actually aligned a bit different. This is not about DNG vs RAW, rather just about the demosaicing step in the conversion. It seems like this answer implies that some irreversible demosaicing of the bayer patter takes place, but other sources around the Internet states that it does not. I'm not referring to the linear DNG, but the one that Lightroom converts RAW files to.


I've also tried to dig into the specification from Adobe, but so far I've not been able to find a definite answer.



Answer



Partly. Some of the steps normally taken during demosaicing, such as setting black point, are performed when files are converted to DNG and can't be reversed later on. Other steps, such as interpolating the monochromatic luminance values of each pixel into RGB values based on the color mask characteristics of a particular sensor, are not.



Converting an image file from the manufacturer's raw format to .dng will strip all of the information in the maker notes section of the EXIF data. Most all Adobe products ignore the maker notes, many other EXIF tools and RAW converters don't. If you only use Adobe products to convert and edit your images you will not see a difference in this respect.


There are additional things that the conversion strips as well. For example, data from masked pixels used to determine black point are not carried over into the .dng file. Instead black point is computed and 'baked in' during the conversion process. This assumes the RAW format of the original file in question includes the data from masked pixels. Some proprietary RAW formats from some camera makers include that information and others don't. As with all raw convertors that do not use the manufacturers own proprietary algorithms on data that may be encrypted (again, dependent upon manufacturer), there is no guarantee that the conversion of the data remaining in the DNG file by the third party software will be the same as conversions that use the manufacturer's algorithms.


Since each sensor design is different, the output from the sensor must be interpreted based in the design of that sensor. As new cameras are released with new sensor designs, updates to the DNG convertor must be made to properly convert the output from the new sensor. Not all Bayer masks, for example, use the same exact colors for each of the R,G, and B filters. Some, such as newer designs from Fuji, even alter the pattern of which pixels are filtered by R, which by G, and which by B. Without the specific information of the sensor's unique design, the convertor will misinterpret the data from the sensor.


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...