Hello! I would like to ask, how can I use impoly to choose all the ROI and not just the polygon that is around it!

 Akzeptierte Antwort

Adam
Adam am 2 Okt. 2015
Bearbeitet: Adam am 2 Okt. 2015

0 Stimmen

mask = createMask( hROI, hIm );
should give you a binary mask for the region, where hROI is your impoly and hIm is the handle of image on which it was drawn.

5 Kommentare

Ann G
Ann G am 2 Okt. 2015
Thank you very much!!
Ann G
Ann G am 2 Okt. 2015
Could you explain to me a little bit more the jIm parameter?
Ann G
Ann G am 6 Okt. 2015
Thank u for your help but unfortunately i still have a problem because i dont want a mask. Using mask as a return I get 0s and 1s and I need the elements of the ROI as they are!
This will apply the mask to the original image to erase the original pixels everywhere outside the mask:
% Initialize output to be same as input.
maskedImage = grayImage;
% Now erase pixels outside the mask.
maskedImage(~mask) = 0;

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Display Image finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 2 Okt. 2015

Kommentiert:

am 6 Okt. 2015

Community Treasure Hunt

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

Start Hunting!

Translated by