Open Photography Forums  
HOME FORUMS NEWS FAQ SEARCH

Go Back   Open Photography Forums > Color Management Discussion > CM Theory and Practice

CM Theory and Practice Profiles, color spaces, perception, science.

Reply
 
Thread Tools Display Modes
  #1  
Old October 4th, 2010, 05:30 PM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,197
Default The "linear DNG" format

The "linear DNG" format (in one situation) is essentially a transformation of a raw file (from a CFA camera) in which the raw data has been demosaiced but remains in the native camera color space (rather than, for example, now being in sRGB or L*a*b*).

This fact is often obscured by the common description of this format. It is often said that the image in this format "is in RGB form" but in a way that allows us to have the same opportunity to apply color balance, correct for inopportune exposure, and so forth that we have when working with raw data.

But the letters RGB there are misleading.

It follows from the fact that the outputs of the typical Bayer CFA camera sensor are, by custom, usually designated R, G, and B. But they are almost nothing like the R, G, and B coordinates of the RGB color model, or of any specific RGB color space.

For one thing they are linear, rather than "gamma-precompensated" (as are the RGB coordinates of any usual RGB-class color space). For another, although they are indeed the coordinates of the camera's native color space (a notion denied by some), they do not relate to any visible "red-ish", "green-ish", and "blue-ish" primaries (which might justify the labels "R", "G", and "B").

Actually, the camera native color space has "imaginary"primaries, which not only do not correspond to any visible radiation, they do not correspond to any radiation at all - they are fictional constructs, having no physical significance, which however can be mathematically manipulated just like "visible" primaries. (If that seems startling, recall that the very same is true of the primaries of the CIE XYZ color space - they also have no physical significance!)

So to avoid the cultivation of any misunderstandings, I refer to the outputs of the three classes of sensels in a Bayer CFA camera as α, β, and γ (alpha, beta, and gamma). They are the coordinates of the color space of the raw data.
Yes, it's hard for some people to accept that the outputs of the three kinds of CFA sensels are in fact the coordinates of a color space.
In a "linear DNG" file, the image is represented by actual pixels, not sensel outputs at pixel locations (as in a raw file), but they are described in the α-β-γ color space (the camera native color space).

Now, what is the significance of this form being called "linear DNG"? Beats me.

Of course, the color space there has linear coordinates, but so does the color space in which regular raw data is recorded (including in a regular DNG file).

For a moment, it might seem that "demosaiced DNG" would have been a better name.

But in some cases (such as a "linear DNG" file from a non-CFA camera, such as one with a "Foveon" sensor), the data was never "mosaiced" to begin with (there were initially three sensor outputs, in the camera's native color space, for each pixel).

So perhaps "pixel DNG" would be an even better name.

Of course, "DNG" (based on "digital negative") is itself misleading. It is based on the metaphor that the raw data is pretty comparable to a film negative.

But in fact, considering what we can do with it, the raw file is most comparable to the exposed, but undeveloped, film. (That's why processing raw data into an image file is often said to be "developing" it, do you think?)

So I'm not attracted to carrying the "DNG" designation into new areas, expanding the area of misunderstanding.

In any case, what we have in a "linear DNG" file is "pixel data in the camera's native color space". I won't pretend to suggest a catchy short name for that.

Best regards,

Doug
Reply With Quote
  #2  
Old October 4th, 2010, 05:53 PM
Andrew Rodney Andrew Rodney is offline
Member
 
Join Date: May 2006
Posts: 467
Default

Quote:
Originally Posted by Doug Kerr View Post
Actually, the camera native color space has "imaginary"primaries, which not only do not correspond to any visible radiation, they do not correspond to any radiation at all - they are fictional constructs, having no physical significance, which however can be mathematically manipulated just like "visible" primaries. (If that seems startling, recall that the very same is true of the primaries of the CIE XYZ color space - they also have no physical significance!)
ProPhoto (at least one of its primaries) falls into that camp too right?


Now, what is the significance of this form being called "linear DNG"? Beats me.

Of course, the color space there has linear coordinates, but so does the color space in which regular raw data is recorded (including in a regular DNG file).

For a moment, it might seem that "demosaiced DNG" would have been a better name.

But in some cases (such as a "linear DNG" file from a non-CFA camera, such as one with a "Foveon" sensor), the data was never "mosaiced" to begin with (there were initially three sensor outputs, in the camera's native color space, for each pixel).

Quote:
But in fact, considering what we can do with it, the raw file is most comparable to the exposed, but undeveloped, film. (That's why processing raw data into an image file is often said to be "developing" it, do you think?)
Absolutely!

Quote:
So I'm not attracted to carrying the "DNG" designation into new areas, expanding the area of misunderstanding.
Seems DNG is being used here more for ‘branding’ than as an accurate descriptor.
__________________
Andrew Rodney
Author "Color Management for Photographers"
http://www.digitaldog.net/
Reply With Quote
  #3  
Old October 4th, 2010, 07:08 PM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,197
Default

Hi, Andrew,

Quote:
Originally Posted by Andrew Rodney View Post
ProPhoto (at least one of its primaries) falls into that camp too right?
Well, I had not known that but now I just looked and yes, two of them ("G" and "B") are "imaginary; "R" is an actual visible radiation but just barely (I think on the spectral locus at about 700 nm).

Quote:
Quote:
Now, what is the significance of this form being called "linear DNG"? Beats me.

Of course, the color space there has linear coordinates, but so does the color space in which regular raw data is recorded (including in a regular DNG file).

For a moment, it might seem that "demosaiced DNG" would have been a better name.

But in some cases (such as a "linear DNG" file from a non-CFA camera, such as one with a "Foveon" sensor), the data was never "mosaiced" to begin with (there were initially three sensor outputs, in the camera's native color space, for each pixel).
Absolutely!

Seems DNG is being used here more for ‘branding’ than as an accurate descriptor.
Indeed!

Interestingly enough, this form is not mentioned at all in the DNG specification! (On the other hand, it doesn't tell anything about how ordinary raw data is packed in a DNG file either. Evidently it is to be done just as prescribed in the TIFF/EF spec - the spiritual Godfather of the DNG file - and one is supposed to know that.)

Best regards,

Doug
Reply With Quote
  #4  
Old October 5th, 2010, 04:36 AM
Bart_van_der_Wolf Bart_van_der_Wolf is offline
pro member
 
Join Date: Jun 2006
Location: Netherlands
Posts: 4,046
Default

Quote:
Originally Posted by Doug Kerr View Post
Now, what is the significance of this form being called "linear DNG"? Beats me.
Hi Doug,

Just guessing, but perhaps they want to make it clear that no precision has been lost yet due to rounded Gamma encoding, and subsequent calculations can be performed faster.

Manipulation of image data in linear gamma space can avoid lots of issues with image arithmetic. Not having to do gamma and inverse gamma calculation can save time. Also, when linearizing gamma precompensated data, some precision is lost. Linear differences map to same integers in gamma space, so original subtle distinctions can get lost. How much of a problem that really is, given 12-14 bit ADCs and demosaicing, remains to be seen.

Cheers,
Bart
Reply With Quote
  #5  
Old October 5th, 2010, 06:41 AM
Michael Tapes Michael Tapes is offline
OPF Administrator/Moderator
 
Join Date: Apr 2006
Posts: 243
Default

I have not followed the entire thread, but my thoughts on the "linear" designation.

When discussing RAW processing and one refers to the linear version of the data, the fact that this is a de-bayered 3 channel file (before gamma compensation) rather than a 1 channel raw is inferred. For example a Canon S-raw is not a "true" raw file in the way that we know raw. In fact it is a Linear RAW, meaning that it has been de-bayered (by the camera!) and then down-sampled to the smaller linear version of the data.

I hope that this added and not subtracted from the conversation. If the latter...never mind :>)

Michael
__________________
Michael Tapes
Owner: Michael Tapes Design
Creator: WhiBal - Instant JPEG from Raw - LensAlign
Reply With Quote
  #6  
Old October 5th, 2010, 06:59 AM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,197
Default

Hi, Michael,

Quote:
Originally Posted by Michael Tapes View Post
I have not followed the entire thread, but my thoughts on the "linear" designation.

When discussing RAW processing and one refers to the linear version of the data, the fact that this is a de-bayered 3 channel file (before gamma compensation) rather than a 1 channel raw is inferred.
That may well have been the rationale, but it seems spurious: the values in "regular" raw are not gamma precompensated either!

So, compared to "regular" DNG, "linear DNG" is not more linear, maybe "less raw"!

Quote:
For example a Canon S-raw is not a "true" raw file in the way that we know raw. In fact it is a Linear RAW, meaning that it has been de-bayered (by the camera!) and then down-sampled to the smaller linear version of the data.
An interesting comparison.

Thanks for your inputs.

Best regards,

Doug
Reply With Quote
  #7  
Old October 6th, 2010, 06:58 AM
Michael Tapes Michael Tapes is offline
OPF Administrator/Moderator
 
Join Date: Apr 2006
Posts: 243
Default

Quote:
For example a Canon S-raw is not a "true" raw file in the way that we know raw. In fact it is a Linear RAW, meaning that it has been de-bayered (by the camera!) and then down-sampled to the smaller linear version of the data.
For those of you who may have missed the implications of shooting sRAW, it means that regardless of what IP software that you use, you will get the Canon de-bayer, and not the Adobe or Capture One or whatever. Not saying that is bad, just that you should know it.
__________________
Michael Tapes
Owner: Michael Tapes Design
Creator: WhiBal - Instant JPEG from Raw - LensAlign
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Jenoptik terminates business with mid format cameras Michael Fontana Medium Format & Large Format Cameras 12 February 27th, 2015 02:25 AM
Affordable Medium Format Digital Cameras? doug anderson Medium Format & Large Format Cameras 11 April 24th, 2014 02:29 PM
Interlaced and progressive "scan" video Doug Kerr Imaging Technology: Theory, Alternatives, Practice and Advances. 2 August 7th, 2010 10:04 AM
Colour Management and a new file format.... Worth a read !! Barry Johnston CM Theory and Practice 6 January 29th, 2008 11:03 PM
Digital medium format vs. 5D? Peter Mendelson Canon Eos Mount DSLRs 22 June 3rd, 2007 02:59 AM


All times are GMT -7. The time now is 10:41 AM.


Posting images or text grants license to OPF, yet © of such remain with its creator. Still, all assembled discussion © 2006-2017 Asher Kelman (all rights reserved) Posts with new theme or unusual image might be moved/copied to a new thread!