Sanjay meena
Download 1.15 Mb. Pdf ko'rish
|
- Bu sahifa navigatsiya:
- 2.2 SEGMENTATION
14 CHAPTER 2 PREPROCESSING 15 2.1 INTRODUCTION Preprocessing is very much required task to be done in hand gesture recognition system . We have taken prima database [1] which is standard database in gesture recognition. We have taken total 25 signs each sign with 40 images. Preprocessing is applied to images before we can extract features from hand images. Preprocessing consist of two steps • Segmentation • Morphological filtering Segmentation is done to convert gray scale image into binary image so that we can have only two object in image one is hand and other is background. Otsu algorithm [2] is used for segmentation purpose and gray scale images are converted into binary image consisting hand or background. After converting gray scale image into binary image we have to make sure that there is no noise in image so we use morphological filter technique. Morphological techniques consist of four operations: dilation, erosion, opening and closing. 2.2 SEGMENTATION A very good segmentation is needed to select a adequate threshold of gray level for extract hand from background .i.e. there is no part of hand should have background and background also shouldn’t have any part of hand. In general, the selection of an appropriate segmentation algorithm depends largely on the type of images and the application areas. The Otsu segmentation algorithm [2] was tested and found to give good segmentation results for the hand gestures and was, therefore, selected .Otsu algorithm is nonparametric and unsupervised method of automatic threshold selection [2]. Let the pixels of a given picture be represented in L gray levels [1,2,3,…………….,L] The number of pixels at level i is denoted by 𝑛 𝑖 and the total number of pixels by 𝑁 = 𝑛 1 + 𝑛 2 + 𝑛 3 + 𝑛 4 … … . 𝑛 𝐿 . Now the probability distribution of pixel is given by [2] 𝑝 𝑖 = 𝑛 𝑖 𝑁 , 𝑝 𝑖 ≥ 0, ∑ 𝑝 𝑖 = 1 𝐿 𝑖=1 (2.2.1) 16 Let us suppose we have two classes of pixels one is Ω 0 which is background and Ω 1 is the hand. Ω 0 shows the pixels with level [1….k ], and Ω 1 shows pixels with level [k+1….L].The probability of class occurrence and the class mean levels, respectively, are given by 𝜔 0 = 𝑃(𝛺 0 ) = ∑ 𝑝 𝑖 = 𝜔(𝑘) 𝑘 𝑖=1 (2.2.2) 𝜔 1 = 𝑃(𝛺 1 ) = ∑ 𝑝 𝑖 = 1 − 𝜔(𝑘) 𝐿 𝑖=𝑘+1 (2.2.3) and 𝜇 0 = ∑ 𝑖𝑃(𝑖|𝛺 0 ) = ∑ 𝑖𝑝 𝑖 /𝜔 0 = 𝜇(𝑘)/ 𝑘 𝑖=1 𝜔(𝑘) 𝑘 𝑖=1 (2.2.4) 𝜇 1 = ∑ 𝑖𝑃(𝑖|𝛺 1 ) = ∑ 𝑖𝑝 𝑖 /𝜔 1 = 𝜇 𝑇 −𝜇(𝑘) 1−𝜔(𝑘) 𝐿 𝑖=𝑘+1 𝐿 𝑖=𝑘+1 (2.2.5) where 𝜔(𝑘) = ∑ 𝑝 𝑖 𝑘 𝑖=1 (2.2.6) and 𝜇(𝑘) = ∑ 𝑖𝑝 𝑖 𝑘 𝑖=1 (2.2.7) These two are zero th and the first order cumulative moments of the histogram up to k th level and respectively [2] 𝜇 𝑇 = 𝜇(𝐿) = ∑ 𝑖𝑝 𝑖 𝑘 𝑖=1 (2.2.8) Here 𝜇 𝑇 is total mean level of the original hand image. So we can check for relation for any value of k 𝜔 0 𝜇 1 + 𝜔 1 𝜇 1 = 𝜇 𝑇 , 𝜔 0 +𝜔 1 = 1 The class variance for both class is given by 𝜎 0 2 = ∑ (𝑖 − 𝜇 0 ) 2 𝑃(𝑖|𝛺 0 ) 𝑘 𝑖=1 = ∑ (𝑖 − 𝜇 0 ) 2 𝑘 𝑖=1 𝑝 𝑖 /𝜔 0 (2.2.9) 𝜎 1 2 = ∑ (𝑖 − 𝜇 1 ) 2 𝑃(𝑖|𝛺 1 ) 𝐿 𝑖=𝑘+1 = ∑ (𝑖 − 𝜇 1 ) 2 𝐿 𝑖=𝑘+1 𝑝 𝑖 /𝜔 1 (2.2.10) 17 and between classes variance is given by 𝜎 𝐵 2 = 𝜔 0 (𝜇 0 −𝜇 𝑇 ) 2 + 𝜔 0 (𝜇 1 −𝜇 𝑇 ) 2 (2.2.11) and total class variance is given by 𝜎 𝐵 2 = ∑ (𝑖−𝜇 𝑇 ) 2 𝐿 𝑖=1 𝑝 𝑖 (2.2.11) Now we will find the ratio of between class variance to the total class variance with all value for (i=1,2,3, …k,k+1….L) .the optimum threshold k* is determined the value of pixel for which we get the maximum value of 𝜎 𝐵 2 /𝜎 𝑇 2 [3]. 𝑘 ∗ = 𝑚𝑎𝑥 1≤𝑘≤𝐿 𝜎 𝐵 2 𝜎 𝑇 2 ⁄ (2.2.12) Now we set our threshold k* and hand pixel is assigned “1” and the background pixels are assigned “0” thus we get a binary image. Download 1.15 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling