% ******************************************************
%
% time : 2021/05/26 17:12
% tip : 车牌识别
% change:
% *******************************************************
function varargout = CarId(varargin)
% CARID MATLAB code for CarId.fig
% CARID, by itself, creates a new CARID or raises the existing
% singleton*.
%
% H = CARID returns the handle to a new CARID or the handle to
% the existing singleton*.
%
% CARID('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in CARID.M with the given input arguments.
%
% CARID('Property','Value',...) creates a new CARID or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before CarId_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to CarId_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 CarId
% Last Modified by GUIDE v2.5 26-May-2021 20:30:44
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @CarId_OpeningFcn, ...
'gui_OutputFcn', @CarId_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 CarId is made visible.
function CarId_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 CarId (see VARARGIN)
% Choose default command line output for CarId
handles.output = hObject;
%隐藏坐标轴
set(handles.axes1,'visible','off');
set(handles.axes2,'visible','off');
set(handles.axes3,'visible','off');
set(handles.axes4,'visible','off');
set(handles.axes5,'visible','off');
set(handles.axes6,'visible','off');
set(handles.axes7,'visible','off');
set(handles.axes8,'visible','off');
set(handles.axes9,'visible','off');
set(handles.axes10,'visible','off');
set(handles.axes11,'visible','off');
set(handles.axes12,'visible','off');
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes CarId wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = CarId_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;
%======================my code========================%
% tip : 被删除的callback自己手动添加一下...55555.....
function openLocal_Callback(hObject,eventdata,handles)
[filename, pathname]=uigetfile({'*.jpg; *.png; *.bmp; *.tif';'*.png';'All Image Files';'*.*'},'请选择图片路径');
if pathname==0
return;
end
I=imread([pathname filename]);
%显示原图
axes(handles.axes1) %将Tag值为axes1的坐标轴置为当前
imshow(I,[]); %解决图像太大无法显示的问题.why?貌似会自动缩放
title('原图');
handles.I=I; %更新图像
% Update handles structure
guidata(hObject, handles);
function openCamera_Callback(hObject,eventdata,handles)
imaqhwinfo
vid = videoinput('winvideo',1);
usbVidRes1=get(vid,'videoResolution');%获取视频的尺寸
nBands1=get(vid,'NumberOfBands');%采集视频的颜色通道
axes(handles.axes1);
hImage1=imshow(zeros(usbVidRes1(2),usbVidRes1(1),nBands1));
preview(vid,hImage1);
handles.vid=vid;
% Update handles structure
guidata(hObject, handles);
function btnTakePhoto_Callback(hObject,eventdata,handles)
vid=handles.vid;
frame = getsnapshot(vid);
axes(handles.axes1);
imwrite(frame,'I.png');
I=imread('I.png');
axes(handles.axes1) %将Tag值为axes1的坐标轴置为当前
imshow(I,[]); %解决图像太大无法显示的问题.why?貌似会自动缩放
title('拍摄完成');
handles.I=I; %更新原图
% Update handles structure
guidata(hObject, handles);
%下面在使用原图方法: handles.I
% --- Executes on button press in btnGray2.
function btnGray2_Callback(hObject, eventdata, handles)
% hObject handle to btnGray2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
I=handles.Cut;
I = rgb2gray(I);
axes(handles.axes8) %将Tag值为axes1的坐标轴置为当前
imshow(I,[]); %解决图像太大无法显示的问题.why?貌似会自动缩放
title('灰度处理');
handles.gray2=I; %更新原图
% Update handles structure
guidata(hObject, handles);
% --- Executes on button press in btnBalance.
function btnBalance_Callback(hObject, eventdata, handles)
% hObject handle to btnBalance (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
I=handles.gray2;
I = histeq(I);
axes(handles.axes9) %将Tag值为axes1的坐标轴置为当前
imshow(I,[]); %解决图像太大无法显示的问题.why?貌似会自动缩放
title('直方图均衡化');
handles.balance=I; %更新原图
% Update handles structure
guidata(hObject, handles);
% --- Executes on button press in btnDouble.
function btnDouble_Callback(hObject, eventdata, handles)
% hObject handle to btnDouble (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
I=handles.balance;
I = im2bw(I, 0.76);
axes(handles.axes10) %将Tag值为axes1的坐标轴置为当前
imshow(I,[]); %解决图像太大无法显示的问题.why?貌似会自动缩放
title('图像二值化');
handles.double=I; %更新原图
% Update handles structure
guidata(hObject, handles);
% --- Executes on button press in btnMid.
function btnMid_Callback(hObject, eventdata, handles)
% hObject handle to btnMid (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
I=handles.double;
I = medfilt2(I);
axes(handles.axes11) %将Tag值为axes1的坐标轴置为当前
imshow(I,[]); %解决图像太大无法显示的问题.why?貌似会自动缩放
title('中值滤波');
handles.Mid=I; %更新原图
% Update handles structure
guidata(hObject, handles);
% --- Executes on button press in btnCut2.
function btnCut2_Callback(hObject, eventdata, handles)
% hObject handle to btnCut2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
I=handles.Mid;
I = my_imsplit(I); %切割图像
[m, n] = size(I);
s = sum(I); %sum(x)就是竖向相加,求每列的和,结果是行向量;
j = 1;
k1 = 1;
k2 = 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(I(:, [k1+5:k2-5])));
I(:, k1+num+5) = 0;
end
end
y1 = 10;
y2 = 0.25;
flag = 0;
word1 = [];
while flag == 0
[m, n] = size(I);
left = 1;
width = 0;
while sum(I(:, width+1)) ~= 0
width = width + 1;
end
if width < y1
I(:, [1:width]) = 0;
I = my_imsplit(I)
没有合适的资源?快使用搜索试试~ 我知道了~
【车牌识别】基于matlab GUI模板匹配车牌识别【含Matlab源码 958期】.zip
共63个文件
jpg:58个
m:3个
fig:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 133 浏览量
2023-11-25
18:10:12
上传
评论
收藏 1.15MB ZIP 举报
温馨提示
CSDN海神之光上传的代码均可运行,亲测可用,直接替换数据即可,适合小白; 1、代码压缩包内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主或扫描博客文章底部QQ名片; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作 车牌识别:BP神经网络车牌识别、CNN卷积神经网络车牌识别、模板匹配车牌识别、汽车出入库收费系统、蓝色、绿色、黄色车牌识别、新能源车牌识别
资源推荐
资源详情
资源评论
收起资源包目录
【车牌识别】基于matlab GUI模板匹配车牌识别【含Matlab源码 958期】.zip (63个子文件)
【车牌识别】基于matlab GUI模板匹配车牌识别【含Matlab源码 958期】
运行结果2.JPG 120KB
2.jpg 676B
运行结果3.JPG 111KB
6.jpg 698B
1.jpg 891B
CarId.m 17KB
CarId.asv 14KB
5.jpg 764B
my_imsplit.m 705B
model
Y.jpg 668B
辽.jpg 14KB
C.jpg 771B
苏.jpg 824B
2.jpg 12KB
E.jpg 12KB
Z.jpg 12KB
N.jpg 12KB
贵.jpg 898B
k.jpg 764B
6.jpg 797B
S.jpg 12KB
M.jpg 772B
R.jpg 12KB
1.jpg 482B
L.jpg 598B
J.jpg 566B
B.jpg 884B
F.jpg 11KB
京.jpg 890B
P.jpg 656B
5.jpg 12KB
0.jpg 660B
T.jpg 11KB
浙.jpg 787B
A.jpg 806B
G.jpg 12KB
8.jpg 789B
陕.jpg 867B
D.jpg 662B
X.jpg 797B
W.jpg 12KB
U.jpg 12KB
I.jpg 11KB
Q.jpg 828B
3.jpg 793B
鲁.jpg 858B
7.jpg 583B
O.jpg 12KB
H.jpg 439B
V.jpg 793B
9.jpg 778B
豫.jpg 918B
4.jpg 12KB
车牌
车牌图片
car2.jpg 1.45MB
car4.jpg 31KB
car1.jpg 22KB
getword.m 2KB
3.jpg 653B
7.jpg 447B
车牌图像.jpg 2KB
CarId.fig 167KB
4.jpg 693B
运行结果.JPG 117KB
共 63 条
- 1
资源评论
海神之光
- 粉丝: 5w+
- 资源: 6109
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- C183579-123578-c1235789.jpg
- Qt5.14 绘画板 Qt Creator C++项目
- python实现Excel表格合并
- Java实现读取Excel批量发送邮件.zip
- 【java毕业设计】商城后台管理系统源码(springboot+vue+mysql+说明文档).zip
- 【java毕业设计】开发停车位管理系统(调用百度地图API)源码(springboot+vue+mysql+说明文档).zip
- 星耀软件库(升级版).apk.1
- 基于Django后端和Vue前端的多语言购物车项目设计源码
- 基于Python与Vue的浮光在线教育平台源码设计
- 31129647070291Eclipson MXS R.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功