简体   繁体   中英

How to process images from a folder for an opencv algorithm?

I need to process many images from a certain folder with my opencv algorithm, but i don't know how. The steps would need to be like this:

  1. Read and process the first image;
  2. After processing it, take this image off this folder and put it into a "processed images" folder. The results would be saved in another folder. Each image would have to have a name like "img001, img002" and so on.
  3. Repeat everything until the main folder is empty.

For list of files look at this . Moving files or deleting it is more complex problem as there is no simple solution (is OS dependent) but you can use boost::filesystem::rename and boost::filesystem::remove or std::rename and std::remove .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM