# Robust Fingerprint Minutiae Extraction and Matching Based on Improved SIFT Features
## 3 Proposed Methodology
### Image Preprocessing
#### 3.1.2 Thinning and Dilation  
Erosion (or thinning) and dilation (or thickening) are two morphological operations applied to the fingerprint binary image. As the fingerprint ridges are relatively thick, it is desirable for subsequent minutiae feature extraction and analysis to thin the ridges, so that each is a single pixel thick [1]. The thinning algorithm essentially consists of removing contour points of connected components in a fingerprint image to produce their skeleton [26; 27]. In order to extract a skeleton of the fingerprint, a skeletonization process is performed by applying the Zhang-Suen thinning algorithm developed by [PERSON] and [PERSON] in [28] to the binary image. The Zhang-Suen thinning algorithm is a simple and efficient technique and is one of the most popular adaptive thinning algorithms in the literature, which maintains a \(3\times 3\) sized block and consists of two sub-iterations. It is an iterative algorithm that computes the skeleton of an image by removing all the contour points of the image except those belonging to the skeleton [29].  
More formally, suppose black pixels are represented by 1's and white pixels are represented by 0s. The algorithm finds connected components in a binary image by working on every dark pixel (e.g., \(p1\)) that can have eight neighbors (see Figure 4). To preserve the connectivity of the skeleton, each iteration is further divided into two sub-iterations. In the first subiteration, the contour point \(p1\) is removed from the digital pattern, if the following conditions are held:  
\[2\leq N(p1)\leq 6,\quad M(p1)=1,\quad p2\times p4\times p6=0,\quad p4\times p6 \times p8=0.\]  
where \(N(p1)\) and \(M(p1)\) denote the number of 0 to 1 transitions from \(p2\) to \(p9\) in a clockwise direction and the number of non-zero neighbors of \(p1\), respectively. That is, \(N(p1)=p2+p3+\ldots+p8+p9\).  
Figure 3: Simplified outline of fingerprint enhancement based on contextual filters.  
In the second subiteration, the contour point p1 is removed from the digital pattern, if the following conditions are met:  
\[2\leq N(p1)\leq 6,\quad M(p1)=1,\quad p2\times p4\times p8=0,\quad p2\times p6 \times p8=0.\]  
An example of fingerprint thinning is given in Figure 5a. Dilation is one of basic morphological operations, which is typically applied to binary images to enhance image features by enlarging the boundaries of the segmented image objects and fill in the holes within these objects. In this work, the dilation process is used to increase the width of the fingerprint ridges in a way such that, if there is a gap of one or two pixels between any two ridges, then they can be joined to form a single ridge. Such a gap of one or two pixels between fingerprint ridges can be due to any error of some sort [1]. For fingerprint dilation, we create a function that looks at every pixel of the binary image and, in the meantime, all the neighboring pixels of the pixel under consideration are checked as well. Consequently, when a pixel is selected, all of its neighbors are checked and, if any one of them is black, the value of that pixel is changed to black so that this results in removing small holes in the image and also joining ridges that have at most a 2-pixel gap [24]. A binary fingerprint image after the dilation operation is shown in Figure 5b. After performing thinning and dilation operations, the resultant image is almost well-suited for feature extraction by removing all noises present in the image. However, there still remains very small patterns in the fingerprint image that need to be eliminated in order to perform more robust minutiae feature extraction [1]. This can be performed simply by calculating the number of pixels in each ridge and any ridge having fewer than a certain number of pixels (e.g., \(\leq\)20 pixel) is removed from the fingerprint image (see Figure 5c).  
Figure 4: A \(3\times 3\) sized block.  
Figure 5: Main steps of fingerprint preprocessing: (**a**) thinning, (**b**) dilation and (**c**) unwanted pattern removal.