0

In this image there are some lines and some elliptical (circular) patterns on these lines.

I want to detect these elliptical patterns in C# using Emgu.CV and OpenCV functions. Can any body please help me where should I start and what should I do first to detect these elliptical patterns?

Image

Sayse
  • 42,633
  • 14
  • 77
  • 146
  • 1
    is it right that if there were no "elliptical" (in my opinion they arent elliptical) patterns that there were basically only black background and vertical lines? Maybe it would be better to detect black background and vertical lines and check the rest for "ellipticalness" – Micka Feb 25 '15 at 15:13
  • Can you let me know any algorithm which counts these elliptical patterns.? like in the image above they are around 18 rings – Muhammad Awais Khalid Feb 25 '15 at 15:50
  • 2
    detect the lines with HoughLines algorithm and threshold the image. Then from each contour in the threshold image, count the parts that exceed some threshold distance limit from the detected lines. – Micka Feb 25 '15 at 15:55
  • can you tell me what kind of material that is and where those "bubbles" come from? – Micka Feb 25 '15 at 15:55
  • @Micka Due to some reasons, I can't tell you that where this image belongs. I am really sorry for that. I hope you understande. I need to detect these patterns. Can I use pattern recognition or machine learning to detect these patterns.? – Muhammad Awais Khalid Feb 26 '15 at 19:32
  • Probably... try hog svm, haar-cascade-classifier and all the others... – Micka Feb 26 '15 at 20:47
  • Hello @Micka Can you help me also with my other question. below is the link to that question:http://stackoverflow.com/questions/29142286/detecting-circular-pattern-in-image – Muhammad Awais Khalid Mar 19 '15 at 10:50

1 Answers1

1

a very simple method that still finds most of the bubbles:

  1. threshold the image
  2. find contours in threshold image
  3. filter out all contours that are too small and draw all others filled
  4. erode that mask until the vertical lines have disappeared
  5. count the new number of blobs/contours and dilate if you need the original size

steps look like these:

  1. thresholded (50)

enter image description here

  1. contours (all)

enter image description here

  1. contours (filtered mask)

enter image description here

  1. eroded mask

enter image description here

  1. dilated mask and overlay

enter image description here

as you can see it is very simple and finds most of the bubbles. If you dont know how often you have to erode, you can detect the vertical lines with HoughLines first.

Micka
  • 19,585
  • 4
  • 56
  • 74
  • it seems you're into Image Processing - could you assist us open this dedicated group: http://area51.stackexchange.com/proposals/66531/computer-vision/72084 Just vote to questions with less than 10 up votes. Thanks. – Royi Feb 26 '15 at 10:22
  • @Micka thanks for your help. Can I use the concept of machine learning or pattern recognition to detect these patterns? – Muhammad Awais Khalid Feb 26 '15 at 19:26