How to delete the branches?
조회 수: 15 (최근 30일)
이전 댓글 표시
I have a matrix which just consist by 0 and 1, like the figure above (1 is black and 0 is white). It's kind of river, but there is some noise like the red arrows above.
Is there some ways to identify these small segment lines and delete these small segment lines?
Calculating the length (pixel) of these small segment lines is not necessary, but I am interested to know it.
Any suggestion will be appreciated.
댓글 수: 0
채택된 답변
추가 답변 (1개)
darova
2019년 9월 24일
I have an idea:
- Find pairs of branch/end points smaller than desired length
- Select circle area between points. Find biggest area in this circle (if there are) and remove it
- Place modificated circle area into original image
See the attached script
댓글 수: 12
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!