资源简介
本文主要要实现字符识别,识别方法是用模板匹配。内容包含模板,待识别字符,完整程序。希望大家能够帮助大家。

代码片段和文件信息
%%%%%%%%%%%%%%%%%%%基于模板匹配的字符识别
templatePath=‘G:\licenseTemple\‘;
fileFormat=‘.bmp‘;
templateImage=zeros(402036);
Timage=zeros(36800);
for i=1:36 %读取模板
stri=num2str(i-1);
imagePath=[templatePathstrifileFormat];
tempImage=imread(imagePath);
templateImage(::i)=tempImage;
clear imagePath stri tempImage;
end
characterImage=zeros(40206);
Uimage=zeros(6800);
characterPath=‘G:\matlab--wavlet\‘;
charFileFormat=‘.jpg‘;
for i=1:6%读取待识别字符
stri=num2str(i);
imagePath=[characterPathstricharFileFormat];
tempImage=imread(imagePath);
characterImage(::i)=tempImage;
clear imagePath stri tempImage;
end
%V=zeros(136);
%5X=zeros(136);
%5W=zeros(136);
%U=zeros(16);
%T=zeros(136);
Y=zeros(136);
for i=1:6
U=length(find( characterImage(::i))~=0);
for j=1:36
T=length(find( templateImage(::j))~=0);
tempV=characterImage(::i)& templateImage(::j);
V=length(find(tempV)~=0);
tempW=xor(tempVtemplateImage(::j));
W=length(find(tempW)~=0);
tempX=xor(tempVcharacterImage(::i));
X=length(find(tempX)~=0);
TUV=(T+U+V)/3;
tempSum=sqrt(((T-TUV)*(T-TUV)+(U-TUV)*(U-TUV)+(V-TUV)*(V-TUV))/2);
Y(j)=V/(W/T*X/U*tempSum);
end
[MAXindexMax]=max(Y);
stri=num2str(indexMax-1);
imagePath=[templatePathstrifileFormat];
image=imread(imagePath);
figure(i);
imshow(image);
clear imagePath indexMax;
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1578 2014-06-24 15:20 characterTemplateRecgnition\characterTemplateRecognition.m
文件 1878 2014-05-08 09:15 characterTemplateRecgnition\templateCharacter\0.bmp
文件 1878 2014-05-08 14:37 characterTemplateRecgnition\templateCharacter\1.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\10.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\11.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\12.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\13.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\14.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\15.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\16.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\17.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\18.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\19.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\2.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\20.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\21.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\22.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\23.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\24.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\25.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\26.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\27.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\28.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\29.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\3.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\30.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\31.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\32.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\33.bmp
文件 1878 2014-05-08 09:20 characterTemplateRecgnition\templateCharacter\34.bmp
............此处省略50个文件信息
- 上一篇:基于OpenCV的车牌定位
- 下一篇:Verilog四位超前进位全加器
相关资源
- 手写数字识别-模板匹配法
- 阿拉伯数字字符识别的简单识别
- 一种基于模板匹配的人民币编号识别
- Matalb实现停车场完整系统
- halcon中使用一种新思路来模板匹配的
- 快递单邮政编码识别系统的实现
- 中文车牌字符识别训练数据
- 我的字符识别模式识别完整毕业设计
- 英文字母识别
- 3种模板匹配法实现的手写数字识别
- 简单手写字符识别简单web界面手写
- 车牌识别课程设计,能运行,模板匹
- 车牌字符识别的demo
- opencv手写英文字符识别
- 基于欧式距离模板匹配的识别手写体
- 车牌识别字符识别图片集
- 基于STM32的数字字符识别.zip
- 详解Halcon定位与模板匹配
- 基于OpenCV多目标的模板匹配算法
- 基于卷积神经网络的车牌字符识别_董
- 字符识别程序,26个英文字母的识别
- 车辆字符识别图片以及识别代码
- HALCON模板匹配源代码
- 基于stm32的字符识别卡在内存上了
- 基于模板匹配和谷歌开源TESSERACT库的
- BP神经网络的车牌字符识别的研究
- opencv金字塔模板匹配算法
- 基于opencv的手写数字字符识别
- 车牌识别基于模板匹配和神经网络.
- mnist手写字符集0-9jpg图片
评论
共有 条评论