问题
I want to rotate given template image at different angles (eg. 30, 60, 90, ...) and then I want to match the rotated images with a source image to detect objects using opencv functions (I'm writing C code)...
How can I do this using opencv functions? Or is there any other solution?
ya i'd searched SOF and that function is not passing rotated image to the main progrm. . . . . and the other code given in SOF continuously rotating the image. so using this we cant do teplate matching.
is there any other codes to solve this problem?
回答1:
Template matching is not a good choice to match rotated targets.
You better check the openCV module Features2D. You'll want to take a special look at the examples for the Feature Matching and Homography. Both contains the functional source.
For furthers details and a great explanation on the topic you can check Innuendo's answer to a similar question here: scale and rotation Template matching
来源:https://stackoverflow.com/questions/9358139/to-rotate-template-image-and-perform-template-matching