資源簡介
我的字符識別畢業設計,屬于模式識別,是完整畢業設計

代碼片段和文件信息
%%%%%%%%%%%%%%%%%%%基于模板匹配的字符識別
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??字符識別文章畢業設計\characterTemplateRecognition.m
?????文件???????1878??2014-05-08?09:15??字符識別文章畢業設計\templateCharacter\0.bmp
?????文件???????1878??2014-05-08?14:37??字符識別文章畢業設計\templateCharacter\1.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\10.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\11.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\12.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\13.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\14.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\15.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\16.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\17.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\18.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\19.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\2.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\20.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\21.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\22.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\23.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\24.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\25.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\26.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\27.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\28.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\29.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\3.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\30.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\31.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\32.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\33.bmp
?????文件???????1878??2014-05-08?09:20??字符識別文章畢業設計\templateCharacter\34.bmp
............此處省略51個文件信息
- 上一篇:最優化計算方法常用程序匯編
- 下一篇:Gallery層疊自動循環切換效果
評論
共有 條評論