简体   繁体   中英

MATLAB Image Processing — How to Improve Accuracy Of Finding Circularity Algorithms?--

I have architectural building project image with a tif file.The image has some quarter circles that representing the doors. I tried to implement imfindcircles and regionprops (with eccentricity) functions in Matlab. But unfortunately functions didn't give us a efficient solutions like some circles couldn't find and some circles find that there is no circle exist in that locations. Is there any different idea or solution? I also attached my image with jpg file. Thanks...

https://imgur.com/a/f0r56fr

The images are binary and of a good quality. In particular, the edges are continuous and this is a big asset. On the other hand, the circular arcs are crossed by other features and this makes them harder to process.

Here are my recommendations:

  • thin the edges to single pixel width;

  • use a contour following algorithm to trace the edges and stop at the junctions (a junction is where a pixel has more than two neighbors), or at the angles (sharp change of direction);

  • detect the curved edges (take three spaced points and observe that they deviate from a line);

  • estimate the center and radius (you can repeat with more triples to check circularity);

  • keep the pieces that are compatible with the expected radius;

  • check if nearby pieces (either circular or short segments) are compatible with a global circle, and join them.

In the extreme cases, the arcs can be split in many short pieces. To handle this, you can detect "chains" of short segments and test them for co-circularity.

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