Doug Kerr
Well-known member
[This has been edited to revise what I say about one of the reference documents.]
I am a bit confused by the matter of the "offset" involved in the sensel value data in contemporary Canon raw files (.CR2).
While doing some study in this area, I have encountered two significant reference works:
• The "help" (Use Guide) for the raw file analysis program Rawnalyze.
(I can provide this to anyone who is interested.)
• A paper entitled "Understanding What is stored in a Canon RAW .CR2 file, How and Why" by "clevy":
http://lclevy.free.fr/cr2
I have been led to believe that sensel values in the Canon raw files involve a defined offset, perhaps 256, or 1024, or 2048, depending on the bit depth of the file, the camera model, and perhaps even the ISO value in effect.
This is seemingly for the familiar purpose in integer representation schemes: to accommodate negative values. While of course a negative sensel value is meaningless from a photometric standpoint, they can certainly occur as a result of noise; thus we need to be certain that our number scale is not clipped prematurely.
The Rawnalyze documentation seems to suggest this:
In the raw file there is a "table" with an entry for each sensel position stating the "black level" for that sensel. This is the numerical value (DN) that should be taken as meaning a zero photometric exposure ("black") with regard to that individual sensel.
Rawnalyze, for example, reports the minimum, maximum, and average values of these black levels over the entire file being examined (presumably, over all sensels).
Rawnalyze also uses the lowest of these black level values as:
• The beginning of the DN scale of its basic histogram display.
• The initial ("default") value of its Black Point setting.
In a sample 40D raw file I have been looking at, these black level statistics are:
Minimum: 951; maximum: 1097; average: 1022
In a test file (all senels "well blown"), the statistics are:
Minimum: 973; maximum: 1100; average: 1021
The Rawnalyze documentation indicates that, in the interpretation of the raw sensel data, first, from each value is subtracted the recorded black level for that particular sensel, giving a value on a new scale in which zero represents black. These "black corrected" values are used in the further interpretation of the raw data. There is some discussion of the fact that "negative" values are clipped by this process.
Is it possible that the "offset" model is just an attempt to simplistically describe the real situation? Or to force into the Canon situation a concept learned in another camera family? Or have I missed something important here?
I'd appreciate any thoughts on this from my colleagues here.
Best regards,
Doug
I am a bit confused by the matter of the "offset" involved in the sensel value data in contemporary Canon raw files (.CR2).
While doing some study in this area, I have encountered two significant reference works:
• The "help" (Use Guide) for the raw file analysis program Rawnalyze.
(I can provide this to anyone who is interested.)
• A paper entitled "Understanding What is stored in a Canon RAW .CR2 file, How and Why" by "clevy":
http://lclevy.free.fr/cr2
I have been led to believe that sensel values in the Canon raw files involve a defined offset, perhaps 256, or 1024, or 2048, depending on the bit depth of the file, the camera model, and perhaps even the ISO value in effect.
This is seemingly for the familiar purpose in integer representation schemes: to accommodate negative values. While of course a negative sensel value is meaningless from a photometric standpoint, they can certainly occur as a result of noise; thus we need to be certain that our number scale is not clipped prematurely.
The Rawnalyze documentation seems to suggest this:
In the raw file there is a "table" with an entry for each sensel position stating the "black level" for that sensel. This is the numerical value (DN) that should be taken as meaning a zero photometric exposure ("black") with regard to that individual sensel.
Rawnalyze, for example, reports the minimum, maximum, and average values of these black levels over the entire file being examined (presumably, over all sensels).
Rawnalyze also uses the lowest of these black level values as:
• The beginning of the DN scale of its basic histogram display.
• The initial ("default") value of its Black Point setting.
In a sample 40D raw file I have been looking at, these black level statistics are:
Minimum: 951; maximum: 1097; average: 1022
In a test file (all senels "well blown"), the statistics are:
Minimum: 973; maximum: 1100; average: 1021
The Rawnalyze documentation indicates that, in the interpretation of the raw sensel data, first, from each value is subtracted the recorded black level for that particular sensel, giving a value on a new scale in which zero represents black. These "black corrected" values are used in the further interpretation of the raw data. There is some discussion of the fact that "negative" values are clipped by this process.
My initial thoughts on the information in the levy paper were off the mark, and I am studying it further to see where it fits into this picture.
Is it possible that the "offset" model is just an attempt to simplistically describe the real situation? Or to force into the Canon situation a concept learned in another camera family? Or have I missed something important here?
I'd appreciate any thoughts on this from my colleagues here.
Best regards,
Doug
Last edited: