How to use imellipse for multiple images and then change them to binary image

1 次查看(过去 30 天)
I already read multiple images using
folder = dir('C:\Users\Demo\WD*.png');
image = cell(1,numel(folder));
for i = 1:numel(folder);
image{i} = imread(folder(i).name);
end
I would like to use the imellipse to draw an ellipse on each and every image read and then change the drawn ellipse to binary image. I tried this code but I failed to change it to binary image
h8{i} = subplot(3,3,i);
hEllipse{i} = imellipse(gca,[10 10 50 150]);
for i = 1:numel(folder)
binaryImage{i} = hEllipse{i}.createMask();
end
any help

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by