• 大小: 5.9MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-12
  • 语言: Matlab
  • 标签: matlab  

资源简介

matlab基于颜色的车牌识别程序

资源截图

代码片段和文件信息

%---------------------------------------------%
%       %
%          工作室提供代做matlab仿真       %
%       %
%  详情请访问:http://cn.mikecrm.com/5k6v1DP  %
%       %
%---------------------------------------------%

function [PY2PY1PX2PX1]=caitu_fenge(I)
[yx]=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);
           audioplayer(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=PX

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-09-19 13:08  matlab基于颜色的车牌识别程序\
     文件          55  2018-08-27 11:33  matlab基于颜色的车牌识别程序\【源码使用必读】.url
     目录           0  2018-09-19 13:05  matlab基于颜色的车牌识别程序\chepaishibie\
     文件       34710  2009-05-03 06:30  matlab基于颜色的车牌识别程序\chepaishibie\0.BMP
     文件       18630  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\1.BMP
     文件       47574  2009-05-03 06:30  matlab基于颜色的车牌识别程序\chepaishibie\10.BMP
     文件       68934  2009-05-03 06:30  matlab基于颜色的车牌识别程序\chepaishibie\11.BMP
     文件       39114  2009-05-03 06:30  matlab基于颜色的车牌识别程序\chepaishibie\12.BMP
     文件       72762  2009-05-03 06:30  matlab基于颜色的车牌识别程序\chepaishibie\13.BMP
     文件       33342  2009-05-03 06:30  matlab基于颜色的车牌识别程序\chepaishibie\14.BMP
     文件       45198  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\15.BMP
     文件       41502  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\16.BMP
     文件        4278  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\17.BMP
     文件        3750  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\18.BMP
     文件       51574  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\19.BMP
     文件       19494  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\2.BMP
     文件       47222  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\20.BMP
     文件       17254  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\21.BMP
     文件        4278  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\22.BMP
     文件       53198  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\23.BMP
     文件       48366  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\24.BMP
     文件        4278  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\25.BMP
     文件       78018  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\26.BMP
     文件       44390  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\27.BMP
     文件        4278  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\28.BMP
     文件        4806  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\29.BMP
     文件       18534  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\3.BMP
     文件        4806  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\30.BMP
     文件        4278  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\31.BMP
     文件       50838  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\32.BMP
     文件       32430  2009-05-03 06:31  matlab基于颜色的车牌识别程序\chepaishibie\33.BMP
............此处省略39个文件信息

评论

共有 条评论