Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

those samples are not "written in stone", you'r eallowed (and even encouraged !) to hack them to fit your needs ;)

see, the only thing required here is that you fill the vector<String> img_names; list from the argument parsing, so maybe you can make good use of cv::glob() and (assuming, your image names can be nicely sorted lexicographically), add a case like:

    else if (string(argv[i]) == "--folder")
    {
        string folder = argv[i+1];
        i++;
        cv::glob(folder, img_names);
    }

to the cmdline parsing.

note: you probably need images numbered like: img007 (leading zeros), else img10 comes after img1 and before img2 !

those samples are not "written in stone", you'r eallowed you're allowed (and even encouraged !) to hack them to fit your needs ;)

see, the only thing required here is that you fill the vector<String> img_names; list from the argument parsing, so maybe you can make good use of cv::glob() and (assuming, your image names can be nicely sorted lexicographically), add a case like:

    else if (string(argv[i]) == "--folder")
    {
        string folder = argv[i+1];
        i++;
        cv::glob(folder, img_names);
    }

to the cmdline parsing.

note: you probably need images numbered like: img007 (leading zeros), else img10 comes after img1 and before img2 !

those samples are not "written in stone", you're allowed (and even encouraged !) to hack them to fit your needs ;)

see, the only thing required here is that you fill the vector<String> img_names; list from the argument parsing, so maybe you can make good use of cv::glob() and (assuming, your image names can be nicely sorted lexicographically), add a case like:

    else if (string(argv[i]) == "--folder")
    {
        string folder = argv[i+1];
        i++;
        cv::glob(folder, img_names);
img_names); // read folder content into img_names
    }

to the cmdline parsing.

note: you probably need images numbered like: img007 (leading zeros), else img10 comes after img1 and before img2 !