简体   繁体   中英

Extract ellipse(or blob) from an image using OpenCV

I processed an Image to get the image below. 在此处输入图片说明

The lines indicates the ellipses(blobs) to be extracted.

I tried cv::findContours function, but the borders extracted together. Please someone help me with my job. Thank you.

I would start by extracting the first/smallest circle, and I would do it like that:

  1. basic thresholding to get a binary image.
  2. Centroid computation
  3. For each path between the centroid and the image border, find the closest non null pixel from the centroid.

These three first step are going to give you the pixels belonging to the first/smallest circle, plus some pixel of the second circle because the first circle is not discontinuous.

  1. Hough detection. I think that Hough circle is enough, but in case it does not work, I would use the Ellipsoid version.
  2. You keep only the "most likely" circle.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM