matlab提取车牌字符程序,如何用matlab提取和识别车牌数?
我想开发一个matlab程序,可以用模板匹配方法提取和识别车辆的车牌号.
这是我的代码:
function letters = PengenalanPlatMobil(citra)
%load NewTemplates
%global NewTemplates
citra=imresize(citra,[400 NaN]); % Resizing the image keeping aspect ratio same.
citra_bw=rgb2gray(citra); % Converting the RGB (color) image to gray (intensity).
citra_filt=medfilt2(citra_bw,[3 3]); % Median filtering to remove noise.
se=strel('disk',1);
citra_dilasi=imdilate(citra_filt,se); % Dilating the gray image with the structural element.
citra_eroding=imerode(citra_filt,se); % Eroding the gray image with structural element.
citra_edge_enhacement=imsubtract(citra_dilasi,citra_eroding); % Morphological Gradient for edges enhancement.
imshow(citra_edge_enhacement);
citra_edge_enhacement_double=mat2gray(double(citra_edge_enhacement)); % Converting the class to double.
citra_double_konv=conv2(citra_edge_enhacement_double,[1 1;1 1]); % Convolution of the double image f
citra_intens=imadjust(citra_double_konv,[0.5 0.7],[0 1],0.1); % Intensity scaling between the range 0 to 1.
citra_logic=logical(citra_intens); % Conversion of the class from double to binary.
% Eliminating the possible horizontal lines from the output image of regiongrow
% that could be edges of license plate.
citra_line_delete=imsubtract(citra_logic, (imerode(citra_logic,strel('line',50,0))));
% Filling all the regions of the image.
citra_fill=imfill(citra_line_delete,'holes');
% Thinning the image to ensure character isolation.
citra_thinning_eroding=imerode((bwmorph(citra_fill,'thin',1)),(strel('line',3,90)));
%Selecting all the regions that are of pixel area more than 100.
citra_final=bwareaopen(citra_thinning_eroding,125);
[labelled jml] = bwlabel(citra_final);
% Uncomment to make compitable with the previous versions of MATLAB®
% Two properties 'BoundingBox' and binary 'Image' corresponding to these
% Bounding boxes are acquired.
Iprops=regionprops(labelled,'BoundingBox','Image');
%%% OCR STEP
[letter{1:jml}]=deal([]);
[gambar{1:jml}]=deal([]);
for ii=1:jml
gambar= Iprops(ii).Image;
letter{ii}=readLetter(gambar);
% imshow(gambar);
%
end
end
但识别出的数字总是错误的,检测到的数量太多或有时太少.
怎么解决?
matlab提取车牌字符程序,如何用matlab提取和识别车牌数?相关推荐
- matlab可以节定积分方程,如何用matlab如何实现数值积分
点击查看如何用matlab如何实现数值积分具体信息 答:用matlab可以如下数值积分法,来求解定积分.二重积分.三重积分的数值解问题. 1.梯形数值积分计算 trapz() X = 0:pi/100 ...
- 用matlab处理表格,matlab删除excel表格数据-如何用matlab处理多个excel表格中的数据...
如何用matlab处理多个excel表格中的数据 biao='D:\Program Files\matlab\bin\filename.xls'; A1=xlsread (biao,'Sheet1', ...
- matlab画平面心型线,如何用matlab画出心形线
心形线,是一个圆上的固定一点在它绕着与其相切且半径相同的另外一个圆周滚动时所形成的轨迹线.下面就简单讲解一下如何用matlab画出心形线. 1.心形线的数学定义 2.编制的绘制心形线的matlab程序 ...
- matlab批量导入excel表格数据,matlab导入excel表格数据-如何用matlab读取多个excel表格数据,将每个表格数......
如何用matlab读取多个excel表格数据,将每个表格数... 一xlsread()函数,比import简单的多,具体语句:A = xlsread('yourfilename.xls')望高手支招! ...
- matlab高斯白噪声频谱图,如何用MATLAB产生高斯白噪声,并且画出图形?
如何用MATLAB产生高斯白噪声,并且画出图形? 来源:互联网 宽屏版 评论 2009-06-19 02:34:10 分类: 电脑/网络 >> 程序设计 >> 其他编程语言 ...
- pid算法matlab仿真程序和c程序,pid算法matlab仿真程序和c程序.doc
pid算法matlab仿真程序和c程序.doc 1 增量式 PID 控制算 法 Matlab 仿真程序 设一被控对象 G(s) =50/(0.125s^2+7s),用增量式 PID 控制 算法编写仿真 ...
- matlab能否独立做程序,如何将MATLAB程序编译成独立可执行的程序
如何将MATLAB程序编译成独立可执行的程序?如何将编译好的独立可执行程序发布在没有安装MATLAB的电脑上?下面将一步步实现: 一.生成独立可执行的程序(exe文件)步骤 1.安装编译器.可有多种选 ...
- sbm matlab,超效率sbm模型matlab-如何用matlab估计空间杜宾模型
超效率sbm模型matlab-如何用matlab估计空间杜宾模型 所属分类:宝牧问答 发布时间:2020-10-12 09:54:58 如何用matlab估计空间杜宾模型 你怎么还没解决?实在看去了. ...
- matlab规定形式化简多项式,如何用matlab化简多项式
问题描述: 如何用matlab化简多项式 w=(5000*x1+7000*x2+12000*x3+15000*x4+10000*x5)*0.015+101*(0.75*x1+0.9*x2+1.3*x3 ...
最新文章
- python处理完数据导入数据库_python操作数据库之批量导入
- 算法设计与分析(第三周)递归/迭代求Fibonacci前n项 【以及递归算法速度慢的原因】
- Spring中引入其他配置文件
- 从JDK中,我们能学到哪些设计模式?
- 操作系统 第一章 计算机系统概述
- 当心币圈高仿号!也别指望AI,它有心无力
- 启用Exchange邮箱审核后使用命令Search-MailboxAuditLog返回结果为空
- 西门子的十一位CEO
- 片假名翻译软件测试,怎么写软件测试用例
- 11计算机专业vb试题答案,11计算机专业VB试题(二).doc
- Kaggle首战拿金牌总结!
- c语言中的面积和体积计算器,C语言编程问题(面积计算器)——新手问题
- 中科院软件所的毕业去向(硕+博)
- 游戏服务器更新文件,如何配置网吧游戏更新服务器
- 程序员幽默:39个奇葩代码注释,每一个都能笑抽
- r语言和rstudio_R和RStudio简介
- java捕鱼达人程序设计_捕鱼达人(Java版)
- 大魔王程序员生成记#06.2#C语言习题
- ERROR: node with name rabbit already running的解决方法
- git学习笔记(全,附命令大全)