基于matlab的车牌识别系统的设计毕业设计(编辑修改稿)内容摘要:

,39。 s39。 )。 %202。 228。 200。 235。 179。 181。 197。 198。 213。 213。 198。 172。 I=imread(k)。 imshow(I)。 %I=imread(39。 D:\123\39。 )。 figure(1),imshow(I)。 title(39。 212。 205。 188。 39。 ) I1=rgb2gray(I)。 figure(2),imshow(I1)。 title(39。 187。 210。 182。 200。 205。 188。 39。 )。 I2=edge(I1,39。 roberts39。 ,39。 both39。 )。 figure(3),imshow(I2)。 title(39。 robert203。 227。 211。 177。 223。 212。 181。 188。 236。 178。 226。 39。 ) se=[1。 1。 1]。 I3=imerode(I2,se)。 figure(4),imshow(I3)。 title(39。 184。 175。 202。 180。 186。 243。 205。 188。 207。 241。 39。 )。 se=strel(39。 rectangle39。 ,[25,25])。 I4=imclose(I3,se)。 figure(5),imshow(I4)。 title(39。 198。 189。 187。 172。 205。 188。 207。 241。 181。 196。 194。 214。 192。 170。 39。 )。 I5=bwareaopen(I4,2020)。 figure(6),imshow(I5)。 title(39。 180。 211。 182。 212。 207。 243。 214。 208。 210。 198。 179。 253。 208。 161。 182。 212。 207。 243。 39。 )。 [y,x,z]=size(I5)。 myI=double(I5)。 tic Blue_y=zeros(y,1)。 for i=1:y for j=1:x if(myI(i,j,1)==1) Blue_y(i,1)= Blue_y(i,1)+1。 %192。 182。 201。 171。 207。 241。 203。 216。 181。 227。 205。 179。 188。 198。 end end end [temp MaxY]=max(Blue_y)。 %Y189。 207。 242。 179。 181。 197。 198。 199。 248。 211。 242。 200。 182。 168。 PY1=MaxY。 while ((Blue_y(PY1,1)=5)amp。 amp。 (PY11)) PY1=PY11。 end PY2=MaxY。 while ((Blue_y(PY2,1)=5)amp。 amp。 (PY2y)) PY2=PY2+1。 end IY=I(PY1:PY2,:,:)。 %%%%%% X189。 207。 242。 %%%%%%%%% Blue_x=zeros(1,x)。 %189。 248。 210。 187。 178。 189。 200。 182。 168。 x189。 207。 242。 181。 196。 179。 181。 197。 198。 199。 248。 211。 242。 for j=1:x for i=PY1:PY2 if(myI(i,j,1)==1) 基于 MATLAB 的车牌识别系统的设计 Blue_x(1,j)= Blue_x(1,j)+1。 end end end PX1=1。 while ((Blue_x(1,PX1)3)amp。 amp。 (PX1x)) PX1=PX1+1。 end PX2=x。 while ((Blue_x(1,PX2)3)amp。 amp。 (PX2PX1)) PX2=PX21。 end PX1=PX11。 %182。 212。 179。 181。 197。 198。 199。 248。 211。 242。 181。 196。 208。 163。 213。 253。 PX2=PX2+1。 dw=I(PY1:PY28,PX1:PX2,:)。 t=toc。 figure(7),subplot(1,2,1),imshow(IY),title(39。 208。 208。 189。 207。 242。 199。 248。 211。 242。 39。 )。 figure(7),subplot(1,2,2),imshow(dw),title(39。 182。 168。 206。 187。 186。 243。 181。 196。 178。 202。 201。 171。 179。 181。 197。 198。 205。 188。 207。 241。 39。 ) imwrite(dw,39。 39。 )。 [filename,filepath]=uigetfile(39。 39。 ,39。 202。 228。 200。 235。 210。 187。 184。 246。 182。 168。 206。 187。 178。 195。 188。 244。 186。 243。 181。 196。 179。 181。 197。 198。 205。 188。 207。 241。 39。 )。 jpg=strcat(filepath,filename)。 a=imread(39。 39。 )。 b=rgb2gray(a)。 imwrite(b,39。 1.179。 181。 197。 198。 187。 210。 182。 200。 205。 188。 39。 )。 figure(8)。 subplot(3,2,1),imshow(b),title(39。 1.179。 181。 197。 198。 187。 210。 182。 200。 205。 188。 207。 241。 39。 ) g_max=double(max(max(b)))。 g_min=double(min(min(b)))。 T=round(g_max(g_maxg_min)/3)。 % T 206。 170。 182。 254。 214。 181。 187。 17。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。