自己编了个二值图和灰度图的匹配代码还不错-1.fig
I=imread;
I1=rgb2gray;
%I1=255-I1;
data=graythresh;
img=im2bw;
imshow;
[m n]=size;
img1=zeros;
for i=1:m
for j=1:n
if img==1
img1=I1;
else
img1=0;
end
end
end
figure
imshow);
自己编了个二值图和灰度图的匹配代码还不错-2.fig
I=imread;
I1=rgb2gray;
%I1=255-I1;
data=graythresh;
img=im2bw;
imshow;
[m n]=size;
img1=zeros;
for i=1:m
for j=1:n
if img==1
img1=I1;
else
img1=0;
end
end
end
figure
imshow);