基于matlab的汽车牌照识别系统设计与实现内容摘要:

m2bw(I1,T/256)。 subplot(3,2,4)。 imshow(I1),title(39。 二值化车牌图像 39。 )。 I2=bwareaopen(I1,20)。 subplot(3,2,5)。 imshow(I2),title(39。 形态学 滤波后的二值化图像 39。 )。 [y1,x1,z1]=size(I2)。 I3=double(I2)。 TT=1。 %%%%%%%去除图像顶端和底端的不感兴趣区域 %%%%% Y1=zeros(y1,1)。 for i=1:y1 for j=1:x1 if(I3(i,j,1)==1) Y1(i,1)= Y1(i,1)+1。 end end end Py1=1。 Py0=1。 while ((Y1(Py0,1)20)amp。 amp。 (Py0y1)) Py0=Py0+1。 end Py1=Py0。 while((Y1(Py1,1)=20)amp。 amp。 (Py1y1)) Py1=Py1+1。 end I2=I2(Py0:Py1,:,:)。 subplot(3,2,6)。 imshow(I2),title(39。 目标车牌区域 39。 )。 %%%%%% 分割字符按行积累量 %%%%%%% X1=zeros(1,x1)。 for j=1:x1 for i=1:y1 if(I3(i,j,1)==1) X1(1,j)= X1(1,j)+1。 end end end figure(5)。 plot(0:x11,X1),title(39。 列方向像素点灰度值累计和 39。 ),xlabel(39。 列值 39。 ),ylabel(39。 累计像素量 39。 )。 Px0=1。 Px1=1。 %%%%%%%%%%%%分割字符 %%%%%%%%%%%%%%%%%% for i=1:7 while ((X1(1,Px0)3)amp。 amp。 (Px0x1)) Px0=Px0+1。 end Px1=Px0。 while (((X1(1,Px1)=3)amp。 amp。 (Px1x1))||((Px1Px0)10)) Px1=Px1+1。 end Z=I2(:,Px0:Px1,:)。 switch strcat(39。 Z39。 ,num2str(i)) case 39。 Z139。 PIN0=Z。 case 39。 Z239。 PIN1=Z。 case 39。 Z339。 PIN2=Z。 case 39。 Z439。 PIN3=Z。 case 39。 Z539。 PIN4=Z。 case 39。 Z639。 PIN5=Z。 otherwise PIN6=Z。 end figure(3)。 subplot(1,7,i)。 imshow(Z)。 Px0=Px1。 End 车牌字符识别 字符识别方法主要有基于模板匹配算法和基。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。