Wrong definition of Chi ² distance?

asked 2015-07-17 11:04:20 -0500

mcExchange gravatar image

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

edit retag flag offensive close merge delete



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

berak gravatar imageberak ( 2015-07-17 11:12:08 -0500 )edit

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

mcExchange gravatar imagemcExchange ( 2015-07-17 12:00:27 -0500 )edit