资源简介
对给定图片,通过不断缩小矩形区域,从而中对车牌进行最终定位,给出matlab程序,和演示视频。

代码片段和文件信息
function lpr_loc()
% license plate recognition - car plate location based on color model
% modified by ZHAO Hui April 30th2005
I=imread(‘Car.jpg‘);
[yxz]=size(I);
myI=double(I);
%%%%%%%%%%% RGB to HSI %%%%%%%%
tic % 测定算法执行的时间,开始计时
%%%%%%%%%%% 统计分析 %%%%%%%%%%%%%%%
%%%%%%%% Y 方向 %%%%%%%%%%
Blue_y=zeros(y1);
for i=1:y
for j=1:x
if((myI(ij1)<=121)&&myI(ij1)>=110&&((myI(ij2)<=155)&&(myI(ij2)>=141))&&((myI(ij3)<=240)&&(myI(ij3)>=210)))
% 蓝色RGB的灰度范围
Blue_y(i1)= Blue_y(i1)+1; % 蓝色象素点统计
end
end
end
[temp MaxY]=max(Blue_y); % Y方向车牌区域确定
PY1=MaxY;
while ((Blue_y(PY11)>=5)&&(PY1>1))
PY1=PY1-1;
end
PY2=MaxY;
while ((Blue_y(PY21)>=5)&&(PY2 PY2=PY2+1;
end
IY=I(PY1:PY2::);
%%%%%%%% X 方向 %%%%%%%%%%
Blue_x=zeros(1x); % 进一步确定X方向的车牌区域
for j=1:x
for i=PY1:PY2
if((myI(ij1)<=121)&&myI(ij1)>=110&&((myI(ij2)<=155)&&(myI(ij2)>=141))&&((myI(ij3)<=240)&&(myI(ij3)>=210)))
Blue_x(1j)= Blue_x(1j)+1;
end
end
end
PX1=1;
while ((Blue_x(1PX1)<3)&&(PX1 PX1=PX1+1;
end
PX2=x;
while ((Blue_x(1PX2)<3)&&(PX2>PX1))
PX2=PX2-1;
end
PX1=PX1-2; % 对车牌区域的修正
PX2=PX2+2;
Plate=I(PY1:PY2PX1-2:PX2:);
t=toc % 读取计时
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figureimshow(I);
figureplot(Blue_y);grid
figureplot(Blue_x);grid
figureimshow(IY);
figureimshow(Plate);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 108279 2004-01-15 05:14 车牌定位\Car.JPG
文件 1605 2014-10-18 11:21 车牌定位\test.m
文件 732379 2014-10-18 11:24 车牌定位\车牌定位.exe
目录 0 2015-02-17 09:38 车牌定位\
- 上一篇:matlab心率分析
- 下一篇:数字图像处理的MATLAB小程序
相关资源
- 基于MATLAB的车牌定位源程序
- matlab 车牌定位与分割 详细注释
- 基于MATLAB的车牌定位.zip
- matlab车牌定位识别,完整案例
- 机动车辆车牌定位检测算法研究
- Matlab完整版车牌定位识别
- 基于MATLAB中GUI的完整的车牌识别程序
- MATLAB开发了一套车牌识别系统,完成
- matlab车牌定位识别,完整案例(基于
- 车牌定位及字符识别的MATLAB程序
- 基于阈值分割的车牌定位识别的matl
- matlab 车牌定位字符分割识别完整程序
- MATLAB 汽车牌照识别程序
- Matlab车牌定位源代码
- matlab的车牌定位提取
- 47457821nicecaridentity 一个很好的车牌识
- 利用边缘检测进行车牌的定位
- matlab基于彩色图像的车牌定位只适用
评论
共有 条评论