# Gesture-to-Text Translation Using SURF for Indian Sign Language
## 3 Research Methodology
### Image Preprocessing
#### 3.3.1 Concept of Color Space and Conversion of RGB to HSV Color Space  
The method of distinguishing between the skin and non-skin pixels is known as the color of skin detection. It is the first stage in identifying possible territories. This is the first stage in locating areas in a picture that may contain human limbs and features. The following parameters must be considered throughout the skin-color-detecting process: (1) The equipment used to capture the photograph and various cameras produce different results for the same image; (2) within the image, the differentiation or segregation of skin and non-skin pixels; (3) the color space was employed to detect or segment the data; (4) color distortion caused by object motion decreases image resolution; (5) skin tones differ between individuals; (6) silhouettes and lighting play an essential part in changing the image's hue; and (7) does the image's brightness vary dramatically?  
Figure 4: Steps involved in image preprocessing.  
Figure 3: Collection of signs for alphabets and numbers [23].  
During skin detection, a variety of color spaces are accessible. RGB, normalized color space, luminance-based color space (HSI, HSV, and HSL), and hue-based color system (HSI, HSV, and HSL) are all RGB-based color spaces (YCDCr, YIQ, and YUV). The normalization process is incorporated for RGB conversion into normalized RGB [24].  
\[\text{r}=\frac{R}{R+G+B} \tag{1}\]  
\[\text{g}=\frac{G}{R+G+B} \tag{2}\]  
\[\text{b}=\frac{B}{R+G+B} \tag{3}\]  
\[\text{r}+\text{g}+\text{b}=1 \tag{4}\]  
\[\text{b}=1-\text{r}-\text{g} \tag{5}\]  
Normalizing RGB is a quick and easy technique to get the job done when it comes to reducing shadow and lighting distortions. However, when irregular luminescence is present, hue (HSV) and luminance (YCDCr)-based techniques are used, as these approaches identify color and intensity data even in the presence of uneven illumination.  
Now, the calculation of m and M using the relations given the three parameters, R, G, and B (all within 0 to 255) [25], is as follows:  
\[\text{M}=\text{max}\{\text{R, G, B}\} \tag{6}\]  
\[\text{m}=\text{min}\{\text{R, G, B}\} \tag{7}\]  
\[\text{V}=\frac{M}{255} \tag{8}\]  
\[\text{S}=\begin{cases}1-\frac{m}{M};&M>0\\ 0&;&M=0\end{cases} \tag{9}\]  
\[\text{H}=\begin{cases}cos^{-1}\left[\frac{R-\frac{1}{G}-\frac{1}{2}B}{\sqrt{R^ {2}+G^{2}+B^{2}-RG-RB-GB}}\right];&G\geq B\\ 360-cos^{-1}\left[\frac{R-\frac{1}{G}-\frac{1}{2}B}{\sqrt{R^{2}+G^{2}+B^{2}- RG-RB-GB}}\right];&B\geq G\end{cases} \tag{10}\]  
The following explains the technique to detect human skin color in color images.  
1. The user's image is created by dividing the webcam video into image frames.
2. Through conversion, the RGB color space of a source image is converted to the HSV color space. A hue, saturation, and value (HSV) image comprises three separate images.
3. A histogram is constructed for every one of the three aspects, and the threshold value for every element is calculated from the histogram.
4. For skin pixels, the masking concept is applied.
5. The masked picture is given a criterion (threshold).
6. The threshold picture is flattened and refined.
7. At last, just the flesh pixels remain viewable.  
The skin mask is constructed by converting the raw picture into the HSV color space (Figure 4). Skin pixels were defined by pixels there in the (H, S, V) range of (0,40,30) to (43,255,254). A skin mask could be used to and isolate the hand in the image. Lastly, the Canny edge method [25] can detect and identify abrupt interruptions in a picture, allowing the picture's edges to be recognized.