|
Algorithm 1: WMHS. |
|
Input: mfcc-final←[feat,defeat,dttfeat] |
|
Output: verification results |
| 1: img.power←mfcc−final.img(255*255);
|
| 2: G←gradient_magnitude←; // Calculate the total gradient value |
| 3: Angle←; |
| 4: function UPDATEBINS(self,G, Angle) |
| 5: while dividing the image into cells do
|
| 6: bins←zeros((cell_G.shape[0], cell_G.shape[1],self.bin_count)); |
| 7: for i = range(bins.shape[0]) |
| 8: for j = range(bins.shape[1]) |
| 9: bins←tmp_unit←self.bin_count; // Vote for each gradient direction |
| 10: end for
|
| 11: end for
|
| 12: end while
|
| 13: return bins;
|
| 14: end function
|
| 15: block←bins.feature |
| 16: ← block |
| 17: clf = svm. SVC(); // training model |
| 18: clf.fit(train_ reduction, train_ target); |
| 19: classification function ←
|
| 20: pred = clf.predict(test_reduction) // predict |
| 21: return precision
|