## 2 Vein Pattern Identification System
### Human Recognition Process Based on Vein Pattern Matching
#### 2.4.3 Matching in the Presence of Affine Transformation  
Under an affine transformation, the lengths and angles of the triangles are no longer preserved. Under an affine transformation, the area of the corresponding triangles, however, becomes a relative invariant, with the two corresponding areas being related to each other through the determinant of the linear transformation matrix \(\mathrm{T}\) in the affine map transform \(\mathrm{(T,b)}\) where \(\mathrm{b}\) is the translation vector. If the area patches of the triangle sequence in the template are \(\left[\mathrm{A_{a}(1),\ldots,A_{a}(n)}\right]\), the corresponding area patches \(\mathrm{A(k)}\) associated with the sequence of the triangles on the query are related to those of the template in accordance with the following relative invariant:  
\[A_{a}(k)=\left|\begin{array}{cc}a_{11}&a_{12}\\ a_{21}&a_{22}\end{array}\right|A(k)\,,\,k=1,2,\ldots,n\;, \tag{6}\]  
where \(\left|\mathrm{T}\right|\) is the determinant of the transformation matrix \(\mathrm{T}\). As the linear matrix is unknown, the absolute affine invariants are constructed out of the area relative invariants by taking the ratio of two triangles to cancel out the dependence of the area relative invariant on \(\left|\mathrm{T}\right|\). By taking the ratio of consecutive elements in the sequence, a set of absolute invariants are obtained in (7) and (8).  
\[I_{a}(k)=\frac{\pm A_{a}(k)}{\left|A_{a}(k+1)\,mod\,n\right|}\;, \tag{7}\]  
and  
\[I(k)=\frac{\pm A(k)}{\left|A(k+1)\,mod\,n\right|}\;, \tag{8}\]  
This is for \(k\) = 1,2,..., \(n\). In the case of noise free measurement, the absolute invariant of the template equals that of the query, i.e., \(I_{a}(k)\) = \(I(k)\), and in the absence of noise and occlusion, each of \(I_{a}(k)\) will have a counter part with \(I(k)\). That counterpart is easily determined through a circular shift involving \(\mathrm{n}\) comparisons, where \(\mathrm{n}\) is the number of invariants. To allow for noise and small deviations from an affine map, we allow a small error percentage difference between corresponding invariants to allow for only a small difference between the area patches before declaring them as matching. This may reduce the length of the matching triangle sequence. Lowering the allowable error percentage effectively makes the matching stricter. Experimentally, an error percentage of 5% was applied. We adopted a run length method to decide on the correspondence between the two ordered sets of triangles. For every starting point on the sequence, the run length method computes a sequence of consecutive invariants, satisfying the criterion stated in Equation (9).  
\[\%e^{2}=\frac{\left(I(i)-I_{a}(j)\right)^{2}}{I(i)^{2}}\times 100<\xi\;. \tag{9}\]  
Figure 17: Definition of the parameters in feature vector \(\mathrm{F}\); \(\mathrm{d}_{i}\) is the corresponding length of triangle, \(\alpha_{i}\) is the corresponding angle and \(\mathrm{A}\) is the area of triangle.  
We declare a match on the longest string (M) of triangles that yields the minimum averaged error, given by Equation (10):  
\[\frac{\sum\
icefrac{{i9}}{{6}}\epsilon_{i}^{2}}{M}. \tag{10}\]  
Once correspondences are found, the vertices of the matching triangles are used to estimate the affine transformation. The algorithm for matching the triangles in the query and template vein patterns under an affine map is shown in Figure 18.