double compare(const Mat &image) { input = hist.colorReduce(image,div); inputH = hist.getHistogram(input); // return compareHist(refH,inputH,CV_COMP_BHATTACHARYYA); //return compareHist(refH,inputH,CV_COMP_CHISQR); //return compareHist(refH,inputH,CV_COMP_INTERSECT); return compareHist(refH,inputH,CV_COMP_CORREL); }
void setRefrenceImage(const Mat &image) { reference = hist.colorReduce(image,div); refH = hist.getHistogram(reference); }