基于OpenCV读取文件夹中的所有图像文件
发布时间
阅读量:
阅读量
//编程环境配置为VS2008结合OpenCV1.1,
//本程序首先依次读取位于F://my face database//OnlyFace文件夹中的所有图像文件,随后在项目目录下
//创建一个名称为“result.xls”的Excel文档,针对每一个图像文件,在RGB颜色空间内进行归一化处理,并将每个
//像素点的R、G、B三个通道的平均值与标准差记录至该Excel文档中。此程序可应用于对大量图像样本进行训练。
#include "stdafx.h"
#include "afxwin.h"
#include "cv.h"
#include "highgui.h"
#include "fstream"
using namespace std ;
int _tmain(int argc, _TCHAR* argv[])
{
int height,width,step,channels ;
int i,j,k;
int n= 0 ;
IplImage* img ;
uchar* data ;
uchar BlueValue ;
全部评论 (0)
还没有任何评论哟~
