c++---------------------------->>>>>>>>>>>>>>>>>>遍历文件工具

std::string src_path = "C:/Users/94048/Desktop/interityErr/";
std::vector<cv::String> file_vec;
cv::glob(src_path + "*.jpg", file_vec, false);

for (std::string file_name : file_vec)
{
cv::Mat src1 = cv::imread(file_name, 1);
float val_threshold = 610;
bool blur_result = blur_detection(src1, val_threshold);

// std::cout << "检测的结果是:::" << blur_result << std::endl;
//std::cout << file_name << std::endl;
}

原文地址:https://www.cnblogs.com/shuimuqingyang/p/14100966.html