0

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.
Nicholas
  • 47
  • 1
  • 11
  • 1
    Possible duplicate of [Reading an ordered sequence of images in a folder using OpenCV](http://stackoverflow.com/questions/32550620/reading-an-ordered-sequence-of-images-in-a-folder-using-opencv) – Miki Jul 06 '16 at 00:17
  • Please refer to the accepted answer of the question pointed by @Miki. With some tweaking, you should be able to work out how to save images, too. – Totoro Jul 06 '16 at 00:47

1 Answers1

1

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.

Community
  • 1
  • 1
Logman
  • 4,031
  • 1
  • 23
  • 35