added synonym CV_COMP_HELLIGNER for CV_COMP_BHATTACHARYAA to reflect the real formula...
authorVadim Pisarevsky <no@email>
Fri, 22 Jun 2012 15:12:19 +0000 (15:12 +0000)
committerVadim Pisarevsky <no@email>
Fri, 22 Jun 2012 15:12:19 +0000 (15:12 +0000)
modules/imgproc/doc/histograms.rst
modules/imgproc/include/opencv2/imgproc/types_c.h

index db731a8..f576d5d 100644 (file)
@@ -174,10 +174,12 @@ Compares two histograms.
             * **CV_COMP_INTERSECT**     Intersection
 
             * **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::
 
index 7637ee3..d7beed2 100644 (file)
@@ -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 */