I have an image of a target as shown below:
and I have a picture full of them that each is scaled and rotated. I need to detect the center of targers in the second image.
How can I do this?
I know how to use SURF to detect match points between two image. But I don't know how to use it to detect one image in another image when there's more than one instance of the reference image in the containing image.
I also don't know how to detect the center of a target when I detect the target image in the containing image.
I'm using openCV 2.4.6 and Visual Studio 2012.
The output should be something like this:
Please note the targets that I draw a circle to define their centre. I need the centre x,y to use them in another process.
Edit1
Based on suggestions, I threshold the image, then use find contour to generate this image:
Now I have two questions:
- How can I filter out contours which is not related to any target?
- How to detect the center of a target?