I have an image of an object. The image shows a high contrast outline of the object. It is guaranteed that the image shows exactly one object.
The shape/contour of that outline is known. It is not simple (e.g. a circle) but not too complex either. It is made up of (circular) arcs and straight lines. Think of the outline of the head of mickey mouse in terms of complexity.
Given the image and the knowledge about the shape, how do I determine the position, rotation and scale of the shape and thus the object in the image?
I did some research and Hough transforms seem to be the way to go, but only for lines.
The wikipedia article states that
Altering the algorithm to detect circular shapes instead of lines is relatively straightforward.
I have the impression that as long as I can describe the shape mathematically, I can adopt the algorithm to that shape, because the mathematical model is what defines the transformation. Is that impression (while very rough) correct?
The article states further
For more complicated shapes in the plane (i.e., shapes that cannot be represented analytically in some 2D space), the Generalised Hough transform [12] is used, which allows a feature to vote for a particular position, orientation and/or scaling of the shape using a predefined look-up table.
Is my Mickey Mouse-shape a complicated shape? Do I need the Generalised Hough transform?
Am I on the right track with this hough transform?
I found an implementation in openCV, which lacks scale detection:
finds arbitrary template in the grayscale image using Generalized Hough Transform
Detects position, translation and rotation
Basically speaking, I have an image and some shape description (think of a vector graphic of the outline) and I want to know where it is in the image. Does something like that exists?
I cannot share the image.