1 | initial version |
again, learn to use dynamic c++ containers:
int main(int argc, char **argv) {
vector<Mat> images;
for (int i=1; i<argv; i++) {
Mat im = imread(argv[i]);
if (im.empty()) continue;
images.push_back(im);
}
cout << "read " << images.size() << " images." << endl;
...
}
2 | No.2 Revision |
again, learn to use dynamic c++ containers:
int main(int argc, char **argv) {
vector<Mat> images;
for (int i=1; i<argv; i<argc; i++) {
Mat im = imread(argv[i]);
if (im.empty()) continue;
images.push_back(im);
}
cout << "read " << images.size() << " images." << endl;
...
}