opencv2.4.10 获取文件夹下所有图片路径
作者:互联网
1 Directory dir; 2 vector<string> Folders = dir.GetListFolders(dir_path, "*", false);// 获取指定路径下所有子文件夹的名称 3 Directory dirs; 4 for (size_t i = 0; i < Folders.size(); ++i){ 5 vector<string> fileNames = dirs.GetListFiles(dir_path + Folders.at(i) + "/", "*", false);// 获取所有子文件夹内文件名称 6 for (size_t j = 0; j < fileNames.size(); ++j){ 7 8 string fileName = fileNames[j]; 9 string fileFullName = dir_path + Folders.at(i) + "/" + fileName;// 获取文件的绝对路径 10 11 } 12 13 }View Code
标签:Folders,10,fileNames,文件夹,path,opencv2.4,dir,size 来源: https://www.cnblogs.com/yzj-notes/p/14742679.html