0

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: Input Image

waiting for your help.

  • 1
    can you add another image where you mark (colored) which ob the patterns you want/need to detect and which you needn't? e.g. do you need the tiny ones? do you have to divide the big one in the bottom right to two single ones? – Micka Mar 19 '15 at 10:58
  • Hello @Micka Thank you for responding. Actually I don't need the tiny one. I need to detect the circles/elliptical patterns which are present on the lines. the big ones. In the bottom right corner i don't need to divide. If I could detect it as a single one It is also ok for me. – Muhammad Awais Khalid Mar 19 '15 at 11:32
  • 2
    As asked by @Micka, you'd better provide a colored image with exactly what you want to detect. (You will soon realize that this isn't so easy.) –  Mar 19 '15 at 11:41
  • in the third line from left, do you see one or two patterns you want to detect? – Micka Mar 19 '15 at 11:42
  • hello @Micka Please see the below image in which i created the yellow circles of the area which i wanted to detect. Can you please guide me with this. And sorry for uploading this image late. regards. https://dl.dropboxusercontent.com/u/71584543/image_1_colored.png – Muhammad Awais Khalid Mar 23 '15 at 18:07

2 Answers2

2

You can use Hough transform API for finding circles.

http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OWENS/LECT6/node3.html

Rahul galgali
  • 775
  • 2
  • 10
  • 26
lui
  • 47
  • 3
0

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:


  • or apply the moments for finding the center of each region
Community
  • 1
  • 1
sop
  • 3,445
  • 8
  • 41
  • 84