Nicholas
Nicholas

Reputation: 47

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.

Upvotes: 0

Views: 107

Answers (1)

Logman
Logman

Reputation: 4189

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.

Upvotes: 1

Related Questions