1 2 3
4 5 6
7 8 9
10 11 12

feedback algorithm

          To make the algorithm more universal an amplification factor K for the subtracted average was introduced in step (2). Otherwise, without additional amplification, it is impossible to achieve good colour constancy.

XiR = SR ·riR
(1) log XiR = log SR + log riR
(2) ziR = log XiRK · yR
(3) yR = 1/N ·S ziRCR = log SR + 1/N ·S log riRK · yRCR
Again, the constant CR have to be adjusted to compensate the second term in (3):

CR = 1/N ·S log riR

Then yR = log SRK · yR and a steady-state value for the average, yR, amounts only a fraction of an illuminant: yR=1/(K+1)*log SR
By substituting yR in (2) for the latter expression and in view of (1), we get:

ziR=1/(K+1)*log SR+log (ro)iR

If K goes to infinity the first term in the latter expression tends to zero and we get: ziR = log riR
(4)

ZiR = exp( ziR ) = riR