資源簡介
漢字模板為200+,詳見ziku.mat 主文件:main.m 有用到matlab2014a的函數,注意

代碼片段和文件信息
function?[lNEpunctuationloc]=bwjudge(ibw)
%judge列掃描,區域標記
%ibw:輸入為二值化單行文字圖像。字白底黑
%l:標記了的行文字(順序)。對于是punctuation的部分保持,
%相應punctuation的標記號幾率在punctuation中
%NE;字符長度(已減去punctuation數量)
%punctuation:punctuation在l中的原標號
%load?ibw
[mn]=size(ibw);
sum_n=sum(ibw1);
loc=[];
for?i=1:n-1???%確定行文字字間隔
????if?sum_n(i)==0
????????if?sum_n(i+1)~=0
????????????loc=[loci];
????????end
????end
end
clear?sum_n
loc=[1locn];
l=zeros(mn);%區域標記
for?i=1:length(loc)-1
????temp=ibw(:loc(i):loc(i+1));
????temp=double(temp);
????temp(temp==1)=i;
????l(:loc(i):loc(i+1))=temp;
end
clear?temp;
%去標點
stats=regionprops(l‘BoundingBox‘);
temp=0;
for?i=1:length(stats)
????temp=temp+stats(i).BoundingBox(4);
end
temp=temp/length(stats);
punctuation=[];
for?i=1:length(stats)
????if?stats(i).BoundingBox(4) ????????%l(l==i)=0;
????????punctuation=[punctuationi];
????end
end
NE=max(max(l));
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1017??2015-05-05?20:45??mat項目\bwjudge.m
?????文件???????1467??2015-05-03?21:05??mat項目\bwjudge_ibw.mat
?????文件???10229608??2015-05-01?11:40??mat項目\features.mat
?????文件???????2091??2015-05-02?09:44??mat項目\hough_jiaozheng.m
?????文件????????423??2015-05-06?16:08??mat項目\lines.m
?????文件???????1446??2015-05-12?12:52??mat項目\main.m
?????文件????????605??2015-05-02?11:23??mat項目\read_letter.m
?????文件????????241??2015-04-28?13:06??mat項目\save_feat.m
?????文件?????192226??2015-05-01?11:30??mat項目\ziku.mat
?????文件?????399326??2015-05-02?09:41??mat項目\實驗模板\img_30.png
?????文件?????418586??2015-05-02?09:41??mat項目\實驗模板\img_60.png
?????文件??????18109??2015-05-11?19:38??mat項目\實驗模板\moban2.png
?????文件??????84862??2015-04-27?11:51??mat項目\實驗模板\shiyan.png
?????文件???????1303??2015-04-28?17:01??mat項目\建立模板\mobanfenge.m
?????文件????????176??2015-04-28?18:22??mat項目\建立模板\renamejpg.m
?????文件??????11884??2015-04-28?16:04??mat項目\建立模板\row1.png
?????文件??????11512??2015-04-28?16:09??mat項目\建立模板\row2.png
?????文件??????12025??2015-04-28?16:16??mat項目\建立模板\row3.png
?????文件??????11990??2015-04-28?16:16??mat項目\建立模板\row4.png
?????文件??????11826??2015-04-28?16:17??mat項目\建立模板\row5.png
?????文件??????12187??2015-04-28?16:17??mat項目\建立模板\row6.png
?????文件??????11415??2015-04-28?16:18??mat項目\建立模板\row7.png
?????文件????????655??2015-04-28?16:20??mat項目\建立模板\zifufenge.m
?????文件?????269827??2015-04-28?18:30??mat項目\模板漢字\模板漢字.rar
?????文件??????12687??2015-05-01?10:44??mat項目\模板漢字\漢字.docx
?????文件???????1082??2015-04-28?13:11??mat項目\測試漢字\ceshifenge.m
?????目錄??????????0??2015-05-11?19:38??mat項目\實驗模板
?????目錄??????????0??2015-05-11?18:05??mat項目\建立模板
?????目錄??????????0??2015-05-11?18:05??mat項目\模板漢字
?????目錄??????????0??2015-05-11?18:05??mat項目\測試漢字
............此處省略4個文件信息
評論
共有 條評論