how to set region inside roi (polygon) to 1.
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a polygon drawn on an image using impoly. I want to set the region inside the polygon to 1. Can it be done. Please help me. Nithya
댓글 수: 0
채택된 답변
Image Analyst
2014년 2월 13일
If you have the Image Processing Toolbox, you can use the poly2mask() function to do that
[rows, columns, numberOfColorChannels] = size(yourImage);
binaryMask = poly2mask(x, y, rows, columns);
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!