1

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?

user1220513
  • 11
  • 1
  • 1
  • 3

1 Answers1

4

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

Community
  • 1
  • 1
mheona
  • 41
  • 3