title: Filtering grayscale fingerprint scan image and binaries
body: <p>I am trying to get a binarized fingerprint from a thumb scan image. I have achieved to eliminate noisy background. but I'm unable to find a filter which can help me achieve this. I have following processed image.</p>
  
  <p><a href="https://i.stack.imgur.com/X5f9y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X5f9y.png" alt="I want to extract fingerprint details in binarised form"></a></p>
  
  <p>I want to extract fingerprint details in binarised form. I have already tried, </p>
  
  <pre><code>    ret1,th1 = cv2.threshold(gray,48,80,cv2.THRESH_BINARY)
  
  # Otsu's thresholding
  ret2,th2 = cv2.threshold(gray,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)
  
  # Otsu's thresholding after Gaussian filtering
  blur = cv2.GaussianBlur(gray,(5,5),0)
  ret3,th3 = cv2.threshold(blur,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)
  
  images = [gray, 0, th1,
            gray, 0, th2,
            gray, 0, th3]
  
  titles = ['Original Noisy Image','Histogram','Global Thresholding (v=127)',
            'Original Noisy Image','Histogram',"Otsu's Thresholding",
            'Gaussian filtered Image','Histogram',"Otsu's Thresholding"]
  
  for i in range(3):
      plt.subplot(3,3,i*3+1),plt.imshow(images[i*3],'gray')
      plt.title(titles[i*3]), plt.xticks([]), plt.yticks([])
      plt.subplot(3,3,i*3+2),plt.hist(images[i*3].ravel(),256)
      plt.title(titles[i*3+1]), plt.xticks([]), plt.yticks([])
      plt.subplot(3,3,i*3+3),plt.imshow(images[i*3+2],'gray')
      plt.title(titles[i*3+2]), plt.xticks([]), plt.yticks([])
  plt.show()
  </code></pre>
  
  <p>which gave me this</p>
  
  <p><a href="https://i.stack.imgur.com/EZykj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EZykj.png" alt="enter image description here"></a></p>
  
  <p>Also, I tried Catalano-Framework and Matlab binarization, all gave me black and white images. 
  Any help is much appreciated. </p>