OpenCV_5步图像批量读取方法
总会遇到需要批量计算、检测图像数据的情况,总结一下批量读取图片的方法,只需要5步即可完成。代码如下。 #includeopencv2\highgui\highgui.hpp #includeopencv2\imgproc\imgproc.hpp #include #include #include using namespace cv; using namespace std; int main() { string ImgDoc = D:\\image\\*.bmp;//bmp或者其他格式都可 vector imgFiles; glob(ImgDoc , imgFiles)
下载地址
用户评论