Since can only be found up to a single unknown scalar constant,
is fixed at
zero3,
where
is the number of greyvalues (typically
).
Equation 4 gives a set of equalities of the form:
, where
,
and
is the number of pixels in one of the images
.
The first
rows of
are constructed by inserting
in
the column index corresponding to the pixel value of
and inserting
into the column index corresponding to the pixel value of
:
A(x+wy,f_1(x,y))&=&1
A(x+wy,f_2(x,y))&=&-1
where is the width of one of the images,
and the last row of
is all zeros except its last entry which is 1:
A(L+1,N)=1
All unspecified entries of matrix
are zero.
Vector
is constructed by placing the value
in the first
entries and
in the last entry.
This is an overdetermined system of equations.
The solution that minimizes the
error
in (9)
is the maximum likelihood solution according to the noise model of
(5),
assuming
[7], and is given by:
ddF = 2A^TAF + 2A^TK = 0
giving
F=(A^TA)^-1A^T (-K),
assuming additive white Gaussian noise.
This solution gives us a way of estimating the camera response function from
two or more differently exposed pictures of overlapping subject matter.
Although this system is massively overdetermined, the constraints
follow a comparametric form that admits solutions having
sinusoidal components (e.g. solutions tend to be ``wavy'') [7].
(Indeed, comparametric forms are very similar to difference equations
as can be seen from the form of (4) which
constrains the function over an interval step size of allowing ripples
in the solution.)