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!