I have a image. In this image there are some vertical lines and in these lines there appear some circular/elliptical or convex patterns. I want to detect the position of these circular/elliptical or convex patterns using EmguCV / OpenCV. Can any body of you help me in this regard?
This is the image in which i want to find the circular/elliptical patterns:
waiting for your help.
You can use Hough transform API for finding circles.
http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OWENS/LECT6/node3.html
You can try to
- find contours (just the outer -
CV_RETR_EXTERNAL
)
- fill their interiors (draw using -1 for thickness for filling)
- apply a morphology operation for detecting just the blobs (open should solve it; normally
MORPH_RECT
should do it, but please try more sizes to see which one is the best for your purpose)
Now you have just the wanted regions. If you need a point you may:
- detect contours again (just for the blobs)
- compute the mean point of each contour
- or apply the moments for finding the center of each region