boundary detection after Canny Edge

冷暖自知 提交于 2020-01-24 09:38:45

问题


I've tried an open source java implementation of Canny Edge. I only need the boundary (the outline) of the image but there are extra lines in the output. Is there any way I could remove those lines after using Canny Edge (is there another algorithm)? Or are there other ways I could modify the program such that it will only detect the outline?

I've tried this one.


回答1:


If the outline you are looking for is a single "long" connected line, you could filter out "short" lines.

One way to do it would be by computing the area of those lines with a connected-component labeling algorithm and keeping only the line with the largest area (i.e. largest number of pixels).



来源:https://stackoverflow.com/questions/13190636/boundary-detection-after-canny-edge

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