Hand Image Acquisition METHODOLOGY

Volume 38 – No.12, January 2012 18 Figure 2. Hand image acquisition device Figure 3. Software to capture the hand image the hand fingers are not touching each other. The lamp serves as a light source to make a stable lighting in acquisition process. Each user was requested to put hisher left hand on the hand pad and a software that has been installed on computer will be captured the hand image from the device see Figure 3.

2.2 Preprocessing

The preprocessing aims to prepare hand images to be more easily processed on the feature extraction phase. There are four main processes in preprocessing stage are gray scaling, thresholding, median filtering and detecting of object boundary. Gray scaling transform the color hand image that produced by device webcam to gray scale image. Thresholding aims to convert the gray scale hand image to the binary image. The threshold value T is obtained automatically by Otsu method [8]. If pixel value of gray scale image less than T then the pixel value is converted to black 0, otherwise the pixel value is converted to white 1. a b c d Figure 4. Preprocessing results, a gray scaled image, b binarized image, c median filtered image, d boundarized image Median filtering is applied to avoid the white pixels not pixel object outside of the hand object due to imperfections process of thresholding phase. Size of filter mask is 3 x 3 pixels. Since the median filter applied on the binary image then pixel ordering process in median filter to determine the pixel median is not required any more. Determination of pixel median can be replaced by applying the following rule: If sum of all pixels in sliding window is greater than 4 then pixel is set to 1 otherwise the pixel is set to 0. The rule would make the median filtering process will be much faster. The last process in this stage is hand boundary detection. The result of this process is only pixels on edge or boundaries of hand object will be set to black otherwise will be set to white. The results of each preprocessing step are shown in Figure 4.

2.3 Hand Chain Code Extraction

Chain code is one of well known method for representing and describing of shape by its contour or border. The first step to extract the chain code of object is determines the location of starting pixel in object boundary. From the location moves along object boundary to find the next boundary pixel and this pixel can be specified by a unique number code between 0 to 3 for 4-connectivity or between 0 to 7 for 8-connectivity neighborhood. The code of this pixel depends on the direction of its location from location of previous pixel. The movement direction to find the next pixel can be clockwise or anticlockwise and this process will be ended when the starting pixel is encountered. Figure 5a shows the direction code of chain code based on 8-connectivity neighborhood . Volume 38 – No.12, January 2012 19 Figure 5b illustrates how the chain code of hand shape is generated from boundary hand image. The boundary hand image is scanned from top left until the first boundary pixel is found. This pixel is noted as starting pixel. In general, the location of the pixel is around the tip of middle finger because the finger is generally longer than other fingers. The next boundary pixel is traced by clockwise movement and assigned a code to this pixel by following Figure 5a. Figure 5c shows its chain code feature. a Close Up } } } } } } } } } } } } 0 00 0 00 7 7 7 6 b 0000007767666766666666666666666666676666667666666666766 6666666666666667666666666656666666666666667677001112122 2212212221212212121221212121121122112212121222212222122 2122212211010000070776676666566665666566655666566566665 6566566665666566566665666565665665656666656665666667770 0101110111111101011121101111011112111121121112100000776 6666665665566555655566565555655565555556555655565565656 5566665656666556666665666656666556666565666656655665665 5666565655656666444444444444444444444444444444444444444 4444444444444444444444444444433434333333333323334332323 3323332233233323333332232332333333334334334334434334334 3333232332332322211101001000000000007070777777770707077 7706707770700700070000001010101132222111121212212322222 2212222223223322233232322323223223222223323223223232223 2232223232223222322222222222121110007007777677676767676 6667766766776777676767676767677666667676667667667666767 7777700001122222123222222222322222222222222222222222221 22222212222222222222222222222222232212222222112101 c Figure 5. Extraction of chain cod, a 8-connectivity chain code, b hand shape chain code extraction, c chain code feature vector In this research chain code as shown in Figure 5c is used as a hand shape feature without any modification or normalization process. Two hand shape chain code of the same user have tends to unequal vector length and therefore dynamic time warping distance is used in this research to compute the similarity degree of each other.

2.4 Dynamic Time Warping Distance

Dynamic Time Warping DTW is a well known technique to measure the similarity between two given time-dependant sequences. One advantages of DTW is able to match of two feature vectors with unequal length. The feature vectors are warped to match each other and the DTW distance is measured based on optimal warping path of two feature vectors. The DTW distance of two vectors U and V with length m and n respectively, can be expressed as follows: , , n m V U DTW   1           1 , 1 , 1 , 1 min , , j i j i j i v u d n m j i ba se     2        , , , , ,    3 ... 3 , 2 , 1 ; ... 3 , 2 , 1 n j m i   The distance is commonly computed by creating the m by n distance matrix. The matrix contains element γ i, j that represent the cumulative distance of warping path from element 1,1 to i, j where 1≤ i ≤ m, 1 ≤ j ≤ n, therefore the matrix is called cumulative distance matrix. Lets see the example of two chain code vectors U = 0 7 4 0, and V = 1 0 7 5 1. The DTW distance of these vectors is 3. Figure 6a to 6e shows cumulative distance computation is based on the column 1 to column 5 of V respectively, while the warping path from U to V is shown by shaded area in Figure 6 f. A threshold value T is used to decide whether two chain codes come from the same person genuine or not impostor. If the DTW score less than or equal with T then the tested chain code is noted as authorized, otherwise the chain code is noted as not authorized. d =d Cumulative =Cumulative Remark 1-0 2 1 1 + 0 1 Minimum 1-7 2 36 36 + 1 37 1-4 2 9 9 + 37 46 1-0 2 1 1 + 46 47 a