Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

imread() on its own can not do any asterisk magic. if you're using opencv3, there's cv::glob:

String pattern = "./*"; //all files in this directory. "*.png" would be valid, too !
vector<String> filenames;

glob(pattern, filenames, false);

for (size_t i=0; i<filenames.size(); i++)
{
    Mat img = imread(filenames[i]);
    // do something with img ..
}