using impoly(); how to extract the Region of Interest alone?? Here Im getting Errors.
grayImage = imread('pout.tif');
figure, imshow(grayImage);
h = impoly;
position = wait(h);
croppedImage = imcrop(grayImage, position);
figure;
imshow(croppedImage);

 Akzeptierte Antwort

David Legland
David Legland am 8 Okt. 2012
Bearbeitet: David Legland am 8 Okt. 2012

0 Stimmen

Hi,
You should use either imcrop, or impoly.
Using imcrop, you can select a rectangular region of interset. By the way, there is also a syntax "IMG2 = imcrop(IMG);". You can use like this:
grayImage = imread('pout.tif');
figure, imshow(grayImage);
img2 = imcrop;
imshow(img2)
Using impoly, you can select a polygonal region of interest. This polygon can be represented as an ordered list of vertex coordinates. You can then convert this polygon into a binary mask by using "roipoly" function.
regards, David

Weitere Antworten (1)

Karbala'a Unvi. Science
Karbala'a Unvi. Science am 21 Nov. 2014

0 Stimmen

hi, I need the help in reconstruct the cropped image back to the original image... PLS need the help urgently

Kategorien

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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by