In short, what I am looking for is a way of giving two images (image_1, image_2) to a program which would then output coordinates of a little window (who's dimensions are equal to image_2's dimensions) in the image_1 that is the most similar to image_2 if you know what I mean. Basically, I'm looking for a window in one image that is the most similar to a template image.
I've found a little piece of software called ImageJ and I had to add a plugin and some .jars to it (javacv.jar is one of them). It does exactly what I want, but since I want to repeat this processing on multiple template images (and one original image), it turns out to be a bit impractical because I have to load each template image separately and run the template matching plugin and it would take forever to get all the coordinates I want.
I would like to do this in Processing and I'd really like to get as much information about this matter as possible from you guys. I have javacvPro which I think may be usefull, but that's all I know.