how to draw boundary of an image
답변 (1개)
The bwboundaries returns the possible boundaries in the input image as a cell array. Any specific boundary can be extracted by indexing the cell array. In your case boundaries{4} will return you the required inner boundary.
But if you want to perform the same task in different images, I think you can find boundaries with and without option 'noholes' and compare the extracted boundaries. The boundaries extracted with the default 'holes' option will contain all boundaries and the boundaries extracted with the default 'noholes' option will not contain the inner boundaries. You can refer doucumentation for bwboundaries for more details.
You can also try inverting the binary image and then find the boundaries with 'noholes' option.
댓글 수: 0
참고 항목
카테고리
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!