Graphics Reference
In-Depth Information
repeated for each color channel). Consequently, g is entirely determined by its
value on an array of integer pixel values. Replacing g
(
Z
)
with the array value
g
[
Z
]
and applying Equation (6.3) to each pixel sample Z ij ,
g
[
Z ij ]=
ln E i +
ln
Δ
t j
(6.4)
produces a system of equations that runs over the i and j indices. Here the E i
and the g
values are the unknowns. If enough pixel samples are chosen, the
Z ij can be expected to cover most of the pixel values. However, some of the Z ij
will be repeated, and this results in more than one equation for g
[
Z
]
. The system
of equations is therefore overdetermined. A solution that minimizes the error in
a weighted least squares sense is used: the values of g
[
Z ij ]
[
Z
]
and E i are chosen to
minimize
N
i = 1
P
j = 1 ( ω ( Z ij )( g [ Z ij ] ln E i ln t j ))
2
Z max
1
2
+ λ
z = Z min + 1 ( ω (
z
)
g
[
z
1
]
2 g
[
z
]+
g
[
z
+
1
])
.
(6.5)
The second term in the objective function in Equation (6.5) is a smoothness con-
straint in the form of a discrete approximation to the second derivative of g .The
λ
coefficient is a constant value that specifies the relative importance of this smooth-
ness constraint, and can be varied depending on the amount of noise in the data.
The weighting function
is included to limit the effects of pixel values outside
the linear range. A continuous weighting function is employed that weights pixel
values at the middle of the range most heavily:
ω (
z
)
z
1
2
(
+
) ,
Z min
for z
Z min
Z max
ω (
z
)=
1
2 (
Z max ) .
The minimization results in the array of response function values g
Z max
z
for z
>
Z min +
and recov-
ered exposure values E i . Figure 6.2 contains plots of the sample values before and
after they have been fit to the response curve. In this figure, there are five images
and three pixel values ( P
[
Z
]
3), corresponding pixels have the same marker.
In Figure 6.2(a), each pixel is assumed to have unit irradiance E i so the values of
different pixels are spread out. Figure 6.2(b) shows the true recovered values.
Figure 6.3 shows a recovered response curve and how it matches the samples it
was constructed to fit.
=
5, N
=
Search WWH ::




Custom Search