Filter löschen
Filter löschen

how to set region inside roi (polygon) to 1.

1 Ansicht (letzte 30 Tage)
Nithya
Nithya am 13 Feb. 2014
Beantwortet: Image Analyst am 13 Feb. 2014
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

Akzeptierte Antwort

Image Analyst
Image Analyst am 13 Feb. 2014
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);

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by