Image Pyramids & Template Matching
I am trying to get into Image Pyramids, and while googling found this turorial. It compiles, and founds the 1:1 template, but when i am trying to increase template image, at least for 10 px, function stops finding it on image. What is wrong?
I did not have time to go through the tutorial from the official opencv documentation and your issue but I would like to suggest you to have a look at this tutorial here as well. It is quite nice and it might help you solve your problem ;-).
thanks, i am looking up to this one right now. but i have a problem with a right number of layers that i send to the function. if i add too much, i just get my PC lagging, and any low value just dont found the template, if that is the case of a problem, ofc. edit: increasing level value dont seem to help at all.
first you should know that template matching, in this form, is not scale and rotation invariant. So, when you increase the template image is normal that the function cannot find the image anymore. As for the lagging how many layers are you trying and what are the dimensions of the images, both original and template image. You should be aware that template matching is not that fast by following this approach.
than my approach is completely wrong. i need to find the template on image, and i dont know the size of the one on the image, since every time i will match them in my program, size of it will be different.
I would suggest you to go with something like this then. I think it will work much better in your case.
btw, can i use this resize function? and somewhy my opencv dont see the libraries, although they are connected, so i keep getting the "undefined reference" to any SURF function
in order to get SURF to work you need to have opencv with contrib modules enabled. I guess you did not do that. If not then check the README file in the above link in order to see how to do it ;-).