Commit 87d17317 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

added synonym CV_COMP_HELLIGNER for CV_COMP_BHATTACHARYAA to reflect the real…

added synonym CV_COMP_HELLIGNER for CV_COMP_BHATTACHARYAA to reflect the real formula used (bug report #2073)
parent 1365e28a
......@@ -175,9 +175,11 @@ Compares two histograms.
* **CV_COMP_BHATTACHARYYA** Bhattacharyya distance
* **CV_COMP_HELLINGER** Synonym for ``CV_COMP_BHATTACHARYYA``
The functions ``compareHist`` compare two dense or two sparse histograms using the specified method:
* Correlation (method=CV\_COMP\_CORREL)
* Correlation (``method=CV_COMP_CORREL``)
.. math::
......@@ -192,19 +194,19 @@ The functions ``compareHist`` compare two dense or two sparse histograms using t
and
:math:`N` is a total number of histogram bins.
* Chi-Square (method=CV\_COMP\_CHISQR)
* Chi-Square (``method=CV_COMP_CHISQR``)
.. math::
d(H_1,H_2) = \sum _I \frac{\left(H_1(I)-H_2(I)\right)^2}{H_1(I)}
* Intersection (method=CV\_COMP\_INTERSECT)
* Intersection (``method=CV_COMP_INTERSECT``)
.. math::
d(H_1,H_2) = \sum _I \min (H_1(I), H_2(I))
* Bhattacharyya distance (method=CV\_COMP\_BHATTACHARYYA)
* Bhattacharyya distance (``method=CV_COMP_BHATTACHARYYA`` or ``method=CV_COMP_HELLINGER``). In fact, OpenCV computes Hellinger distance, which is related to Bhattacharyya coefficient.
.. math::
......
......@@ -460,7 +460,8 @@ enum
CV_COMP_CORREL =0,
CV_COMP_CHISQR =1,
CV_COMP_INTERSECT =2,
CV_COMP_BHATTACHARYYA =3
CV_COMP_BHATTACHARYYA =3,
CV_COMP_HELLINGER =CV_COMP_BHATTACHARYYA
};
/* Mask size for distance transform */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment