简体   繁体   中英

to rotate template image and perform template matching

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM