function Y = nhanchap(X,H)%X la ma tran anh%H la ma tran nhan chapm = size(X); %Lay kich co cua ma tran X n = size(H,1);for i=1:m(1)for j=1:m(2)sum=0;t=floor((n+1)/2);for k=1:nfor l=1:nsohang=i-k+t;socot=j-l+t;if (sohang~=0)&(sohang 0.95 )text(s(k).C
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 08:20:32
function Y = nhanchap(X,H)%X la ma tran anh%H la ma tran nhan chapm = size(X); %Lay kich co cua ma tran X n = size(H,1);for i=1:m(1)for j=1:m(2)sum=0;t=floor((n+1)/2);for k=1:nfor l=1:nsohang=i-k+t;socot=j-l+t;if (sohang~=0)&(sohang 0.95 )text(s(k).C
function Y = nhanchap(X,H)
%X la ma tran anh
%H la ma tran nhan chap
m = size(X); %Lay kich co cua ma tran X
n = size(H,1);
for i=1:m(1)
for j=1:m(2)
sum=0;
t=floor((n+1)/2);
for k=1:n
for l=1:n
sohang=i-k+t;
socot=j-l+t;
if (sohang~=0)&(sohang 0.95 )
text(s(k).Centroid(1)-20,s(k).Centroid(2),'ellipse')
elseif (thoi < 1.05 ) & (thoi > 0.95 )
text(s(k).Centroid(1)-20,s(k).Centroid(2),'diamond')
elseif ((chunhat 0.95))
text(s(k).Centroid(1)-20,s(k).Centroid(2),'rectangle')
elseif (tamgiacdeu < 1.05 ) & (tamgiacdeu > 0.95 )
text(s(k).Centroid(1)-20,s(k).Centroid(2),'triangle')
end
end
这是matlab中的程序 三角形圆形的等一些简单图形的识别.
function Y = nhanchap(X,H)%X la ma tran anh%H la ma tran nhan chapm = size(X); %Lay kich co cua ma tran X n = size(H,1);for i=1:m(1)for j=1:m(2)sum=0;t=floor((n+1)/2);for k=1:nfor l=1:nsohang=i-k+t;socot=j-l+t;if (sohang~=0)&(sohang 0.95 )text(s(k).C
C语言的程序基本上没有可读性.
C语言的变量名、函数名称,都是编程者自己瞎编的,
除了作者本人,谁也不知道它们究竟代表什么.