Algorithm 3 Pseudo-code of Gabor feature extraction |
1. BEGIN |
2. FOR each frequency f in the frequency list f_list: |
3. FOR each orientation φ in the orientation list o_list DO |
4. Construct a gabor filter g(f, φ), |
5. Convolve g(f, φ) with original image I, get response image R, |
6. Compute the mean (m) response in R, |
7. Count the # of pixels Np that have a larger value than m, |
8. Divide R into X x Y frames, |
9. FOR i in range(1,X); |
10. FOR j in range(1,Y): |
11. Count the # of strong response Ni,j and Compute the ratio r: |
12. r = Ni,j/Nr; |
13. Append r to the feature vector z: |
14. Finally, z = [r1,r2,…r|f_list|*|o_list|*X*Y]. |
15. END |