scale and rotation Template matching in opencv
You can try Generalized Hough Transform (GHT), to find contours using template. As I remember, there was ready to use implementation in opencv (gpu) examples.(opencv/samples/gpu/generalized_hough.cpp on my machine)
Here is also useful link with source code: http://www.itriacasa.it/generalized-hough-transform/instructions.html
Rotation and scale invariant template matching in OpenCV
Try the easiest method first.
If I understand you correctly you have some model - black shape over white background. You can treat it as blob - find it's mass center and rotation by computing principal axes angle - look there.
Then you must segment out shapes from other images. Then try to find the best corresponding shape with matchShapes() function - see there how to use it.
matchShapes() function makes scale and rotation invariant matching. The smallest match shapes result the better match.
Extending your question you can find mass center and rotation of best matching blob and find rotation, scale and displacement between your model and matched image.
Related Topics
C++ Access Derived Class Member from Base Class Pointer
Can Google Mock a Method with a Smart Pointer Return Type
How to Initialize 3D Array in C++
Converting Std::String to Std::Vector<Char>
"If" Argument Evaluation Order
How to Correctly Initialize Member Variable of Template Type
In C++, How to Forward Declare a Class as Inheriting from Another Class
Overloaded Lambdas in C++ and Differences Between Clang and Gcc
How to Get a List of Video Capture Devices (Web Cameras) on Windows? (C++)
Deleting Specific Line from File
C++ Error: '_Mm_Sin_Ps' Was Not Declared in This Scope
What Does the Fpermissive Flag Do
Why Is Partial Specialization of a Nested Class Template Allowed, While Complete Isn'T
What's a Good Hash Function for English Words