Ask Your Question

Revision history [back]

The problem with creating avector is that you are going to have to set aside a large amount of memory to hold images. And the example you suggested above kind of supports that. I'll suggest that you turn it around to

./MatchingTemplate messi.jpg barca.jpg argentina.jpg ...

This way, you will read the template first. Then, you can read in the images one by one and look for the template in those. You can continue as long as you have arguments and reuse the memory to hold the images one by one. You can hold the names of the images, and any other relevant data, in the vector.