資源簡介
字符包括漢字,字母,數(shù)字和一些符號。漢字有幾千個,字母有幾十個,數(shù)字的類最少只有10個,所以選擇簡單的手寫數(shù)字字符來實(shí)現(xiàn)。結(jié)合三個相關(guān)的程序和論文,一個是語音特征的分類(不調(diào)用神經(jīng)網(wǎng)絡(luò)工具箱相關(guān)函數(shù)實(shí)現(xiàn)),另外兩個是關(guān)于手寫數(shù)字識別的。處理的數(shù)據(jù)集是放在10個文件夾里,文件夾的名稱對應(yīng)存放的手寫數(shù)字圖片的數(shù)字,每個數(shù)字500張,每張圖片的像素統(tǒng)一為28*28

代碼片段和文件信息
function?feature?=?feature_lattice(img)
%?輸入:黑底白字的二值圖像。輸出:35維的網(wǎng)格特征
%?======提取特征,轉(zhuǎn)成5*7的特征矢量把圖像中每10*10的點(diǎn)進(jìn)行劃分相加,進(jìn)行相加成一個點(diǎn)=====%
%======即統(tǒng)計(jì)每個小區(qū)域中圖像象素所占百分比作為特征數(shù)據(jù)====%
for?i=1:length(img);
bw2=im2bw(img{i}graythresh(img{i}));
bw_7050=imresize(bw2[7050]);
for?cnt=1:7
????for?cnt2=1:5
????????Atemp=sum(bw_7050(((cnt*10-9):(cnt*10))((cnt2*10-9):(cnt2*10))));%10*10box
????????lett((cnt-1)*5+cnt2)=sum(Atemp);
????end
end
lett=((100-lett)/100);
lett=lett‘;
feature(:i)=lett;
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_1.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_10.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_100.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_101.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_102.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_103.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_104.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_105.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_106.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_107.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_108.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_109.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_11.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_110.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_111.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_112.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_113.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_114.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_115.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_116.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_117.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_118.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_119.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_12.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_120.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_121.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_122.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_123.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_124.bmp
?????文件???????1862??2006-10-13?18:31??BPnetwork_code\data\0\0_125.bmp
............此處省略5010個文件信息
評論
共有 條評論