Ask Your Question

Revision history [back]

click to hide/show revision 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;
     ...
}

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;
     ...
}