首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

遍历文件夹进展训练

2013-07-08 
遍历文件夹进行训练 BOOL ControlFlgfinder.FindFile(D:\\PolyU训练\\*.jpg)while (ControlFlg) {int

遍历文件夹进行训练
 BOOL ControlFlg=finder.FindFile("D:\\PolyU训练\\*.jpg");
    while (ControlFlg) 
{
int index1 = 0;
ControlFlg=finder.FindNextFile();
ptemp=finder.GetFilePath();
pSImg=cvLoadImage(ptemp);
OnGray();
OnJunfilter();
                OnBinary();
OnLabel();
}

在遍历文件夹时,想对文件夹的每一幅图像进行预处理,如OnGray();OnJunfilter();等,但在调用这些函数时,它始终处理的是前面打开的图像,而不是遍历文件夹中的图像,这是什么原因造成的。请大家帮帮忙,解决一下。 遍历 训练
[解决办法]
http://blog.csdn.net/fengbingchun/article/details/6193133
[解决办法]
BOOL ControlFlg=finder.FindFile("D:\\PolyU训练\\*.jpg");
    while (ControlFlg) 
{
int index1 = 0;
ptemp=finder.GetFilePath();
pSImg=cvLoadImage(ptemp);
OnGray();
OnJunfilter();
OnBinary();
OnLabel();
ControlFlg=finder.FindNextFile();

}

热点排行