Help me please to arrange function for rotation and masking of image according to vertices, which were taken by ginput

7 views (last 30 days)
Here is my code:
_I = imread(filename);
%# ROTATION OF IMAGE according to angle, taken from GUI panel
angle = str2double(get(handles.angleTXT,'String'));
I_r = imrotate(I,angle, 'bilinear', 'crop');
%# MASKING IMAGE according to [x and y] taken by "GET COORDINATES"
masked_im = poly2mask(handles.X,handles.Y,size(I_r,1),size(I_r,2));
Imasked = uint8(masked_im).*I_r;
figure;
imshow(Imasked);__
Thank you for help in advance

Answers (0)

Community Treasure Hunt

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

Start Hunting!