资源简介

车牌边缘检测、分割、分类及识别,matlab详细代码,还有语音功能,一根很不错的模式识别代码。

资源截图

代码片段和文件信息

function [PY2PY1PX2PX1]=caitu_fenge(I)
[yxz]=size(I);
myI=double(I);
Y_threshlow=5;%这个数值很重要。决定了提取的彩图的质量
X_firrectify=5;%ganrao transaction
%====================== Y 方向============================
Blue_y=zeros(y1);
for i=1:y
    for j=1:x
       %if (myI(ij1)<=48)&&(myI(ij2)>=40)&&(myI(ij2)<=90)&&(myI(ij3)<=220)&&(myI(ij3)>=80)    
        if((myI(ij1)<=48)&&((myI(ij2)<=100)&&(myI(ij2)>=40))&&((myI(ij3)<=200)&&(myI(ij3)>=80)))  
        %if ((myI(ij1)<=0.7)&&(myI(ij1)>=0.6)&&((myI(ij2)<=1.8)&&(myI(ij2)>=0.6))&&((myI(ij3)<=1.7)&&(myI(ij3)>=0.45)))
           Blue_y(i1)= Blue_y(i1)+1;     % 蓝色象素点统计                    
        end  
    end       
end
baisebili=0;changkuanbi=0;
k=0;
while(~((baisebili>=0.12)&&(baisebili<=0.5)&&(changkuanbi>=0.20)&&(changkuanbi<=0.6)))%gai shan qingxie
    if  (k==0)%第一次进来
        [temp MaxY]=max(Blue_y);% Y方向车牌区域确定 temp(最多点数):所有行中,最多的累积像素点 MaxY(最多点所在行):该行中蓝点最多
        if temp<=20%2048*1536  照相
           msgbox(‘车牌定位出错‘‘warning‘);
           wavplay(wavread(‘车牌定位出错.wav‘)22000);
           pause;
        end
        PY1=MaxY;%有最多蓝点的行付给PY1
        while ((Blue_y(PY11)>=Y_threshlow)&&(PY1>1))%找到图片上边界
            PY1=PY1-1;
        end 
       
        %PY1:存储车牌上边界值
        PY2=MaxY;
        while ((Blue_y(PY21)>=Y_threshlow)&&(PY2             PY2=PY2+1;
        end
        PY1 PY2
 
%==============X 方向===============================
        X_threshhigh=(PY2-PY1)/11;%这个数值很重要。决定了提取的彩图的质量适当提高可抗干扰,但是小图会照成剪裁太多
        Blue_x=zeros(1x);             % 进一步确定X方向的车牌区域
        for j=1:x
            for i=PY1:PY2
              %  if((myI(ij1)<=48)&&((myI(ij2)<=90)&&(myI(ij2)>=30))&&((myI(ij3)<=160)&&(myI(ij3)>=80)))      
                if((myI(ij1)<=65)&&((myI(ij2)<=100)&&(myI(ij2)>=40))&&((myI(ij3)<=160)&&(myI(ij3)>=90)))%这里由82修改成90.因为图片20090504809   
               %  if ((myI(ij1)<=0.7)&&(myI(ij1)>=0.6)&&((myI(ij2)<=1.8)&&(myI(ij2)>=0.6))&&((myI(ij3)<=1.7)&&(myI(ij3)>=0.45)))
                 Blue_x(1j)= Blue_x(1j)+1;               
                end  
            end       
        end
        [temp MaxX]=max(Blue_x);
        PX1=MaxX-6*(PY2-PY1);
        if  PX1<=1
            PX1=1;
        end
        while ((Blue_x(1PX1)<=X_threshhigh)&&(PX1              PX1=PX1+1;
        end %确定出X方向车牌起点   
        PX2=MaxX+6*(PY2-PY1);
        if  PX2>=x
            PX2=x;
        end
        while ((Blue_x(1PX2)<=X_threshhigh)&&(PX2>PX1))%阈值
               PX2=PX2-1;
        end%确定出X方向车牌终点
        
%         PX1=1;
%         while ((Blue_x(1PX1)<=X_threshhigh)&&(PX1%              PX1=PX1+1;
%         end %确定出X方向车牌起点   
%         PX2=x;
%         while ((Blue_x(1PX2)PX1))%阈值
%             PX2=PX2-1;
%        end%确定出X方向车牌终点
        PX1 PX2

%=========================================================       
        a=PY2-PY1+1;b=P

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      53738  2009-05-03 06:32  车牌识别上传论坛\0.WAV

     文件      18630  2009-05-03 06:31  车牌识别上传论坛\1.BMP

     文件      59458  2009-05-03 06:32  车牌识别上传论坛\1.WAV

     文件      47574  2009-05-03 06:30  车牌识别上传论坛\10.BMP

     文件      68934  2009-05-03 06:30  车牌识别上传论坛\11.BMP

     文件      39114  2009-05-03 06:30  车牌识别上传论坛\12.BMP

     文件      72762  2009-05-03 06:30  车牌识别上传论坛\13.BMP

     文件      33342  2009-05-03 06:30  车牌识别上传论坛\14.BMP

     文件      45198  2009-05-03 06:31  车牌识别上传论坛\15.BMP

     文件      41502  2009-05-03 06:31  车牌识别上传论坛\16.BMP

     文件       4278  2009-05-03 06:31  车牌识别上传论坛\17.BMP

     文件       3750  2009-05-03 06:31  车牌识别上传论坛\18.BMP

     文件      51574  2009-05-03 06:31  车牌识别上传论坛\19.BMP

     文件      19494  2009-05-03 06:31  车牌识别上传论坛\2.BMP

     文件      66058  2009-05-03 06:32  车牌识别上传论坛\2.WAV

     文件      47222  2009-05-03 06:31  车牌识别上传论坛\20.BMP

     文件      17254  2009-05-03 06:31  车牌识别上传论坛\21.BMP

     文件       4278  2009-05-03 06:31  车牌识别上传论坛\22.BMP

     文件      53198  2009-05-03 06:31  车牌识别上传论坛\23.BMP

     文件      48366  2009-05-03 06:31  车牌识别上传论坛\24.BMP

     文件       4278  2009-05-03 06:31  车牌识别上传论坛\25.BMP

     文件      78018  2009-05-03 06:31  车牌识别上传论坛\26.BMP

     文件      44390  2009-05-03 06:31  车牌识别上传论坛\27.BMP

     文件       4278  2009-05-03 06:31  车牌识别上传论坛\28.BMP

     文件       4806  2009-05-03 06:31  车牌识别上传论坛\29.BMP

     文件      18534  2009-05-03 06:31  车牌识别上传论坛\3.BMP

     文件      58138  2009-05-03 06:32  车牌识别上传论坛\3.WAV

     文件       4806  2009-05-03 06:31  车牌识别上传论坛\30.BMP

     文件       4278  2009-05-03 06:31  车牌识别上传论坛\31.BMP

     文件      50838  2009-05-03 06:31  车牌识别上传论坛\32.BMP

............此处省略72个文件信息

评论

共有 条评论