1 | initial version |
use a std::vector for this:
std::vector<cv::String> fileenames;
cv::glob("/my/images/*.png", filenames); //all png files in that folder
std::vector<cv::Mat> images(filenames.size());
for (size_t i=0; i<filenames.size(); i++) {
images[i] = cv::imread(filenames[i]);
}
2 | No.2 Revision |
use a std::vector for this:
std::vector<cv::String> fileenames;
filenames;
cv::glob("/my/images/*.png", filenames); //all png files in that folder
std::vector<cv::Mat> images(filenames.size());
for (size_t i=0; i<filenames.size(); i++) {
images[i] = cv::imread(filenames[i]);
}