如何从开放CV一个文件夹(使用C)中读取多个图像 [英] How to read multiple images from a folder in open cv (using C)
本文介绍了如何从开放CV一个文件夹(使用C)中读取多个图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是新开的简历和C.我如何在同样的操作来指定多个图像。
I am new to open CV and C. How do i specify multiple images for the same kind of operation.
推荐答案
如果您的图片(按顺序)编号,你可能滥用的隐藏功能,以VideoCapture,只是通过它(格式)字符串:
if your images are (sequentially) numbered, you could abuse a hidden feature with VideoCapture, just pass it a (format) string:
VideoCapture cap("/my/folder/p%05d.jpg"); // would work with: "/my/folder/p00013.jpg", etc
while( cap.isOpened() )
{
Mat img;
cap.read(img);
// process(img);
}
这篇关于如何从开放CV一个文件夹(使用C)中读取多个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文