f=imread(‘coins.png’);
bw1=im2bw(f,graythresh(f));
bw2=bwmorph(bw1,‘remove’);
bw3=imfill(bw2,‘holes’);
subplot(2,2,1),imshow(f);title(‘原图’)
subplot(2,2,2),imshow(bw1);title(‘二值图像’)
subplot(2,2,3),imshow(bw2);title(‘图像边界’)
subplot(2,2,4),imshow(bw3);title(‘填充图像’)
如何用matlab求图形边界和对图形进行填充
最新推荐文章于 2022-07-31 22:27:47 发布