求matlab大神给这段程序加个注释
A=imread('1.tif');%A=imread('2.tif');a=mean(mean(A));A=double(A);b=1;k1=a+b;k2=a-b;A(...
A=imread('1.tif');
%A=imread('2.tif');
a=mean(mean(A));
A=double(A);
b=1;
k1=a+b;
k2=a-b;
A(find(A>=k1))=0;
A(find(A<=k2))=0;
A(find(A~=0))=1;
imshow(A)
hold on
L=bwlabel(A);
STATS=regionprops(L,'centroid');
STS=regionprops(L,'Area');
s1=cat(1,STATS.Centroid);
s2=cat(1,STS.Area);
[m,n]=max(s2)
aa=s1(n,:)
plot(aa(1),aa(2),'r*','MarkerSize',10) 展开
%A=imread('2.tif');
a=mean(mean(A));
A=double(A);
b=1;
k1=a+b;
k2=a-b;
A(find(A>=k1))=0;
A(find(A<=k2))=0;
A(find(A~=0))=1;
imshow(A)
hold on
L=bwlabel(A);
STATS=regionprops(L,'centroid');
STS=regionprops(L,'Area');
s1=cat(1,STATS.Centroid);
s2=cat(1,STS.Area);
[m,n]=max(s2)
aa=s1(n,:)
plot(aa(1),aa(2),'r*','MarkerSize',10) 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励30(财富值+成长值)
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询