直方图作为一种常用的方法,经常用在数据分析和图片处理过程,
采用直方图对比图片相似性,简单明了直观。
根据官网函数说明:
# compareHist(H1, H2, method) -> retval# @param H1 First compared histogram.# @param H2 Second compared histogram of the same size as H1.# @param method Comparison method, see cv::HistCompMethods
HistCompMethods:
HISTCMP_BHATTACHARYYA
Correlation ( HISTCMP_CORREL)相关性,
Chi-Square ( HISTCMP_CHISQR) 卡方,
Intersection ( HISTCMP_INTERSECT )交集法,
Bhattacharyya distance ( HISTCMP_BHATTACHARYYA)常态分布比对的Bhattacharyya距离法。