• 大小: 2KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-05-14
  • 语言: Matlab
  • 标签:

资源简介

车牌字符分割算法的垂直投影切分matlab程序

资源截图

代码片段和文件信息

I=imread(‘1.bmp‘);
imshow(I);
[xy]=size(I);
Ver=sum(I);
MeanV=0.1*mean(Ver);
PY1=1;
while (Ver(PY1)    PY1=PY1+1;
end
PY2=y;
while(Ver(PY2)PY1)
    PY2=PY2-1;
end
I1=I(:PY1:PY2);
%I1=imresize(I11‘bilinear‘);
figureimshow(I1);
Ver1=sum(I1);
MeanV1=0.3*mean(Ver1);
[xy]=size(I1);
CharW=round((45/409)*y);
Space=round((12/409)*y);
Point=round((34/409)*y);
spos=round(CharW*2+Space+(1/2)*Point);
k=spos;
tic
while (Ver1(k)>MeanV1)&&(k    k=k+1;
end
n=2;
while(n>=1)&&(k>1)
      while(Ver1(k)1)
      k=k-1;
      end
Rcpos(n)=k;
      while (Ver1(k)>MeanV1)&&(k>1)
       k=k-1;
      end
Lcpos(n)=k+1;
if (Rcpos(n)-Lcpos(n))>1.5*CharW
    Lcpos(n)=round(Rcpos(n)-CharW);
    k=Lcpos(n)-1;
end

评论

共有 条评论

相关资源