MatchTemplate problem for rotated image
Hi,
I need to find template image in source image. The template may be rotated by any angle. It seems that simple MatchTemplate example does not work in this case. For example, let template be letter "A". I copy "A" to source image and rotate the "A"...
No it does not work because fourier transform is not invariant by rotation...you mya use this
Ok. Thank you. Are there functions to realize this approach in openCV?
No but I think this can help you
Thank you. The code looks like very helpful, however perhaps my task may be solved via more simple way. I develop game bot for Space Rangers 2. The bot has to find followed 8 templates templates.jpg in screenshort. I.e. the object to search may be rotated by 45 degrees. I have following results: result.jpg Have you any idea to improve the recognition?
Something looks wrong. If you have 8 template can you try match template using this 8 template?
Sorry, I do not understand your idea exactly :(