title: Face recognition pre processing
body: <p>I'm working on a face recognition project. In order to improve the accuracy of the algorithm, we tried to do some preprocessing, following this article:</p>
  
  <p><a href="http://lear.inrialpes.fr/pubs/2007/TT07/Tan-amfg07a.pdf" rel="nofollow">http://lear.inrialpes.fr/pubs/2007/TT07/Tan-amfg07a.pdf</a></p>
  
  <p>Based on that, we made the following code:</p>
  
  <pre><code>def dif_gaussian(img, sigma0 = 1.0, sigma1 = 2.0):
      blur1 = cv2.GaussianBlur(img,(0,0),sigma0)
      blur2 = cv2.GaussianBlur(img,(0,0),sigma1)
      result = cv2.subtract(blur1,blur2)
      return np.uint8(result)
  
  def gamma_correction(img, correction):
      temp = img/255.0
      result = cv2.pow(temp, correction)
      return np.uint8(result*255)
  
  
  
  predict_image_pil = Image.open('image.jpg').convert('L')
  predict_image = np.array(predict_image_pil, 'uint8')
  
  predict_gamma = gamma_correction(predict_image,0.2)
  
  predict_gauss = dif_gaussian(predict_gamma,1.0,2.0)
  
  predict_hist = cv2.equalizeHist(predict_gauss)
  </code></pre>
  
  <p>But our resulting image, especially on the Difference of Gaussian part, is way different from the images showed on the article. Is there any mistake on the processing that I`m not seeing?</p>