clc;close all,clear all
f=imread(‘5.png’);
f=double(f);
thresh = graythresh(f); %自动确定二值化阈值
h = im2bw(f,thresh);
h=double(h);
A1=imadjust(h,[0,1],[1,0]);
h1=bwmorph(A1,‘skel’,5);
figure,imshow(h1);
figure,imshow(f);
n1=imadjust(h1,[1,0],[0,1]);
imwrite(‘h.jpg’);
matlab图像二值化
最新推荐文章于 2024-09-24 10:35:29 发布