function varargout = chepaishibiegui(varargin)
% CHEPAISHIBIEGUI MATLAB code for chepaishibiegui.fig
% CHEPAISHIBIEGUI, by itself, creates a new CHEPAISHIBIEGUI or raises the existing
% singleton*.
%
% H = CHEPAISHIBIEGUI returns the handle to a new CHEPAISHIBIEGUI or the handle to
% the existing singleton*.
%
% CHEPAISHIBIEGUI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in CHEPAISHIBIEGUI.M with the given input arguments.
%
% CHEPAISHIBIEGUI('Property','Value',...) creates a new CHEPAISHIBIEGUI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before chepaishibiegui_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to chepaishibiegui_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help chepaishibiegui
% Last Modified by GUIDE v2.5 01-12-2020 17:50:29
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @chepaishibiegui_OpeningFcn, ...
'gui_OutputFcn', @chepaishibiegui_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before chepaishibiegui is made visible.
function chepaishibiegui_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to chepaishibiegui (see VARARGIN)
% Choose default command line output for chepaishibiegui
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes chepaishibiegui wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = chepaishibiegui_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[fname,pname,index] = uigetfile({'*.jpg';'*.bmp'},'选择图片');
if index
str = [pname fname];
c = imread(str);
axes(handles.chepai);
imshow(c);
I = c;
title('测试图像');
I1=rgb2gray(I);
I2=edge(I1,'roberts',0.18,'both');
se=[1;1;1];
I3=imerode(I2,se);
se=strel('rectangle',[25,25]);
I4=imclose(I3,se);
[n1, n2] = size(I4);
I4(1:round(n1/3), 1:n2) = 0;
r = floor(n1/10);
c = floor(n2/10);
I4(1:r,:)=0;
I4((9*r):n1,:)=0;
I4(:,1:c)=0;
I4(:,(c*9):n2)=0;
I5=bwareaopen(I4,200);
[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;
end
end
end
[temp MaxY] = 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<y))
PY2=PY2+1;
end
IY=I(PY1:PY2,:,:);
% figure,imshow(IY);
Blue_x=zeros(1,x);
for j=1:x
for i=PY1:PY2
if(myI(i,j,1)==1)
Blue_x(1,j)=Blue_x(1,j)+1;
end
end
end
% [tempx MaxX] = max(Blue_x);
PX1=1;
[Irow,Icol,Idisanwei] = size(I);
while((Blue_x(1,PX1)<3)&&(PX1<x))
PX1=PX1+1;
end
PX2=x;
while ((Blue_x(1,PX2)<3)&&(PX2>PX1))
PX2=PX2-1;
end
PX1=PX1-1;
PX2=PX2;
% dw=I(PY1:(PY2-8),PX1:PX2,:);
dw=I((PY1):(PY2),PX1:PX2,:);
t=toc;
if ((PX2-PX1)/(PY2-PY1))>4.6
PX1=1;
[Irow,Icol,Idisanwei] = size(I);
while((Blue_x(1,PX1)<11)&&(PX1<x))
PX1=PX1+1;
end
PX2=x;
while ((Blue_x(1,PX2)<11)&&(PX2>PX1))
PX2=PX2-1;
end
PX1=PX1-1;
PX2=PX2;
dw=I((PY1):(PY2),PX1:PX2,:);
end
imwrite(dw,'dw.jpg');
a=imread('dw.jpg');
axes(handles.chepaijieguo)
imshow(a)
title('车牌分割结果')
b=rgb2gray(a);
imwrite(b,'gray licence plate.jpg');
g_max=double(max(max(b)));
g_min=double(min(min(b)));
T=round(g_max-(g_max-g_min)/3);
[m,n]=size(b);
d=(double(b)>=T);
imwrite(d,'binary licence plate.jpg');
h=fspecial('average',3);
d=im2bw(round(filter2(h,d)));
imwrite(d,'after average licence plate.jpg');
se=eye(2);
[m,n]=size(d);
if bwarea(d)/m/n>=0.365
d=imerode(d,se);
elseif bwarea(d)/m/n<=0.235
d=imdilate(d,se);
end
imwrite(d,'expansion or corrosion the licence plate.jpg');
[dw1,dw2,dw3]=size(dw);
fanwei = round(0.0026*dw1*dw2);
d=bwareaopen(d,fanwei);
d=qiege(d);
[m,n]=size(d);
if (n/m)<4
row = m-(n/(4.1));
d = d(round(row):m,1:n);
end
k1=1;
k2=1;
s=sum(d);
j=1;
while j~=n
while s(j)==0
j=j+1;
end
k1=j;
while s(j)~=0&&j<=n-1
j=j+1;
end
k2=j-1;%
if k2-k1>=round(n/6.5)%
[val,num]=min(sum(d(:,[k1+5:k2-5])));%
d(:,k1+num+5)=0; %
end
end
% 再切割
d=qiege(d);
y1=10;y2=0.25;flag=0;word1=[];
while flag==0
[m,n]=size(d);
left=1;wide=0;
while sum(d(:,wide+1))~=0
wide=wide+1;
end
if (wide<5)&&(sum(d(:,wide+1))<(10/m))
d(:,[1:wide])=0;
d=qiege(d);
else
temp=qiege(imcrop(d,[1 1 wide m]));
[m,n]=size(temp);
all=sum(sum(temp));
two_thirds=sum(sum(temp([round(m/3):2*round(m/3)],:)));
if two_thirds/all>y2
flag=1;word1=temp; % WORD 1
end
d(:,[1:wide])=0;d=qiege(d);
end
end
[word2,d]=getword(d);
[word2row,word2col] = size(word2);
whitesizeofword2 = round(word2row*word2col/12)+1;
word2=bwareaopen(word2,whitesizeofword2);
word2=qiege(word2);
% 分割出第三个字符
[word3,d]=getword(d);
% 分割出第四个字符
[word4,d]=getword(d);
% 分割出第五个字符
[word5,d]=getword(d);
% 分割出第六个字符
[word6,d]=getword(d);
[word6row,word6col] = size(word6);
whitesizeofword6 = round(word6row*word6col/12)+1;
word6=bwareaopen(word6,whitesizeofword6);
word6=qiege(word6);
% 分割出第七个字符
[word7,d]=getword(d);
[m,n]=size(word1);
word1=imresize(word1,[32 16]);
word2=wordprocess(word2);
word3=wordprocess(word3);
word4=wordprocess(word4);
word5=wordprocess(word5);
word6=wordprocess(word6);
word7=wordprocess(word7);
axes(handles.zifu1);
imshow(word1);
title('1')
axes(handles.zifu2);
没有合适的资源?快使用搜索试试~ 我知道了~
MATLAB车牌识别[算法对比,GUI],基于matlab的车牌识别算法,matlab
共89个文件
bmp:67个
jpg:15个
m:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 18 下载量 121 浏览量
2021-09-10
19:45:36
上传
评论 3
收藏 1.39MB ZIP 举报
温馨提示
该课题为基于MATLAB的汽车出入库识别系统,带有丰富的人机交互GUI界面。目前毕业设计选题中,传统的中规中矩的车牌识别不易得到高分,必须要在此基础上有所创新方得可以避开其他雷同课题,不会轻易被导师被否决而导致毕设不过。因此建议在车牌识别基础上加入多种方法的对比,看看哪种方法的精度高。虽然目前有很多方法的车牌识别,但是都是在各自的测试库里面测试的,比如测试的车牌图像不同,字符库不同,导致无法做对比。整个设计在一个GUI界面上完成。
资源推荐
资源详情
资源评论
收起资源包目录
MATLAB车牌识别[算法对比,GUI],基于matlab的车牌识别算法,matlab源码.zip (89个子文件)
MATLAB车牌识别[算法对比,GUI]
源码GUI
gray licence plate.jpg 2KB
测试车牌图像
1.jpg 107KB
5.jpg 30KB
dw.jpg 2KB
getword.m 920B
2.jpg 636B
qiege.m 542B
binary licence plate.jpg 2KB
运行方式.doc 336KB
6.jpg 637B
1.jpg 533B
wordprocess.m 455B
chepaishibiegui.m 12KB
chepaishibiegui.fig 23KB
example
15.bmp 2KB
17.bmp 2KB
11.bmp 2KB
33.bmp 2KB
32.bmp 2KB
4.bmp 2KB
16.bmp 2KB
63.bmp 2KB
27.bmp 2KB
13.bmp 2KB
64.bmp 2KB
50.bmp 2KB
24.bmp 2KB
55.bmp 2KB
39.bmp 2KB
45.bmp 2KB
40.bmp 2KB
59.bmp 2KB
29.bmp 2KB
31.bmp 2KB
47.bmp 2KB
18.bmp 2KB
53.bmp 2KB
1.bmp 2KB
42.bmp 2KB
22.bmp 2KB
7.bmp 2KB
5.bmp 2KB
56.bmp 2KB
37.bmp 2KB
14.bmp 2KB
66.bmp 2KB
60.bmp 2KB
12.bmp 2KB
65.bmp 2KB
30.bmp 2KB
19.bmp 2KB
2.bmp 2KB
6.bmp 2KB
10.bmp 2KB
36.bmp 2KB
67.bmp 2KB
26.bmp 2KB
46.bmp 2KB
41.bmp 2KB
48.bmp 2KB
52.bmp 2KB
3.bmp 2KB
34.bmp 2KB
57.bmp 2KB
8.bmp 2KB
9.bmp 2KB
61.bmp 2KB
21.bmp 2KB
20.bmp 2KB
28.bmp 2KB
49.bmp 2KB
54.bmp 2KB
25.bmp 2KB
35.bmp 2KB
62.bmp 2KB
43.bmp 2KB
38.bmp 2KB
44.bmp 2KB
58.bmp 2KB
51.bmp 2KB
23.bmp 2KB
4.jpg 634B
per_deal.m 254B
5.jpg 573B
运行截图.jpg 850KB
expansion or corrosion the licence plate.jpg 2KB
after average licence plate.jpg 2KB
7.jpg 637B
3.jpg 633B
共 89 条
- 1
lithops7
- 粉丝: 352
- 资源: 4450
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 电子元件行业知名厂商官网(TI/NXP/ST/Infineon/ADI/Microchip/Qualcomm/Diodes/Panasonic/TDK/TE/Vishay/Molex等)数据样例
- Cytoscape-3-10-0-windows-64bit.exe
- 基于STM32设计的宠物投喂器项目源代码(高分项目).zip
- 机器学习音频训练文件-24年抖音金曲
- 工业以太网无线通信解决方案
- multisim 仿真ADS8322仿真
- Profinet转EtherCAT主站网关
- Python图片处理:svg标签转png
- k8s各个yaml配置参考.zip
- DB15-Adapter-BOM - 副本.xls
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
前往页