There is a paper “Auto White Balance Based on the Similarity of Chromaticity Histograms” mention about automatic white balance. One of the key point of this algorithm is how to measure the similarity between three histograms (r, g, b channels). They choose Bhattacharrya distance to measure it.
Equation of Bhattacharrya distance for two histograms (1)
$$d(H_1, H_2) = \sqrt{1 – p(H_1, H_2)}$$
$$p(H_1, H_2) = H_1(0) * H_2(0) + H_1(1) * H_2(1) + … + H_1(255) * H_2(255)$$
However, no matter how hard I try, I can't find a way to apply Bhattacharrya distance on three histograms.
Could I just alter the second equation to
$$p(H1, H2, H3) = H_1(0) * H_2(0) * H_3(0) + H_1(1) * H_2(1) * H_3(1) + … + H_1(255) * H_2(255) * H_3(255)$$
Best Answer
Find similarity between RGB values separately, like I did.