Nikon D300 Complete Manual page 158

Hide thumbs Also See for D300:
Table of Contents

Advertisement

Since I know you're curious and want instant gratification, a
simple demosaic routine for the D300 might work something
like this (warning, geek speak ahead):
Decompress (if necessary) and unpack the sensor data.
Convert all data for the green positions into luminance
values (
).
Y
Obtain luminance values (
averaging/interpolating the data values for adjacent green
positions.
Calculate the color channels for the red and blue
positions:
C
Obtain
and
C
r
have them by averaging/interpolating the adjacent values.
Obtain RGB data from the
, and
C
G = 0.2R + 0.7G + 0.1B
b
Many other demosaic routines exist; the one just given is one
of the simplest (especially if you use "averaging" instead of
"interpolating" for the missing data
product that understands the NEF file format tends to perform
the interpretation of the photosite data slightly differently (and
at different speeds!).
If you open an NEF file with Bibble, Photoshop CS3, Capture
One, and Nikon Capture NX side by side, you will see subtle
differences in rendering of color and detail. If you're getting
the idea that it might be worthwhile to sample all the NEF
converters, you're right. Fortunately, most have trial versions
56
Geeks will have already guessed that this is essentially CIE Lab Color space, the
grandfather of all color processing definitions. You can write demosaicing routines
for just about any color space you'd care to define, but most that I know of stick to
Lab Color, RGB, and CYM(k).
57
Okay, we're in footnote hell. An interpolation routine generally tries to do more
than just average two adjacent data points. Complex interpolations examine a matrix
of adjacent cells, usually a minimum of a 3 x 3 grid, but sometimes as wide as a 16 x
16 grid. Obviously, the smaller the grid, the faster the results are generated. But also,
the smaller the grid, the cruder the results will be. Most raw converters tend to use a
5 x 5 pattern for their demosaicing.
Thom Hogan's Complete Guide to the Nikon D300
while
= R – Y
C
r
values for the positions that don't yet
C
b
) for red and blue positions by
Y
.
= B – Y
b
56
data:
Y C
C
r
b
.
57
). Thus, each software
V1.02
,
R = Y + C
B = Y +
r
Page 158

Advertisement

Table of Contents
loading

Table of Contents