資源簡(jiǎn)介
GUI界面可以很好的實(shí)現(xiàn)車牌識(shí)別,加停車場(chǎng)管理,有打開圖片、
灰度處理、二值化處理、腐蝕處理、車牌定位、一鍵識(shí)別入庫(kù)、車輛信息、待開出車庫(kù)車輛、待入庫(kù)車輛等等信息、自動(dòng)入庫(kù),手動(dòng)入庫(kù),信息很全,可以拿來(lái)很好的學(xué)習(xí)。

代碼片段和文件信息
function?varargout?=?lpr_gui(varargin)
gui_Singleton?=?1;
gui_State?=?struct(‘gui_Name‘???????mfilename?...
???????????????????‘gui_Singleton‘??gui_Singleton?...
???????????????????‘gui_OpeningFcn‘?@lpr_gui_OpeningFcn?...
???????????????????‘gui_OutputFcn‘??@lpr_gui_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
function?lpr_gui_OpeningFcn(hobject?eventdata?handles?varargin)
handles.output?=?hobject;
guidata(hobject?handles);
set(handles.axes1‘visible‘‘off‘)
set(handles.axes2‘visible‘‘off‘)
set(handles.text2‘visible‘‘off‘)
set(handles.text6‘visible‘‘off‘)
set(handles.text3‘visible‘‘off‘)
%?---?Outputs?from?this?function?are?returned?to?the?command?line.
function?varargout?=?lpr_gui_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;
function?pushbutton1_Callback(hobject?eventdata?handles)
%%??導(dǎo)入圖片
global?img;
set(handles.axes1‘visible‘‘off‘)
set(handles.axes2‘visible‘‘off‘)
set(handles.text6‘visible‘‘off‘)
set(handles.text3‘visible‘‘off‘)
set(handles.text5‘visible‘‘off‘)
set(handles.text2‘visible‘‘on‘)
?[filenamepathname]=uigetfile({‘*.jpg‘;‘*.bmp‘;‘*.gif‘}‘選擇圖片‘);
if?isequal(filename0)
????disp(‘Users?Selected?Canceled‘);
else
str=[pathname?filename];
img?=?imread(str);
axes(handles.axes1);%axes1是坐標(biāo)軸的標(biāo)示
%?set(handles.axes1‘visible‘‘on‘)
imshow(img);
end;
function?pushbutton2_Callback(hobject?eventdata?handles)
global?img;
set(handles.axes2‘visible‘‘off‘)
axes(handles.axes1);%axes1是坐標(biāo)軸的標(biāo)示
%?set(handles.axes1‘visible‘‘on‘)
imshow(img);
I1=rgb2gray(img);
%subplot(232)imshow(I1);title(‘灰度圖‘);
%subplot(233)imhist(I1);title(‘灰度圖直方圖‘);
I2=edge(I1‘canny‘[0.20.55]);
%subplot(234);imshow(I2);title(‘canny算子邊緣檢測(cè)‘)
se=[1;1;1];
I3=imerode(I2se);
%subplot(235);imshow(I3);title(‘腐蝕后圖像‘);
se=strel(‘rectangle‘[3030]);
I4=imclose(I3se);
%?figure(5)imshow(I4);title(‘平滑圖像的輪廓‘);
I5=bwareaopen(I43500);
%subplot(236);imshow(I5);title(‘從對(duì)象中移除小對(duì)象‘);
[yx~]=size(I5);
myI=double(I5);
%begin橫向掃描
Blue_y=zeros(y1);
for?i=1:y
????for?j=1:x
????????if(myI(ij1)==1)
????????????%如果myI(ij1)即myI圖像中坐標(biāo)為(ij)的點(diǎn)為藍(lán)色
????????????%則Blue_y的相應(yīng)行的元素white_y(i1)值加1
????????????Blue_y(i1)=?Blue_y(i1)+1;%藍(lán)色像素點(diǎn)統(tǒng)計(jì)
????????end
????end
end
[~MaxY]=max(Blue_y);%temp為向量white_y的元素中的最大值,MaxY為該值的索引(?在向量中的位置)
PY1=MaxY;
while?((Blue_y(PY11)>=50)&&(PY1>1))
????PY1=PY1-1;
end
PY2=MaxY;
while?((Blue_y(PY21)>=10)&&(PY2 ????PY2=PY2+1;
end
%?IY=img(PY1:PY2
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
????..A.SH.????????46??2017-05-04?13:41??模板匹配_GUI界面_停車場(chǎng)演示\desktop.ini
?????文件???????9883??2017-05-04?17:36??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\jilu.xlsx
?????文件??????49237??2017-05-04?21:39??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\lpr_gui.fig
?????文件??????30292??2017-05-04?21:39??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\lpr_gui.m
?????文件????4292793??2017-03-02?20:27??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\matlab模擬演示停車場(chǎng).gif
?????文件??????21918??2017-03-03?18:37??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\new\chepai1.jpg
?????文件??????22375??2017-03-03?18:38??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\new\chepai17.jpg
?????文件??????28294??2017-03-03?18:38??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\new\chepai26.jpg
?????文件??????11273??2017-03-03?18:37??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\new\chepai9.jpg
?????文件??????27246??2017-03-03?18:38??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\new\云AMP526.jpg
?????文件??????65171??2017-03-03?18:38??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\new\粵B0K999.jpg
?????文件??????32284??2017-03-03?18:38??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\new\鄂A28076.jpg
?????文件??????19985??2017-03-03?18:38??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\new\鄂AN1366.jpg
?????文件??????19123??2017-03-03?18:38??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\new\魯JD9309.jpg
?????文件?????187083??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\14.jpg
?????文件?????287408??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\15.jpg
?????文件?????185698??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\18.jpg
?????文件?????240790??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\21.jpg
?????文件?????185824??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\27.jpg
?????文件?????173338??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\32.jpg
?????文件?????212242??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\37.jpg
?????文件?????186722??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\38.jpg
?????文件?????161024??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\39.jpg
?????文件?????217957??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\44.jpg
?????文件?????144534??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\6.jpg
?????文件?????166318??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\7.jpg
?????文件?????201222??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\8.jpg
?????文件?????284135??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\9?-?副本.jpg
?????文件?????284135??2016-04-15?22:58??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\9.jpg
?????文件?????714164??2016-12-18?09:14??模板匹配_GUI界面_停車場(chǎng)演示\模板匹配_GUI界面_停車場(chǎng)演示\picture\加霧處理2.jpg
............此處省略147個(gè)文件信息
評(píng)論
共有 條評(píng)論