title: How to create 64 Gabor features at each scale and orientation in the spatial and frequency domain
body: <p><strong>Normally, a Gabor filter, as its name suggests, is used to filter an image and extract everything that it is oriented in the same direction of the filtering.</strong></p>
  
  <p>In this question, you can see more efficient code than written in this <a href="https://stackoverflow.com/questions/20147891/create-a-gabor-filter-by-applying-gabor-equation-using-matlab">Link</a></p>
  
  <p>Assume 16 scales of Filters at 4 orientations, so we get 64 gabor filters.</p>
  
  <p><strong>scales=[7:2:37], 7x7 to 37x37 in steps of two pixels, so we have 7x7, 9x9, 11x11, 13x13, 15x15, 17x17, 19x19, 21x21, 23x23, 25x25, 27x27, 29x29, 31x31, 33x33, 35x35 and 37x37.</strong></p>
  
  <p><strong>directions=[0, pi/4, pi/2, 3pi/4].</strong></p>
  
  <p>The equation of Gabor filter in the spatial domain is:</p>
  
  <p><img src="https://i.stack.imgur.com/APMC7.png" alt="enter image description here"></p>
  
  <p>The equation of Gabor filter in the frequency domain is:
  <img src="https://i.stack.imgur.com/TGfTI.png" alt="enter image description here"></p>