I am giving the code here.
grayImage = imread('brain_tumor.png');figure,imshow(grayImage);%h = impoly;
%position = wait(h);
mask = roipoly(grayImage);figure, imshow(mask);BackGround = regionfill(grayImage, mask);figure, imshow(BackGround);
Sir, I have also attached the image herewith.
Best Answer