OpenCV读取图片并对比(可窗口显示)

#include "cv.h"#include "cxcore.h"#include "highgui.h"#include #include #include #define CV_COMP_CORREL 0#define CV_COMP_CHISQR 1#define CV_COMP_INTERSECT 2#define CV_COMP_BH
摘要由CSDN通过智能技术生成
#include "cv.h"
#include "cxcore.h"
#include "highgui.h"
#include <stdio.h>
#include <stdlib.h>
#include <iostream>




#define CV_COMP_CORREL 0
#define CV_COMP_CHISQR 1
#define CV_COMP_INTERSECT 2
#define CV_COMP_BHATTACHARYYA 3




int HistogramBins = 256;
float HistogramRange1[2]={0,255};
float *HistogramRange[1]={&HistogramRange1[0]};






int main()
{

//目标图片
IplImage *Image1=cvLoadImage("c:\\face\\s1\\10.jpg",0);// //("C:\\ruita\\2013-8\\openCV_from_2013.8.5\\CVprj01\\CVprj01\\1.jpg",0);//如果没有对象,直接输出为完美匹配
//IplImage *Image1=cvLoadImage("c:\\face\\pgm\\s1\\10.jpg",0);
char path[20]="c:\\face\\s";//
//char path[20]="c:\\face\\pgm\\s";
char who[20][20]={"1\\","2\\","3\\","4\\","5\\","6\\"}; //c:\\face\\s1\\//
char s[11][3]={"1","2","3","4","5","6","7","8","9","10"};      //c:\\face\\s1\\1
char way[20]="c:\\face\\s";
double thre = 20.0;//阈值//下面的程序推荐5000以下,其实也不可能用到5000,官方给的更大1.7*10^308
double res;//对比结果
double sum_res=5000.0,avr_res=5001.0,ores[3]={5000.0,5000.0,5000.0};/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值