Reputation: 1925
I have two similar images, one is the template and the other image is pictured through a camera (thus, subject to rotation and skew). I need to match the contour of the template image and the photographed image. Is the matchShape function of opencv sufficient? My concern is that if there are 2 circles on the image, they might have the same contour. Should I consider the position of the contours?
Thanks in advance
Upvotes: 2
Views: 1044
Reputation: 11256
In most cases matchShapes() method should work, because it uses Hue moments which are invariant to scale, rotation and reflection (Except 7th).
On the other hand if you need something more specific, you should devise your own error minimization problem just like the ones used in deformable templates. Examples of using deformable templates can be found in my thesis.
Upvotes: 1