有很多时候,我们需要对一个文件夹内的所有图像进行处理,这时一张张的Ctrl+F5就让人太蛋疼了,所以就产生了图像批量处理。
不扯了,直接上代码:
stdafx.h:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#pragma warning(disable: 4996)
#pragma warning(disable: 4819)
//#define WIN32_LEAN_AND_MEAN
#include <stdio.h>
#include <tchar.h>
main.cpp:
#include "stdafx.h"
#include "cv.h"
#include "cxcore.h"
#include "highgui.h"
#include "windows.h"
#include <vector>
#include <string>
#include "iostream"
#include <ctime> //计时用的头文件
using namespace std;
typedef std::vector<std::string> file_lists;
template<typename