1、特征值对比
判断标准:特征值相似度小于一个给定值的特征值个数
2、直方图对比Android代码(参考文献:http://blog.acronym.co.kr/580 )
List<Mat> listImage1 = new ArrayList<>();
List<Mat> listImage2 = new ArrayList<>();
Mat hsv_img1 = new Mat();
Mat hsv_img2 = new Mat();
cvtColor(img1,hsv_img1,COLOR_BGR2HSV);
cvtColor(img2,hsv_img2,COLOR_BGR2HSV);
listImage1.add(hsv_img1);
listImage2.add(hsv_img2);
Mat hist_img1 = new Mat();
Mat hist_img2 = new Mat();
MatOfFloat ranges = new MatOfFloat(0,255);
MatOfInt histSize = new MatOfInt(50);
MatOfInt channels = new MatOfInt(0);
calcHist(listImage1,channels,new Mat(),hist_img1,histSize,ranges);
calcHist(listImage2,channels,new Mat(),hist_img2,histSize,ranges);
Core.normalize(hist_img1,hist_img1,0,1,Core.NORM_MINMAX,-1,new Mat());
Core.normalize(hist_img2,hist_img2,0,1,Core.NORM_MINMAX,-1,new Mat());
Double result = compareHist(hist_img1,hist_img2, Imgproc.CV_COMP_CORREL);