擅长:python、mysql、java
<p>我的问题是,正如@HugoRune所指出的,在我们的国家里有差距。解决办法是缩小差距。</p>
<p>我发现很难找到一种通用的方法来关闭间隙,所以我反复更改Canny过滤器的阈值,并执行<a href="http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_imgproc/py_morphological_ops/py_morphological_ops.html" rel="nofollow noreferrer">morphological closing</a>直到找到一个闭合的轮廓。</p>
<p>对于那些有同样问题的人,有几个很好的答案可以用来闭合轮廓,例如<a href="https://stackoverflow.com/questions/25142987/detect-non-closed-contour-on-opencv">this</a>或<a href="https://stackoverflow.com/questions/28078530/gap-filling-contours-lines">this</a></p>