简体   繁体   English

MATLAB 图像处理——如何提高圆度算法的查找精度?--

[英]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.我有一个带有 tif 文件的建筑项目图像。图像有一些四分之一圆代表门。 I tried to implement imfindcircles and regionprops (with eccentricity) functions in Matlab.我尝试在 Matlab 中实现 imfindcircles 和 regionprops(带偏心)功能。 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.我还用 jpg 文件附加了我的图像。 Thanks...谢谢...

https://imgur.com/a/f0r56fr 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.为了解决这个问题,您可以检测短段的“链”并测试它们的共圆性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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