#include <opencv2\opencv.hpp>
#include <iostream>
using namespace std;
using namespace cv;
int main(){
//用void glob(String pattern, std::vector<String>& result, bool recursive = false);当recursive为false时,仅仅遍历指定文件夹内符合模式的文件,当recursive为true时,会同时遍历指定文件夹的子文件夹
//pattern要绝对路径 其它测试有问题
string pattern = "D:/Acodes/data/*.jpg";
//cout << pattern << endl;
vector<Mat> images
opencv3.x遍历文件夹读取图片
最新推荐文章于 2025-06-22 12:35:09 发布