# Dynamic Hand Gesture Recognition for Smart Lifecare Routines via K-Ary Tree Hashing Classifier
## 3 Material and Methods
### Preprocessing of the Input Videos  
Before the localization of the hand points, some preprocessing techniques are applied to save computational cost and time. Initially, video data is converted into frames (images). These frames are set to a fixed dimension of 452 \(\times\) 357. After that, the frames are denoised using the median filtering algorithm. The median filtering is used for detecting the distorted pixels in the images and replacing the corrupted pixels values with the median values. A 5 \(\times\) 5 window is used to de-noise the image [31; 32; 33; 34; 35; 36; 37]. The median filter is defined in Equations (1)-(3);  
\[Med\ (I)\ =\ Med\left\{I_{p}\right\} \tag{1}\]  
\[=\frac{I_{p}(k+1)}{2};k\ is\ odd \tag{2}\]  
\begin{table}
\begin{tabular}{p{142.3 pt} p{284.5 pt}} \hline \multicolumn{2}{c}{**Hand Gestures Recognition for Controlling Smart Home Appliances**} \\ \hline
**Methods** & **Main Contributions** \\ \hline [PERSON] et al. **(2017)**[26] & The model consists of a few steps. The hand gestures were captured using the web camera and were then preprocessed to detect the hands. Corner point detection was used to de-noise the images using a MATLAB simulation tool. Based on the gestures, different threshold values were used for controlling the home appliances. The threshold values were generated using the Fast Fourier transform algorithm and the appliances were controlled by the micro-controllers. \\ \hline [PERSON]. [PERSON] et al. **(2011)**[27] & For controlling home appliances and electronic gadgets using hand gestures, the authors detected hands using the YCbCr x skin color segmentation model and traced edges. For gesture recognition, the number of fingers was counted, and its orientation was analyzed. The reference background was stored from each frame which was compared with the next frame for reliable hand gesture recognition. \\ \hline [PERSON] et al. **(2020)**[28] & They developed a hand gesture recognition system using Leap motion sensors. The system was customized to recognize multiple motion-based hand gestures for controlling smart home appliances. The system was trained using a customized dataset containing various hand gestures to control daily household devices using a deep neural network. \\ \[PERSON] et al. **(2013)**[29] & They developed a hand recognition system for controlling television. The system was categorized into three sub-categories. (1) For static hand gesture recognition, hand features were extracted using a histogram-oriented gradient (HOG), and for recognition, Adaboost training was used. (2) For dynamic hand gesture recognition, first the hand trajectory was recognized and passed through the HMM model for recognition. (3) For finger click recognition, a specific depth threshold was fixed to detect the fingers. The distance between the palm and the fingertip was calculated. The accumulated variance was calculated for each fingertip to recognize the finger click gesture. \\ \[PERSON] et al. **(2018)**[30] & The authors developed a system to control a TV using hand gestures. First, the hand was detected through skin segmentation and the hand contour was extracted. After that, the system was trained using CNN to recognize hand gestures that were categorized into five branches; (1) menu, (2) direction, (3) go back, (4) mute/unmute, and (5) nothing. After that, CNN also helped in tracking the hand joints to detect commands: (1) increase/ decrease the speed, (2) clicking, and (3) cursor movement. \\ \hline \end{tabular}
\end{table}
Table 1: _Cont._\[=\frac{1}{2}\left[I_{p}\left(\frac{k}{2}\right)+I_{p}\left(\frac{k}{2}\right)+1 \right], \tag{3}\]  
where \(I_{1}\), \(I_{2}\), \(I_{3}\), \(\ldots\), \(I_{k}\) is the sequence of neighboring pixels. Before applying the filter, all pixels of the images should be arranged in ascending or descending order. After sorting, the pixels, the sequence of the pixels will be \(I_{p1}<I_{p2}<I_{p3}<I_{pk}\), where k is usually odd. Figure 2 shows the results of preprocessing on video frames.