图像命名规则为00*.png
推荐一款批处理文件名小程序,better file rename
#include <opencv2\opencv.hpp>
#include <iostream>
using namespace std;
int main( int argc, char** argv )
{
//声明IplImage指针
IplImage* Image = NULL;
char filename[20];//保存图像名的数组
for(int i=0; i<430; i++) //图像命名规则为00*.png
{
sprintf(filename, "D://ex7//d.png", i);
Image=cvLoadImage(filename,-1);
cvShowImage("读取",Image);
char c = cvWaitKey(33);
if(c == 27) break;//按下ESC停止
}
}