批量处理图像
标签:file string extension include filenames attributes
2012-09-13 15:141767 人阅读评论(10)收藏举报
分类:
OpenCV(80) C++(24)
版权声明:本文为博主原创文章,未经博主允许不得转载。
有很多时候,我们需要对一个文件夹内的所有图像进行处理,这时一张张的 Ctrl+F5 就
让人太蛋疼了,所以就产生了图像批量处理。
不扯了,直接上代码:
stdafx.h:
[cpp]view plain copy print ?
1. //stdafx.h:includefileforstandardsystemincludefiles,
2. //orprojectspecificincludefilesthatareusedfrequently,but
3. //arechangedinfrequently
4. //
5.
6. #pragmaonce
7. #pragmawarning(disable:4996)
8. #pragmawarning(disable:4819)
9. //#defineWIN32_LEAN_AND_MEAN
10.
11. #include<stdio.h>
12. #include<tchar.h>
main.cpp:
[cpp]view plain copy print ?
1. #include"stdafx.h"
2. #include"cv.h"
3. #include"cxcore.h"
4. #include"highgui.h"
5. #include"windows.h"
6. #include<vector>
7. #include<string>
8. #include"iostream"
9. #include<ctime>//计时用的头文件
10. usingnamespacestd;
11. typedefstd::vector<std::string>file_lists;
12. template<typenameT>Tsqr(Tx){returnx*x;}
13.
评论2
最新资源