Answered step by step
Verified Expert Solution
Question
1 Approved Answer
clear close all imtool close all workspace; fontsize = 16; grayImage=imread(LorenVisaImage.png ); [rows, columns, numberofColorBands]=size(grayImage); subplot(1,2,1) imshow(grayImage) title(Original Image,'FontSize',fontsize) set(gcf,'Position',get(0,'Screensize' )) message=sprintf(Hold the Left Click
clear
close all
imtool close all
workspace;
fontsize = 16;
grayImage=imread("LorenVisaImage.png"
);
[rows, columns, numberofColorBands]=size(grayImage);
subplot(1,2,1)
imshow(grayImage)
title("Original
Image",'FontSize',fontsize)
set(gcf,'Position',get(0,'Screensize' ))
message=sprintf("Hold the Left Click and Draw the Boundary . When you are finished, lift the click");
uiwait(msgbox(message)) hfH=drawfreehand(); binaryImage=hfH.createMask();
maskedRgbImage = bsxfun(@times,
grayImage, cast(binaryImage, 'like',
grayImage));
maskedRgbImage(~maskedRgbImage) =
255;
subplot(1,2,2);
imshow(maskedRgbImage,[])
title("Image with Removed Background",'FontSize',fontsize)
that's a matlab can you explain it
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started