Detecting circular pattern in image

☆樱花仙子☆ 提交于 2019-12-23 05:30:33

问题


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.


回答1:


You can use Hough transform API for finding circles.

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




回答2:


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


来源:https://stackoverflow.com/questions/29142286/detecting-circular-pattern-in-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!