Error when using createMask
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to develop a code in which I want to modify a figure. However, when I call createMask, I get an error saying "Undifined function or variable 'createMask'.
This is the code:
% read the original image
I = imread('TEST.PNG');
% call createMask function to get the mask and the filtered image
[BW,maskedRGBImage] = createMask(I);
% plot the original image, mask and filtered image all in one figure
subplot(1,3,1);imshow(I);title('Original Image');
subplot(1,3,2);imshow(BW);title('Mask');
subplot(1,3,3);imshow(maskedRGBImage);title('Filtered Image');
Any suggestions?
0 Kommentare
Antworten (1)
Brian Hart
am 12 Apr. 2019
Hi Manuel,
A mask is created from an ROI (region of interest), not an image. First you need to create an ROI with drawellipse, drawfreehand, etc. Then you can create a binary mask.
See the documentation for createMask for a good example.
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!