 
 
 
 
 
   
 for which
 for which
 and
 and  .
.
The quantity  provides a weighting for the number of
pixels in image
 provides a weighting for the number of
pixels in image  that are equal to
 that are equal to  and
at the same coordinates
 and
at the same coordinates  equal to
 equal to  in image
 in image  .
.
It will be easier to understand the form of
(15) by grouping (counting)
all of the pixel values for which  and, in the corresponding location
and, in the corresponding location  .
The result, denoted by the letter
.
The result, denoted by the letter  ,
is called the comparagram[7]
of the two images, and has dimensions
,
is called the comparagram[7]
of the two images, and has dimensions  by
 by  .
It should be noted that
.
It should be noted that  captures all of the information
about the tonal relationship between the two pictures while discarding
all of the spatial information in the images.
This tonal relationship is all that is
needed to solve (9) while discarding a great
deal of irrelevant information.
To solve (15), the
matrix
 captures all of the information
about the tonal relationship between the two pictures while discarding
all of the spatial information in the images.
This tonal relationship is all that is
needed to solve (9) while discarding a great
deal of irrelevant information.
To solve (15), the
matrix 
 and the vector
and the vector  are
constructed to have one row for each element of
 are
constructed to have one row for each element of  , as follows:
  A(mN+n,m)  &=&J(m,n)
, as follows:
  A(mN+n,m)  &=&J(m,n)
  A(mN+n,n)  &=&-J(m,n)
  K(mN+n)    &=&J(m,n)
  
with the additional constraints appended to  as before,
resulting in the same method of solution as before (least-squares).
 as before,
resulting in the same method of solution as before (least-squares).
Looking at comparagrams of typical sets of differently exposed images, the comparagrams tend to be very sparse. Thus working with comparagrams provides us with a very tidy way of greatly increasing the computational efficiency, as well as performing robust statistics (pruning low entries).
Thus the computation can be made still more efficient by removing rows of
 and
 and  that are zero, which is done by only including nonempty
bins of
 that are zero, which is done by only including nonempty
bins of  that are off the main diagonal (zero entries result from
either empty bins of
 that are off the main diagonal (zero entries result from
either empty bins of  or from diagonal entries of
 or from diagonal entries of  ).
Jointly, the comparagram across two images
seldom contains more than ten percent nonzero
entries, so the resulting computational savings is very significant.
).
Jointly, the comparagram across two images
seldom contains more than ten percent nonzero
entries, so the resulting computational savings is very significant.
Robust statistics provide improved immunity to noise but this immunity
is usually obtained at some computational expense.
However, the formulation of (15) with solution
(17) may be made both computationally
more efficient as well as more robust by
thresholding  .  This is done by setting any
entries in
.  This is done by setting any
entries in  that are less than a certain number equal to zero.
A threshold of 10, for example, means that any bins containing less than
10 counts are set to zero prior to solving (17).
Interestingly enough, this method of throwing away outliers
results in further increases in computational efficiency.
 that are less than a certain number equal to zero.
A threshold of 10, for example, means that any bins containing less than
10 counts are set to zero prior to solving (17).
Interestingly enough, this method of throwing away outliers
results in further increases in computational efficiency.
 
 
 
 
