1 | initial version |
Another solution that I often use is to create a text file containing the image names and pass that filename as argument.
The text file can be created with ls *.jpg > process.txt
(or dir *.jpg > process.txt
in Windows).
Then read the file line by line:
ifstream myfile(argv[1]);
while(!myfile.eof()){
getline(myfile,imagefilename);
cv::imread(img,imagefilename);
//...process img...
}
myfile.close();