为什么在vc6.0上能运行的程序到vs2010上出现这么多错误,求助!!!
#include "stdio.h"//#include "cv.h"
//#include "highgui.h"
#include "FeatureDetect.h"
#include <math.h>
#include <iostream>
#include <fstream>
using namespace std;
#include <vector>
#include <algorithm>
#include <functional>
#define NUM 15
int distan[NUM] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
//int fw[NUM] = {11,12,13,14,15,16,17,18,19,20,21,22,23,24,25};
//int L[6] = {8,16,20,32,50,64};
int main(int argc, char** argv)
{
//声明所需参数
IplImage* pSrc;
IplImage* pGray;
double dMean1 = 0.0;//均值
double dVar1 = 0.0;//方差
double dEnergy1 = 0.0;//能量
double dEntropy1 = 0.0;//熵
double dContrast1 = 0.0;//惯性矩 对比度
double dHom1 = 0.0;//局部平稳性 均匀性
double dCorrelation1 = 0.0;//相关性
double dDis1 = 0.0;//相异性
double dMean2 = 0.0;//均值
double dVar2 = 0.0;//方差
double dEnergy2 = 0.0;//能量
double dEntropy2 = 0.0;//熵
double dContrast2 = 0.0;//惯性矩 对比度
double dHom2 = 0.0;//局部平稳性 均匀性
double dCorrelation2 = 0.0;//相关性
double dDis2 = 0.0;//相异性
double dMean3 = 0.0;//均值
double dVar3 = 0.0;//方差
double dEnergy3 = 0.0;//能量
double dEntropy3 = 0.0;//熵
double dContrast3 = 0.0;//惯性矩 对比度
double dHom3 = 0.0;//局部平稳性 均匀性
double dCorrelation3 = 0.0;//相关性
double dDis3 = 0.0;//相异性
double dMean4 = 0.0;//均值
double dVar4 = 0.0;//方差
double dEnergy4 = 0.0;//能量
double dEntropy4 = 0.0;//熵
double dContrast4 = 0.0;//惯性矩 对比度
double dHom4 = 0.0;//局部平稳性 均匀性
double dCorrelation4 = 0.0;//相关性
double dDis4 = 0.0;//相异性
double dMean = 0.0;//均值
double dVar = 0.0;//方差
double dEnergy = 0.0;//能量
double dEntropy = 0.0;//熵
double dContrast = 0.0;//惯性矩 对比度
double dHom = 0.0;//局部平稳性 均匀性
double dCorrelation = 0.0;//相关性
double dDis = 0.0;//相异性
//临时缓冲变量
unsigned char** arLocalImage;
//宽 高 行长
int lineByte;
//遍历图象的横、纵坐标
int i,j;
int p,q;
// #define OIL_PICTURE //样本类别 是否为石油图像
//声明一个特征类
FeatureDetect features;
//文件操作 先打开文件 失败退出程序
//向磁盘输出数据文件
cout << "现在打开文件! ";
ofstream out("E:\\biye\\MYPROJECT\\data\\d10.txt",ios::app);//若文件不存在创建之,存在则在原文后面写内容
/* if(! out)
{
cerr<<"open error!"<<endl;
return -1;
}*/
cout <<"数据文件打开成功!"<<endl;
char buffer[800]={0};//格式化后的数据缓冲区
char filename[15]={0};
// #define OIL_PICTURE //样本类别 是否为石油图像
//载入图片
if( (pSrc = cvLoadImage(argv[1],1)) == 0 )
{
fprintf(stderr, "Can not load Image. ");
cout <<"can't load image!"<<endl;
return -2;
}
//转换为灰度图像 并滤波
pGray = cvCreateImage(cvSize(pSrc->width,pSrc->height),IPL_DEPTH_8U,1);
cvCvtColor(pSrc,pGray,CV_BGR2GRAY);
cvSmooth(pGray,pGray,CV_GAUSSIAN);
//每行像素所占字节数,
lineByte=pGray->widthStep;
//设置感兴趣区域
// CvRect rect = cvRect(x,y,width,height);
//1.bmp
// CvRect rect = cvRect(100,50,400,150);
// CvRect rect1 = cvRect(70,340,480,130);
//4.bmp
// CvRect rect = cvRect(26,61,196,124);
// CvRect rect1 = cvRect(150,300,280,150);
//6.bmp
CvRect rect = cvRect(80,270,240,187);
CvRect rect1 = cvRect(240,20,280,128);
cvRectangle(pSrc,cvPoint(rect.x,rect.y),cvPoint(rect.x+rect.width,rect.y+rect.height),cvScalar(0,0,255));
cvRectangle(pSrc,cvPoint(rect1.x,rect1.y),cvPoint(rect1.x+rect1.width,rect1.y+rect1.height),cvScalar(255,255,255));
// cvSetImageROI(pGray,rect);
//创建窗口
cvNamedWindow("SrcImage",CV_WINDOW_AUTOSIZE);
cvNamedWindow("GrayImage",CV_WINDOW_AUTOSIZE);
//显示各图像
cvShowImage("SrcImage",pSrc);
cvShowImage("GrayImage",pGray);
cvWaitKey(0);
for (int k=0;k<NUM;k++)
{
features.SetDistance(distan[k]);
// features.SetFW(fw[k]);
// features.SetGLN(L[k]);
//features.SetGLN(128);
//将图像分成FilterWindowWidth*FilterWindowWidth个纹理块 为单独一个纹理块分配内存空间
arLocalImage=(unsigned char **)calloc((unsigned)features.FilterWindowWidth,sizeof(unsigned char*));
for(i=0;i<features.FilterWindowWidth;i++)
{
arLocalImage[i]=(unsigned char *)calloc((unsigned)features.FilterWindowWidth,sizeof(unsigned char));
}
//保存一些参数值
sprintf(buffer,"d=%d, FW=%d, L=%d, ",features.distance,features.FilterWindowWidth,features.GrayLayerNum);
cout<<endl<<buffer<<endl;
// out<<buffer<<endl;
//油的
vector<double> feature[7];//用于存放提取的特征值
double feature_cen[7] = {0.0};//特征中心
double feature_var[7] = {0.0};//特征方差
double feature_r[7] = {0.0};//特征间距
//水的相应变量申明
vector<double> feature_s[7];//用于存放提取的特征值
double feature_cen_s[7] = {0.0};//特征中心
double feature_var_s[7] = {0.0};//特征方差
double feature_r_s[7] = {0.0};//特征间距
double f[7] = {0.0};//f值
/////////////////////////////////////////////////////////////
////////////////////求ROI的纹理特征
//统计时间
LARGE_INTEGER m_liPerfFreq={0};
//获取每秒多少CPU Performance Tick
QueryPerformanceFrequency(&m_liPerfFreq);
LARGE_INTEGER m_liPerfStart={0};
QueryPerformanceCounter(&m_liPerfStart);
//将ROI分为大小为FilterWindowWidth*FilterWindowWidth的纹理块 共rolltimeH*rolltimeW个
//ROI能否整分为几块 没影响 可以多余一部分在右边和上边 可整分可不整分
int rolltimeH = rect.height/features.FilterWindowWidth;//高分为几块
int rolltimeW = rect.width/features.FilterWindowWidth;//宽分为几块
cout <<"共"<<rolltimeW<<"*"<<rolltimeH<<"="<<rolltimeW*rolltimeH<<"个油纹理块"<<endl;
//将ROI分成若干个纹理块 计算每一个纹理块的纹理特征值
for(i=0;i<rolltimeH;i++)
{
for(j=0;j<rolltimeW;j++)
{
//首先将目标图像数据赋值给第(i,j)个纹理块
for(p=0;p<features.FilterWindowWidth;p++)
{
for(q=0;q<features.FilterWindowWidth;q++)
{
//表明源图像能否整分为几块 没影响 可以多余一部分在右边和上边
arLocalImage[p][q] = *(pGray->imageData+(rect.y+i*features.FilterWindowWidth+p)*lineByte+(rect.x+j*features.FilterWindowWidth+q));
}
}
//计算这一个纹理块的灰度共生矩阵 第二个参数为纹理块的宽度 一般纹理块选择长宽都一样
(arLocalImage,features.FilterWindowWidth);
//计算四个方向上的纹理特征
(dMean1,dVar1,dEnergy1, dEntropy1, dContrast1, dCorrelation1, dHom1,dDis1, features.PMatrixH, features.GrayLayerNum);
(dMean2,dVar2,dEnergy2, dEntropy2, dContrast2, dCorrelation2, dHom2,dDis2, features.PMatrixV, features.GrayLayerNum);
(dMean3,dVar3,dEnergy3, dEntropy3, dContrast3, dCorrelation3, dHom3,dDis3, features.PMatrixLD, features.GrayLayerNum);
(dMean4,dVar4,dEnergy4, dEntropy4, dContrast4, dCorrelation4, dHom4,dDis4, features.PMatrixRD, features.GrayLayerNum);
dMean = (dMean1+dMean2+dMean3+dMean4)/4;
dVar = (dVar1+dVar2+dVar3+dVar4)/4;
dEnergy = (dEnergy1+dEnergy2+dEnergy3+dEnergy4)/4;
dEntropy = (dEntropy1+dEntropy2+dEntropy3+dEntropy4)/4;
dContrast = dContrast2;//取90°方向
dHom = (dHom1+dHom2+dHom3+dHom4)/4;
dDis = dDis2;//取90°方向
//将单个纹理块的特征数据写入vector变量中
feature[0].push_back(dMean*1e7);
feature[1].push_back(dVar);
feature[2].push_back(dEnergy*1e4);
feature[3].push_back(dEntropy*1e4);
feature[4].push_back(dContrast*1e4);
feature[5].push_back(dHom*1e4);
feature[6].push_back(dDis*1e4);
//写入单个的纹理特征值
// #ifdef OIL_PICTURE
// out << "1 ";
// #else
// out << "-1 ";
// #endif
/* out << "1 ";
sprintf(buffer,"1:%.6f 2:%d 3:%.6f 4:%.6f 5:%.6f 6:%.6f 7:%.6f",dMean,(int)(dVar+0.5),dEnergy,dEntropy,dContrast,dHom,dDis);
out <<buffer<<endl;
*/
}
}
//求所有基窗口的每种特征的均值和特征间距
//结束时间
LARGE_INTEGER liPerfNow={0};
// 计算CPU运行到现在的时间
QueryPerformanceCounter(&liPerfNow);
int time=( ((liPerfNow.QuadPart - m_liPerfStart.QuadPart) * 1000)/m_liPerfFreq.QuadPart);
char buffer0[100];
sprintf(buffer0,"執行時間 %d millisecond ",time);
cout<<buffer0<<endl;
for (i=0;i<7;i++)
{
sort(feature[i].begin(),feature[i].end());//先排序 默认为升序
int N=0,dN=0;//N为向量中元素个数 dN为要删除的元素个数
vector<double>::iterator it = feature[i].begin();
//掐头去尾 两头各去掉1/10
N = feature[i].size();
dN = int(N/10+0.5);
for (j=0;j<dN;j++)
{
feature[i].erase(it);//删除头dN个元素
feature[i].pop_back();//删除尾dN个元素
}
// //写进文件中
// ofstream out1("C:\\Users\\min\\Desktop\\newpic\\fff.txt", ios::app);
// char buff[200] = {0};
// out1 << i<<":";
// for (j=0;j<feature[i].size();j++)
// {
// sprintf(buff,"%.6f",feature[i].at(j));
// out1 <<buff<<" ";
// }
// out1<<endl<<endl;
// out1.close();
double total=0.0;//考虑超出范围的问题
N=feature[i].size();
//求特征均值(中心) (是放大之后的)
for (j=0;j<N;j++)
{
total += feature[i].at(j);//求和
}
feature_cen[i] = total/N;//求均值 即特征中心
//求特征间距 (是放大之后的)
total = 0.0;//清零
for(j=0;j<N;j++)
{
total += abs(feature[i].at(j)-feature_cen[i]);
}
feature_r[i] =total/N;//求特征间距
//求特征方差 (聚散程度 是放大之后的 应除以放大倍数的平方进行还原)
for (j=0;j<N;j++)
{
total += (feature[i].at(j)-feature_cen[i])*(feature[i].at(j)-feature_cen[i]);
}
feature_var[i] = total/N;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
//水的
////////////////////求pGray的纹理特征
//将目标图像分为大小为FilterWindowWidth*FilterWindowWidth的纹理块 共rolltimeH*rolltimeW个
//目标图像能否整分为几块 没影响 可以多余一部分在右边和上边 可整分可不整分
int rolltimeH1 = rect1.height/features.FilterWindowWidth;//高分为几块
int rolltimeW1 = rect1.width/features.FilterWindowWidth;//宽分为几块
cout <<"共"<<rolltimeW1<<"*"<<rolltimeH1<<"="<<rolltimeW1*rolltimeH1<<"个水纹理块"<<endl;
//将图像分成若干个窗口,计算其纹理均值 计算每一个纹理块的纹理特征值
for(i=0;i<rolltimeH1;i++)
{
for(j=0;j<rolltimeW1;j++)
{
//首先将目标图像数据赋值给第(i,j)个纹理块
for(p=0;p<features.FilterWindowWidth;p++)
{
for(q=0;q<features.FilterWindowWidth;q++)
{
//表明源图像能否整分为几块 没影响 可以多余一部分在右边和上边
arLocalImage[p][q] = *(pGray->imageData+(rect1.y+i*features.FilterWindowWidth+p)*lineByte+(rect1.x+j*features.FilterWindowWidth+q));
}
}
//计算这一个纹理块的灰度共生矩阵 第二个参数为纹理块的宽度 一般纹理块选择长宽都一样
(arLocalImage,features.FilterWindowWidth);
//计算四个方向上的纹理特征
(dMean1,dVar1,dEnergy1, dEntropy1, dContrast1, dCorrelation1, dHom1,dDis1, features.PMatrixH, features.GrayLayerNum);
(dMean2,dVar2,dEnergy2, dEntropy2, dContrast2, dCorrelation2, dHom2,dDis2, features.PMatrixV, features.GrayLayerNum);
(dMean3,dVar3,dEnergy3, dEntropy3, dContrast3, dCorrelation3, dHom3,dDis3, features.PMatrixLD, features.GrayLayerNum);
(dMean4,dVar4,dEnergy4, dEntropy4, dContrast4, dCorrelation4, dHom4,dDis4, features.PMatrixRD, features.GrayLayerNum);
dMean = (dMean1+dMean2+dMean3+dMean4)/4;
dVar = (dVar1+dVar2+dVar3+dVar4)/4;
dEnergy = (dEnergy1+dEnergy2+dEnergy3+dEnergy4)/4;
dEntropy = (dEntropy1+dEntropy2+dEntropy3+dEntropy4)/4;
dContrast = dContrast2;//取90°方向
dHom = (dHom1+dHom2+dHom3+dHom4)/4;
dDis = dDis2;//取90°方向
//将单个纹理块的特征数据写入vector变量中
feature_s[0].push_back(dMean*1e7);
feature_s[1].push_back(dVar);
feature_s[2].push_back(dEnergy*1e4);
feature_s[3].push_back(dEntropy*1e4);
feature_s[4].push_back(dContrast*1e4);
feature_s[5].push_back(dHom*1e4);
feature_s[6].push_back(dDis*1e4);
//写入单个的纹理特征值
// #ifdef OIL_PICTURE
// out << "1 ";
// #else
// out << "-1 ";
// #endif
/* out << "-1 ";
sprintf(buffer,"1:%.6f 2:%d 3:%.6f 4:%.6f 5:%.6f 6:%.6f 7:%.6f",dMean,(int)(dVar+0.5),dEnergy,dEntropy,dContrast,dHom,dDis);
out <<buffer<<endl;
*/
}
}
//求所有基窗口的每种特征的均值和特征间距
for (i=0;i<7;i++)
{
sort(feature_s[i].begin(),feature_s[i].end());//先排序 默认为升序
int N=0,dN=0;//N为向量中元素个数 dN为要删除的元素个数
vector<double>::iterator it = feature_s[i].begin();
//掐头去尾 两头各去掉1/10
N = feature_s[i].size();
dN = int(N/10+0.5);
for (j=0;j<dN;j++)
{
feature_s[i].erase(it);//删除头dN个元素
feature_s[i].pop_back();//删除尾dN个元素
}
// //写进文件中
// ofstream out1("E:\\biye\\MYPROJECT\\data\\data0.txt", ios::app);
// char buff[200] = {0};
// out1 << i<<":";
// for (j=0;j<feature_s[i].size();j++)
// {
// sprintf(buff,"%.6f",feature_s[i].at(j));
// out1 <<buff<<" ";
// }
// out1<<endl<<endl;
// out1.close();
double total=0.0;//考虑超出范围的问题
N=feature_s[i].size();
//求特征均值(中心) (是放大之后的)
for (j=0;j<N;j++)
{
total += feature_s[i].at(j);//求和
}
feature_cen_s[i] = total/N;//求均值 即特征中心
//求特征间距 (是放大之后的)
total = 0.0;//清零
for(j=0;j<N;j++)
{
double temp = feature_s[i].at(j);
total += abs(feature_s[i].at(j)-feature_cen_s[i]);
}
feature_r_s[i] =total/N;//求特征间距
//求特征方差 (聚散程度 是放大之后的 应除以放大倍数的平方进行还原)
for (j=0;j<N;j++)
{
total += (feature_s[i].at(j)-feature_cen_s[i])*(feature_s[i].at(j)-feature_cen_s[i]);
}
feature_var_s[i] = total/N;
}
//计算f
for (i=0;i<7;i++)
{
if ( feature_r[i]+feature_r_s[i] == 0 )
{
f[i] = 0.0;
}
else
{
f[i] = abs(feature_cen[i]-feature_cen_s[i])/(feature_r[i]+feature_r_s[i]);
}
}
//写入基窗口数目
cout <<"Ny="<<feature[0].size()<<" ";//总的基元数
cout <<"Ns="<<feature_s[0].size()<<endl;
//缩小还原油的特征均值 间距 方差
feature_cen[0] /=1e7;
for (j=2;j<7;j++)
{
feature_cen[j] /=1e4;
}
feature_r[0] /=1e7;
for (j=2;j<7;j++)
{
feature_r[j] /=1e4;
}
feature_var[0] /=1e7;
feature_var[0] /=1e7;
for (j=2;j<7;j++)
{
feature_var[j] /=1e4;
feature_var[j] /=1e4;
}
//缩小还原水的特征均值 间距 方差
feature_cen_s[0] /= 1e7;
for (j=2;j<7;j++)
{
feature_cen_s[j] /= 1e4;
}
feature_r_s[0] /= 1e7;
for (j=2;j<7;j++)
{
feature_r_s[j] /= 1e4;
}
feature_var_s[0] /= 1e7;
feature_var_s[0] /= 1e7;
for (j=2;j<7;j++)
{
feature_var_s[j] /= 1e4;
feature_var_s[j] /= 1e4;
}
//写入结果(还原之后的特征数据)
cout<<"开始写入纹理特征值"<<endl;
//写油的 特征
//out << "1 "<<endl;
// out << "1 ";
//写入均值
// out << "cen: ";
// sprintf(buffer,"1:%.6f 2:%d 3:%.6f 4:%.6f 5:%.6f 6:%.6f 7:%.6f",feature_cen[0],(int)(feature_cen[1]+0.5),feature_cen[2],feature_cen[3],feature_cen[4],feature_cen[5],feature_cen[6]);
// sprintf(buffer,"%.6f %d %.6f %.6f %.6f %.6f %.6f;",feature_cen[0],(int)(feature_cen[1]+0.5),feature_cen[2],feature_cen[3],feature_cen[4],feature_cen[5],feature_cen[6]);
// out <<buffer<<endl;
//写入方差
// out <<"var: ";
sprintf(buffer,"1:%.6f 2:%.6f 3:%.6f 4:%.6f 5:%.6f 6:%.6f 7:%.6f",feature_var[0],feature_var[1],feature_var[2],feature_var[3],feature_var[4],feature_var[5],feature_var[6]);
// sprintf(buffer,"%.6f %d %.6f %.6f %.6f %.6f %.6f;",feature_var[0],(int)(feature_var[1]+0.5),feature_var[2],feature_var[3],feature_var[4],feature_var[5],feature_var[6]);
out<<buffer<<endl;
//写入间距
// out<< " r: ";
// sprintf(buffer,"1:%.6f 2:%d 3:%.6f 4:%.6f 5:%.6f 6:%.6f 7:%.6f",feature_r[0],(int)(feature_r[1]+0.5),feature_r[2],feature_r[3],feature_r[4],feature_r[5],feature_r[6]);
// sprintf(buffer,"%.6f %d %.6f %.6f %.6f %.6f %.6f;",feature_r[0],(int)(feature_r[1]+0.5),feature_r[2],feature_r[3],feature_r[4],feature_r[5],feature_r[6]);
// out <<buffer<<endl<<endl;
//写水的特征
// out << "-1 "<<endl;
// out << "cen: ";
//sprintf(buffer,"1:%.6f 2:%d 3:%.6f 4:%.6f 5:%.6f 6:%.6f 7:%.6f",feature_cen_s[0],(int)(feature_cen_s[1]+0.5),feature_cen_s[2],feature_cen_s[3],feature_cen_s[4],feature_cen_s[5],feature_cen_s[6]);
// sprintf(buffer,"%.6f %d %.6f %.6f %.6f %.6f %.6f;",feature_cen_s[0],(int)(feature_cen_s[1]+0.5),feature_cen_s[2],feature_cen_s[3],feature_cen_s[4],feature_cen_s[5],feature_cen_s[6]);
// out <<buffer<<endl;
// out<< "var: ";
//sprintf(buffer,"1:%.6f 2:%.6f 3:%.6f 4:%.6f 5:%.6f 6:%.6f 7:%.6f",feature_var_s[0],feature_var_s[1],feature_var_s[2],feature_var_s[3],feature_var_s[4],feature_var_s[5],feature_var_s[6]);
// sprintf(buffer,"%.6f %d %.6f %.6f %.6f %.6f %.6f;",feature_var_s[0],(int)(feature_var_s[1]+0.5),feature_var_s[2],feature_var_s[3],feature_var_s[4],feature_var_s[5],feature_var_s[6]);
// out <<buffer<<endl;
// out<< " r: ";
//sprintf(buffer,"1:%.6f 2:%d 3:%.6f 4:%.6f 5:%.6f 6:%.6f 7:%.6f",feature_r_s[0],(int)(feature_r_s[1]+0.5),feature_r_s[2],feature_r_s[3],feature_r_s[4],feature_r_s[5],feature_r_s[6]);
// sprintf(buffer,"%.6f %d %.6f %.6f %.6f %.6f %.6f;",feature_r_s[0],(int)(feature_r_s[1]+0.5),feature_r_s[2],feature_r_s[3],feature_r_s[4],feature_r_s[5],feature_r_s[6]);
// out <<buffer<<endl<<endl;
//写f
// out << " f: ";
// sprintf(buffer,"1:%.6f 2:%.6f 3:%.6f 4:%.6f 5:%.6f 6:%.6f 7:%.6f",f[0],f[1],f[2],f[3],f[4],f[5],f[6]);
// sprintf(buffer,"%.6f %.6f %.6f %.6f %.6f %.6f %.6f;",f[0],f[1],f[2],f[3],f[4],f[5],f[6]);
// out <<buffer<<endl;
// sprintf(buffer,"1:%.6f 2:%d 3:%.6f 4:%.6f 5:%.6f 6:%.6f 7:%.6f 8:%.6f 9:%d 10:%.6f 11:%.6f 12:%.6f 13:%.6f 14:%.6f 15:%.6f 16:%.6f 17:%.6f 18:%.6f 19:%.6f 20:%.6f 21:%.6f",feature_cen[0],(int)(feature_cen[1]+0.5),feature_cen[2],feature_cen[3],feature_cen[4],feature_cen[5],feature_cen[6],feature_cen_s[0],(int)(feature_cen_s[1]+0.5),feature_cen_s[2],feature_cen_s[3],feature_cen_s[4],feature_cen_s[5],feature_cen_s[6],f[0],f[1],f[2],f[3],f[4],f[5],f[6]);
// out << buffer<<endl;
//释放arLocalImage的空间
if (arLocalImage)
{
for (j=0;j<features.FilterWindowWidth;j++)
{
if (arLocalImage[j])
{
free(arLocalImage[j]);
arLocalImage[j] = NULL;
}
}
free(arLocalImage);
arLocalImage = NULL;
}
}
/////////////////////////////////////////////////////////////////////////////
cout << "写入数据完毕!关闭文件"<<endl;
//关闭文件
out.close();
// cvWaitKey(0);
//释放各种资源 (窗口和图像)
cvReleaseImage(&pSrc);
cvReleaseImage(&pGray);
return 0;
}
error C2664: “cvLoadImage”: 不能将参数 1 从“_TCHAR *”转换为“const
与指向的类型无关;转换要求 reinterpret_cast、C 样式转换或函数样式转换
error C2065: “LARGE_INTEGER”: 未声明的标识符
error C2146: 语法错误: 缺少“;”(在标识符“m_liPerfFreq”的前面)
error C2065: “m_liPerfFreq”: 未声明的标识符
error C2059: 语法错误:“{”
error C2143: 语法错误 : 缺少“;”(在“{”的前面)
error C2143: 语法错误 : 缺少“;”(在“}”的前面)
error C2065: “m_liPerfFreq”: 未声明的标识符
error C3861: “QueryPerformanceFrequency”: 找不到标识符
error C2065: “LARGE_INTEGER”: 未声明的标识符
error C2146: 语法错误: 缺少“;”(在标识符“m_liPerfStart”的前面)
error C2065: “m_liPerfStart”: 未声明的标识符
error C2059: 语法错误:“{”
error C2143: 语法错误 : 缺少“;”(在“{”的前面)
error C2143: 语法错误 : 缺少“;”(在“}”的前面)
: error C2065: “m_liPerfStart”: 未声明的标识符
: error C3861: “QueryPerformanceCounter”: 找不到标识符
error C2660: “FeatureDetect::ComputeMatrix”: 函数不接受 2 个参数
: error C2065: “LARGE_INTEGER”: 未声明的标识符
: error C2146: 语法错误: 缺少“;”(在标识符“liPerfNow”的前面)
error C2065: “liPerfNow”: 未声明的标识符
error C2059: 语法错误:“{”
error C2143: 语法错误 : 缺少“;”(在“{”的前面)
error C2143: 语法错误 : 缺少“;”(在“}”的前面)
: error C2065: “liPerfNow”: 未声明的标识符
: error C3861: “QueryPerformanceCounter”: 找不到标识符
: error C2065: “liPerfNow”: 未声明的标识符
error C2228: “.QuadPart”的左边必须有类/结构/联合
1> 类型是“'unknown-type'”
error C2065: “m_liPerfStart”: 未声明的标识符
error C2228: “.QuadPart”的左边必须有类/结构/联合
1> 类型是“'unknown-type'”
error C2065: “m_liPerfFreq”: 未声明的标识符