• 大小: 116KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-05-08
  • 语言: Matlab
  • 标签: 字符识别  

资源简介

采用连通域方式,对图像进行切分,并且对图像中的字母进行识别。

资源截图

代码片段和文件信息

%CREATE TEMPLATES
%Letter
A=imread(‘letters_numbers\A.bmp‘);B=imread(‘letters_numbers\B.bmp‘);
C=imread(‘letters_numbers\C.bmp‘);D=imread(‘letters_numbers\D.bmp‘);
E=imread(‘letters_numbers\E.bmp‘);F=imread(‘letters_numbers\F.bmp‘);
G=imread(‘letters_numbers\G.bmp‘);H=imread(‘letters_numbers\H.bmp‘);
I=imread(‘letters_numbers\I.bmp‘);J=imread(‘letters_numbers\J.bmp‘);
K=imread(‘letters_numbers\K.bmp‘);L=imread(‘letters_numbers\L.bmp‘);
M=imread(‘letters_numbers\M.bmp‘);N=imread(‘letters_numbers\N.bmp‘);
O=imread(‘letters_numbers\O.bmp‘);P=imread(‘letters_numbers\P.bmp‘);
Q=imread(‘letters_numbers\Q.bmp‘);R=imread(‘letters_numbers\R.bmp‘);
S=imread(‘letters_numbers\S.bmp‘);T=imread(‘letters_numbers\T.bmp‘);
U=imread(‘letters_numbers\U.bmp‘);V=imread(‘letters_numbers\V.bmp‘);
W=imread(‘letters_numbers\W.bmp‘);X=imread(‘letters_numbers\X.bmp‘);
Y=imread(‘letters_numbers\Y.bmp‘);Z=imread(‘letters_numbers\Z.bmp‘);
%Number
one=imread(‘letters_numbers\1.bmp‘);  two=imread(‘letters_numbers\2.bmp‘);
three=imread(‘letters_numbers\3.bmp‘);four=imread(‘letters_numbers\4.bmp‘);
five=imread(‘letters_numbers\5.bmp‘); six=imread(‘letters_numbers\6.bmp‘);
seven=imread(‘letters_numbers\7.bmp‘);eight=imread(‘letters_numbers\8.bmp‘);
nine=imread(‘letters_numbers\9.bmp‘); zero=imread(‘letters_numbers\0.bmp‘);
%*-*-*-*-*-*-*-*-*-*-*-
letter=[A B C D E F G H I J K L M...
    N O P Q R S T U V W X Y Z];
number=[one two three four five...
    six seven eight nine zero];
character=[letter number];
templates=mat2cell(character42[24 24 24 24 24 24 24 ...
    24 24 24 24 24 24 24 ...
    24 24 24 24 24 24 24 ...
    24 24 24 24 24 24 24 ...
    24 24 24 24 24 24 24 24]);
save (‘templates‘‘templates‘)
clear all

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1748  2009-02-08 23:59  readletter\create_templates.m

     文件        230  2009-02-08 21:30  readletter\letters_numbers\0.bmp

     文件        230  2009-02-08 21:30  readletter\letters_numbers\1.bmp

     文件        230  2009-02-08 21:30  readletter\letters_numbers\2.bmp

     文件        230  2009-02-08 21:30  readletter\letters_numbers\3.bmp

     文件        230  2009-02-08 21:30  readletter\letters_numbers\4.bmp

     文件        230  2009-02-08 21:30  readletter\letters_numbers\5.bmp

     文件        230  2009-02-08 21:30  readletter\letters_numbers\6.bmp

     文件        230  2009-02-08 21:30  readletter\letters_numbers\7.bmp

     文件        230  2009-02-08 21:30  readletter\letters_numbers\8.bmp

     文件        230  2009-02-08 21:31  readletter\letters_numbers\9.bmp

     文件        230  2009-02-08 21:31  readletter\letters_numbers\A.bmp

     文件        230  2009-02-08 21:31  readletter\letters_numbers\B.bmp

     文件        230  2009-02-08 21:31  readletter\letters_numbers\C.bmp

     文件        230  2009-02-08 21:31  readletter\letters_numbers\D.bmp

     文件        230  2009-02-08 21:31  readletter\letters_numbers\E.bmp

     文件        230  2009-02-08 21:31  readletter\letters_numbers\F.bmp

     文件        230  2009-02-08 21:31  readletter\letters_numbers\G.bmp

     文件        230  2009-02-08 21:31  readletter\letters_numbers\H.bmp

     文件        230  2009-02-08 21:31  readletter\letters_numbers\I.bmp

     文件        230  2009-02-08 21:31  readletter\letters_numbers\J.bmp

     文件        230  2009-02-08 21:31  readletter\letters_numbers\K.bmp

     文件        230  2009-02-08 21:31  readletter\letters_numbers\L.bmp

     文件        230  2009-02-08 21:32  readletter\letters_numbers\M.bmp

     文件        230  2009-02-08 21:32  readletter\letters_numbers\N.bmp

     文件        230  2009-02-08 21:32  readletter\letters_numbers\O.bmp

     文件        230  2009-02-08 21:32  readletter\letters_numbers\P.bmp

     文件        230  2009-02-08 21:32  readletter\letters_numbers\Q.bmp

     文件        230  2009-02-08 21:32  readletter\letters_numbers\R.bmp

     文件        230  2009-02-08 21:32  readletter\letters_numbers\S.bmp

............此处省略23个文件信息

评论

共有 条评论