# Wrong definition of Chi ² distance?

Could it be that the formula for computing the chi² distance between histograms as pointed out here is wrong?

If one divides the squared difference of (h1 and h2) by h1 the distance is not symmetrical anymore which is not logical.

Here is a paper that defines the chi square distance between histograms as:

1/2 * sum over i of (h1_i - h2_i)^2 / (h1_i + h2_i)

which is symmetric and makes more sense as a distance measure

the battle, which is the correct version, is probably as old as opencv itself, in the end the came up with HISTCMP_CHISQR_ALT

:D Oh I didn't realize. Ok. Thanks for your answer