光电图像处理课程设计车牌提取设计.docx

上传人:b****7 文档编号:16539202 上传时间:2023-07-14 格式:DOCX 页数:19 大小:507.38KB
下载 相关 举报
光电图像处理课程设计车牌提取设计.docx_第1页
第1页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第2页
第2页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第3页
第3页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第4页
第4页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第5页
第5页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第6页
第6页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第7页
第7页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第8页
第8页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第9页
第9页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第10页
第10页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第11页
第11页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第12页
第12页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第13页
第13页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第14页
第14页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第15页
第15页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第16页
第16页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第17页
第17页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第18页
第18页 / 共19页
光电图像处理课程设计车牌提取设计.docx_第19页
第19页 / 共19页
亲,该文档总共19页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

光电图像处理课程设计车牌提取设计.docx

《光电图像处理课程设计车牌提取设计.docx》由会员分享,可在线阅读,更多相关《光电图像处理课程设计车牌提取设计.docx(19页珍藏版)》请在冰点文库上搜索。

光电图像处理课程设计车牌提取设计.docx

光电图像处理课程设计车牌提取设计

 

 

 

光电图像处理课程设计说明书

 

题目 车牌提取设计 

系(部)电子与通信工程系

专业(班级)09光电2班

姓名

学号

 

目录

摘要3

关键词3

1MATLAB简介4

2车牌定位的仿真4

2.1原始图像CALLBACK:

4

2.2灰度图CALLBACK:

4

2.3边缘检测图CALLBACK:

5

2.4腐蚀图CALLBACK:

5

2.5去噪图CALLBACK:

6

2.6填充图CALLBACK:

6

2.7行合理位置图CALLBACK:

7

2.8定位图CALLBACK:

8

2.9回原图CALLBACK:

9

3车牌定位的分析10

4车牌定位的界面设计10

4.1原始图像CALLBACK:

11

4.2定位图CALLBACK:

12

5心得体会13

参考文献13

 

摘要

 

关键词

车牌定位、灰度图、边缘检测图、腐蚀图、去噪图、填充图、Matlab

 

1MATLAB简介

 

2车牌定位的仿真

2.1原始图像CALLBACK:

functionpushbutton1_Callback(hObject,eventdata,handles)

[name,path]=uigetfile('*.*','');

file=[path,name];

x=imread(file);

axes(handles.axes1);

imshow(x);

handles.img=x;

guidata(hObject,handles);

出图:

2.2灰度图CALLBACK:

functionradiobutton1_Callback(hObject,eventdata,handles)

x=handles.img;

y=rgb2gray(x);

axes(handles.axes1);

imshow(y);

handles.img1=y;

guidata(hObject,handles);

 

出图:

2.3边缘检测图CALLBACK:

functionradiobutton2_Callback(hObject,eventdata,handles)

x=handles.img1;

y=edge(x,'robert',0.15,'both');

axes(handles.axes1);

imshow(y);

handles.img2=y;

guidata(hObject,handles);

出图:

2.4腐蚀图CALLBACK:

functionradiobutton3_Callback(hObject,eventdata,handles)

x=handles.img2;

se=[1;1;1];

y=imerode(x,se);

axes(handles.axes1);

imshow(y);

handles.img3=y;

guidata(hObject,handles);

出图:

2.5去噪图CALLBACK:

functionradiobutton4_Callback(hObject,eventdata,handles)

x=handles.img3;

se=strel('rectangle',[25,25]);

y=imclose(x,se);

axes(handles.axes1);

imshow(y);

handles.img4=y;

guidata(hObject,handles);

出图:

2.6填充图CALLBACK:

functionradiobutton5_Callback(hObject,eventdata,handles)

x=handles.img4;

y=bwareaopen(x,2000);

axes(handles.axes1);

imshow(y);

handles.img5=y;

guidata(hObject,handles);

出图:

2.7行合理位置图CALLBACK:

functionradiobutton6_Callback(hObject,eventdata,handles)

I=handles.img;

I1=rgb2gray(I);

I2=edge(I1,'robert',0.15,'both');

se=[1;1;1];

I3=imerode(I2,se);

se=strel('rectangle',[25,25]);

I4=imclose(I3,se);

I5=bwareaopen(I4,2000);

[y,x,z]=size(I5);

myI=double(I5);

tic

Blue_y=zeros(y,1);%y=zeros(450,1)

fori=1:

y

forj=1:

x

if(myI(i,j,1)==1)

Blue_y(i,1)=Blue_y(i,1)+1;

end

end

end

[tempMaxY]=max(Blue_y);

PY1=MaxY;

while((Blue_y(PY1,1)>=5)&&(PY1>1))

PY1=PY1-1;

end

PY2=MaxY;

while((Blue_y(PY2,1)>=5)&&(PY2

PY2=PY2+1;

end

IY=I(PY1:

PY2,:

:

);

axes(handles.axes1);

imshow(IY);

出图:

2.8定位图CALLBACK:

functionpushbutton3_Callback(hObject,eventdata,handles)

x=handles.img;

axes(handles.axes1);

imshow(x);

functionradiobutton7_Callback(hObject,eventdata,handles)

I=handles.img;

I1=rgb2gray(I);

I2=edge(I1,'robert',0.15,'both');

se=[1;1;1];

I3=imerode(I2,se);

se=strel('rectangle',[25,25]);

I4=imclose(I3,se);

I5=bwareaopen(I4,2000);

[y,x,z]=size(I5);

myI=double(I5);

tic

Blue_y=zeros(y,1);%y=zeros(450,1)

fori=1:

y

forj=1:

x

if(myI(i,j,1)==1)

Blue_y(i,1)=Blue_y(i,1)+1;

end

end

end

[tempMaxY]=max(Blue_y);

PY1=MaxY;

while((Blue_y(PY1,1)>=5)&&(PY1>1))

PY1=PY1-1;

end

PY2=MaxY;

while((Blue_y(PY2,1)>=5)&&(PY2

PY2=PY2+1;

end

IY=I(PY1:

PY2,:

:

);

Blue_x=zeros(1,x);

forj=1:

x

fori=PY1:

PY2

if(myI(i,j,1)==1)

Blue_x(1,j)=Blue_x(1,j)+1;

end

end

end

PX1=1;

while((Blue_x(1,PX1)<3)&&(PX1

PX1=PX1+1;

end

PX2=x;

while((Blue_x(1,PX2)<3)&&(PX2>PX1))

PX2=PX2-1;

end

PX1=PX1-1;

PX2=PX2+1;

dw=I(PY1:

PY2-8,PX1:

PX2,:

);

axes(handles.axes1);

imshow(dw);

出图:

2.9回原图CALLBACK:

functionpushbutton3_Callback(hObject,eventdata,handles)

x=handles.img;

axes(handles.axes1);

imshow(x);

 

出图:

 

3车牌定位的分析

由数码相机拍摄的原始图像在形成传输或变换过程中,会受到光学系统失真、系统噪声、曝光不足或过量、相对运动等因素的影响,因此在图像处理之前必须进行预处理,包括去除噪声、边界增强、增加亮度等等。

原始图像的程序,首先通过路径、名字(path、name)保存在文件中,再经imread读取图片,最后用imshow显示图片。

其间为便于之后程序调用图像,用handles.img=x保存图片。

输入的彩色图像包含大量颜色信息,会占用较多的存储空间,且处理时也会降低系统的执行速度,因此常将彩色图像转换为灰度图像,灰度图调用函数y=rgb2gray(x)。

边缘检测可以使图像的轮廓更加突出,调用函数y=edge(x,'robert',0.15,'both')。

腐蚀图使边缘化后的图像去掉周围不需提取的信息,调用函数se=[1;1;1];y=imerode(x,se)。

然后去噪图是进一步对图像信息的刷选,函数为se=strel('rectangle',[25,25]);y=imclose(x,se);填充图是对腐蚀图进行扩充,使需要的信息量增大,调用函数y=bwareaopen(x,2000),合理调整各个参数可以选择所需车牌信息的区域。

合理位置定位图是计算边缘图像的投影面积,寻找峰谷点,大致确定车牌位置,最后再计算此连通域内的宽高比,剔除不在域值范围内的连通域,最后确定定位图。

4车牌定位的界面设计

 

界面图:

4.1原始图像CALLBACK:

functionpushbutton1_Callback(hObject,eventdata,handles)

[name,path]=uigetfile('*.*','');

file=[path,name];

x=imread(file);

axes(handles.axes1);

imshow(x);

handles.img=x;

guidata(hObject,handles);

出图:

4.2定位图CALLBACK:

functionpushbutton3_Callback(hObject,eventdata,handles)

x=handles.img;

axes(handles.axes1);

imshow(x);

functionradiobutton7_Callback(hObject,eventdata,handles)

I=handles.img;

I1=rgb2gray(I);

I2=edge(I1,'robert',0.15,'both');

se=[1;1;1];

I3=imerode(I2,se);

se=strel('rectangle',[25,25]);

I4=imclose(I3,se);

I5=bwareaopen(I4,2000);

[y,x,z]=size(I5);

myI=double(I5);

tic

Blue_y=zeros(y,1);%y=zeros(450,1)

fori=1:

y

forj=1:

x

if(myI(i,j,1)==1)

Blue_y(i,1)=Blue_y(i,1)+1;

end

end

end

[tempMaxY]=max(Blue_y);

PY1=MaxY;

while((Blue_y(PY1,1)>=5)&&(PY1>1))

PY1=PY1-1;

end

PY2=MaxY;

while((Blue_y(PY2,1)>=5)&&(PY2

PY2=PY2+1;

end

IY=I(PY1:

PY2,:

:

);

Blue_x=zeros(1,x);

forj=1:

x

fori=PY1:

PY2

if(myI(i,j,1)==1)

Blue_x(1,j)=Blue_x(1,j)+1;

end

end

end

PX1=1;

while((Blue_x(1,PX1)<3)&&(PX1

PX1=PX1+1;

end

PX2=x;

while((Blue_x(1,PX2)<3)&&(PX2>PX1))

PX2=PX2-1;

end

PX1=PX1-1;

PX2=PX2+1;

dw=I(PY1:

PY2-8,PX1:

PX2,:

);

axes(handles.axes1);

imshow(dw);

出图:

5心得体会

参考文献

1、张弘.数字图像处理[M].机械工业出版社;

2、含数值计算、绘图、界面仿真内容的MATLAB书籍;

3、相关网站。

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 经管营销

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2