How to create a polygon using edges?
이전 댓글 표시
So I have the image as shown. The edges are of color yellow and red (just ignore the small yellow circle). How can I create a polygon using the edges? please help me! This is the image with edges.

This is the image with the polygon colored black.

This is the resulting image with the white part connoting the removed polygon.

채택된 답변
추가 답변 (1개)
Walter Roberson
2015년 9월 2일
0 개 추천
There are other implementations of the same kind of routine; look in the File Exchange
댓글 수: 4
sss sss
2015년 9월 2일
Image Analyst
2015년 9월 2일
I do not see any closed polygon(s) in your image. Please show the polygon and the final image where you masked out the inside (made it black).
sss sss
2015년 9월 2일
Walter Roberson
2015년 9월 2일
Threshold on the color channels to find the boundaries of the color portion. Scribble a line in the binary image along the edge of the picture, between the two endpoints on the edge. imfill(). You now have a mask to use to set (or clear) the original image.
카테고리
도움말 센터 및 File Exchange에서 Region and Image Properties에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!