I’ve been trying to improve my understanding of how raw photo processing works, but I think I’m getting hung up on black point subtraction. RawDigger tells me that the black point for my A7IV is 512. I’m assuming that this is 512 out of 16383 (.03125), and not after scaling to fill the full 16bit range (.0078125), correct?
So, if 512 is 9 bits of data, how is the camera encoding 14stops of linear dynamic range in only the upper 5 bits of data? Is the data encoding only linear after black point subtraction is performed?
Linear means that for a given increase in signal, the encoded output always changes by the same amount. It does not mean that zero output corresponds to zero signal.
Ignoring the low order bits would mean counting 0, 512, 1024, 1536, 2048, 2560 etc.
Assume that the signal captured is 1 digital count (DN) above black level, within a possible range of [0 ... 16383].
If your black level is 512, this gives an output of 513, or binary 00 0001 0000 0001
At 5 counts above black level, the output is 517, or binary 00 0001 0000 0101.
So we do use the low order bits, but instead of 16383 levels above zero, we only have (16383-512) = 15871 possible values, a dynamic range of 13.95 log2 DNs. This is close enough to 14 bits for most purposes.
The reason we do this is that read noise can take us below the black level, and we need to capture these negative values for accurate handling of shadow noise, for instance when stacking multiple images. If we used conventional signed integers, we would need an extra bit to denote sign, which be largely wasted. A black level of 512 is easily subtracted in post processing and means we only waste 0.05 bits of potential information.
And if the camera black point is 9 log2 DNS (512/16383) why does the photon transfer curve show that noise maxes out around 6 log2 DNs (64/16383)?
According to Bill Claff's
PhotonsToPhotos site, Sony A7iv (inverse) gain is 4.707e- / DN, so saturation is 77115 e-. Assuming Poisson statistics, noise standard deviation is the square root of this, so 278 e- at max output.
At 4.707 e- / DN this gives 59 DN, which is 5.9 log2 DN.
I believe the curve above shows signal in electrons, not DN. From
Bill's article:
The standard Photon Transfer Curve is a log10-log10 curve of noise in electrons versus signal in electrons.
Because we are interested in photography rather than engineering, we will use log2 rather than log10 throughout this article.
It is the noise in the Poisson-distributed noise in the signal (and other contributions) which the photon transfer curve measures.
Sorry in advance, I know these are elementary questions. Just trying to locate the misunderstanding them might stem from.
Hope this helps.
--
Alan Robinson