Enum HistCompMethodsEnum
- java.lang.Object
-
- java.lang.Enum<HistCompMethodsEnum>
-
- edu.wpi.grip.generated.opencv_imgproc.enumeration.HistCompMethodsEnum
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<HistCompMethodsEnum>
public enum HistCompMethodsEnum extends java.lang.Enum<HistCompMethodsEnum>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HISTCMP_BHATTACHARYYA
Bhattacharyya distance (In fact, OpenCV computes Hellinger distance, which is related to Bhattacharyya coefficient.) \f[d(H_1,H_2) = \sqrt{1 - \frac{1}{\sqrt{\bar{H_1} \bar{H_2} N^2}} \sum_I \sqrt{H_1(I) \cdot H_2(I)}}\f]HISTCMP_CHISQR
Chi-Square \f[d(H_1,H_2) = \sum _I \frac{\left(H_1(I)-H_2(I)\right)^2}{H_1(I)}\f]HISTCMP_CHISQR_ALT
Alternative Chi-Square \f[d(H_1,H_2) = 2 * \sum _I \frac{\left(H_1(I)-H_2(I)\right)^2}{H_1(I)+H_2(I)}\f] This alternative formula is regularly used for texture comparison.HISTCMP_CORREL
Correlation \f[d(H_1,H_2) = \frac{\sum_I (H_1(I) - \bar{H_1}) (H_2(I) - \bar{H_2})}{\sqrt{\sum_I(H_1(I) - \bar{H_1})^2 \sum_I(H_2(I) - \bar{H_2})^2}}\f] where \f[\bar{H_k} = \frac{1}{N} \sum _J H_k(J)\f] and \f$N\f$ is a total number of histogram bins.HISTCMP_HELLINGER
Synonym for HISTCMP_BHATTACHARYYAHISTCMP_INTERSECT
Intersection \f[d(H_1,H_2) = \sum _I \min (H_1(I), H_2(I))\f]HISTCMP_KL_DIV
Kullback-Leibler divergence \f[d(H_1,H_2) = \sum _I H_1(I) \log \left(\frac{H_1(I)}{H_2(I)}\right)\f]
-
Field Summary
Fields Modifier and Type Field Description int
value
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HistCompMethodsEnum
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static HistCompMethodsEnum[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
HISTCMP_CORREL
public static final HistCompMethodsEnum HISTCMP_CORREL
Correlation \f[d(H_1,H_2) = \frac{\sum_I (H_1(I) - \bar{H_1}) (H_2(I) - \bar{H_2})}{\sqrt{\sum_I(H_1(I) - \bar{H_1})^2 \sum_I(H_2(I) - \bar{H_2})^2}}\f] where \f[\bar{H_k} = \frac{1}{N} \sum _J H_k(J)\f] and \f$N\f$ is a total number of histogram bins.
-
HISTCMP_CHISQR
public static final HistCompMethodsEnum HISTCMP_CHISQR
Chi-Square \f[d(H_1,H_2) = \sum _I \frac{\left(H_1(I)-H_2(I)\right)^2}{H_1(I)}\f]
-
HISTCMP_INTERSECT
public static final HistCompMethodsEnum HISTCMP_INTERSECT
Intersection \f[d(H_1,H_2) = \sum _I \min (H_1(I), H_2(I))\f]
-
HISTCMP_BHATTACHARYYA
public static final HistCompMethodsEnum HISTCMP_BHATTACHARYYA
Bhattacharyya distance (In fact, OpenCV computes Hellinger distance, which is related to Bhattacharyya coefficient.) \f[d(H_1,H_2) = \sqrt{1 - \frac{1}{\sqrt{\bar{H_1} \bar{H_2} N^2}} \sum_I \sqrt{H_1(I) \cdot H_2(I)}}\f]
-
HISTCMP_HELLINGER
public static final HistCompMethodsEnum HISTCMP_HELLINGER
Synonym for HISTCMP_BHATTACHARYYA
-
HISTCMP_CHISQR_ALT
public static final HistCompMethodsEnum HISTCMP_CHISQR_ALT
Alternative Chi-Square \f[d(H_1,H_2) = 2 * \sum _I \frac{\left(H_1(I)-H_2(I)\right)^2}{H_1(I)+H_2(I)}\f] This alternative formula is regularly used for texture comparison. See e.g. @cite Puzicha1997
-
HISTCMP_KL_DIV
public static final HistCompMethodsEnum HISTCMP_KL_DIV
Kullback-Leibler divergence \f[d(H_1,H_2) = \sum _I H_1(I) \log \left(\frac{H_1(I)}{H_2(I)}\right)\f]
-
-
Method Detail
-
values
public static HistCompMethodsEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (HistCompMethodsEnum c : HistCompMethodsEnum.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HistCompMethodsEnum valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-