Skin Classification Based on Co-occurance Matrix

In this paper an algorithm will be achieved to look for the properties of the skin for group then try to classify the skin of the group depending on the four properties (energy, contrast, correlation and homogeneity). Studying the four above properties in details then gave whole view about their effect on skin feature extraction. The applied algorithm shows that the four above properties can be extracted as features for personal skin. The experimental results of the proposed algorithm shows that the energy gave high recognition properties comparing with the remaining properties.

Skin color can also be used as complimentary information to other features such as shape and geometry and can be used to build accurate face detection systems (2). Most of the research efforts on skin detection have focused on visible spectrum imaging. Skin-color detection invisible spectrum can be a very challenging task as the skin color in an image is sensitive to various factors such as: • Illumination: A change in the light source distribution and in the illumination level (indoor, outdoor, highlights, shadows, non-white lights) produces a change in the color of the skin in the image (color constancy problem).The illumination variation is the most important problem among current skin detection systems that seriously degrades the performance.(1) • Camera characteristics: Even under the same illumination, the skin color distribution for the same person differs Many of the problems encountered in visual spectrum can be overcome by using non-visual spectrum such as infrared (IR) (3,4) and spectral imaging (5).
• Ethnicity: Skin color also varies from person to person be-longing to different ethnic groups and from persons across different regions. For example, the skin color of people be-longing to Asian, African, Caucasian and His panic groups is different from one another and ranges from white, yellow to dark.

•
Individual characteristics: Individual characteristics such as age, sex and body parts also affects the skin-color appearance.

•
Other factors: Different factors such as subject appearances (makeup, hairstyle and glasses), background colors, shadows and motional so influence skin-color appearance.
Many of the problems encountered in visual spectrum can be overcome by using non-visuals pectrum such as infrared (IR) (3,4) and spectral imaging (6). Skin-color in non-visual spectrum methods is invariant to changes in illumination conditions, ethnicity, shadows and makeup. However, the expensive equipment necessary for these methods combined with tedious setup procedures have limited their use to specific application are as such as biomedical applications. Related works (7): Number of comparative studies of skin color pixel classification has been reported. Jones and Rehg (8) created the first large skin database-the Compaq database-and used the Bayesian classifier with the histogram technique for skin detection. Brand and Mason (9) compared three different techniques on the Compaq database: thresholding the red/green ratio, color space mapping with 1D indicator and RGB skin probability map. Terrillon et al. (10) compared Gaussian and Gaussian mixture models across nine chrominance spaces on a set of 110 images of 30 Asian and Caucasian people. Shin et al. (11) compared skin segmentation in eight color spaces. In their study, skin samples were taken from the AR and the University of Oulo face databases and non-skin samples were taken from the University of Washington image database. Al Abbadi et al. (12) used skin texture and color features to recognizing skin texture from non skin texture.

Skin Detection :
The detection of skin is an indication of the presence of a human limb or torso within a digital image. In recent times various methods of identifying skin within images have been developed. The following gives an overview of the main skin detection methods implemented for the detection of objectionable images.

a) Colour Spaces for Skin Detection
Colour space can be described as the various ways to mathematically represent, or store, colours. Choosing a colour space for skin detection has become a contentious issue within the image processing world. (13)

b) Skin Detection by Colour
Pixel colour classification can be complicated and there have been many suggested methods for classifying pixels as skin or non-skin colour in an attempt to achieve the optimum performance. Fleck et al (1) says that skin colours lie within a small region (red, yellow and brown) of the colour spectrum regardless of the ethnicity of the person within an image. Although this is a small region within the colour spectrum, it also incorporates other, easily identifiable, non-skin objects such as wood (14,15).

c) Skin Detection by Texture
Although the texture of skin is quite distinct from a close range, skin texture appears smooth within most images. One of the biggest problems with skin colour modelling is falsely detecting non-skin regions as skin (false/positive) due to similar colour. Skin texture methods are principally used to boost the results of the skin colour modelling by reducing this false/positive rate.

Features Extraction:
Feature extraction is a form of dimension reduction, where resources used to describe large sets of data are simplified with as little loss to accuracy as possible. The colour and texture methods discussed previously are forms of feature extraction, but they are used solely in the classification of skin. This section discusses the features used in the classification of the objectionable image, predominately geometric and dimensional.
After skin has been detected various features can be extracted. The skin area/image ratio is the percentage ratio of the image which is covered by skin. As most objectionable images would be predominately skin, the skin area/image ratio is used by most, if not all, the reviewed systems. This ratio does not depend on the method of skin classification and can be used as an input to the classifier or as an early filtering system (16,17). The amount, position, orientation, height and width, shape, eccentricity, solidity, compactness, rectangularity and location of skin regions are features used as input components to the machine learning classifiers (18). The choice and implementation of classifier would stipulate the influence of the skin features; however it has been shown that skin features can improve accuracy (19). The ability to extract these skin features depends on the method used in skin detection, if colour histograms are used then only the skin area/image ratio can be used, whereas using a skin likelihood map could allow the use of skin features such as position, orientation, height and width of skin regions (20). In this research a new idea for skin detection was introduced by achieving the properties seen well, of the co-occurrence matrix [i.e. depending on energy, contrast, correlation, homogeneity].

Co-occurrence Matrices:
Suppose that you want to record how often certain transitions occur as you go from one pixel to another. Define a spatial relationship r such as "to the left of", "above", etc. The co-occurrence matrix Cr for this relationship r count the number of times that a pixel with value i occurs with relationship r with a pixel with value j. Co-occurrence matrices are mainly used to describe region texture, but they can also be used on image maps to measure how often pixels with certain labels occur with certain relationships to other labels (21).
Gray level co-occurrence texture features assume that the texture information in an image is contained in the18 overall spatial relationships among the pixels in the image. This is done by first determining the Gray level Co-occurrence Matrix (GLCM). This is an estimate of the second order probability density function of the pixels in the image. The features are then statistics obtained from the GLCM. Then estimate the Gray-Level Co-occurrence Matrix (GLCM). This matrix, defined in Equation (1), has entries GLCM (n,m) which are equal to the number of occurrences of pixels with gray levels n and m respectively with a separation of (dr, dc) pixels (see Figure 1). The number of pixels over which this estimate is obtained is given by Equation (2). If the GLCM is normalized with respect to R , its entries then represent the probability of glcm occurrence of pixel pairs with gray levels n and m with separation (dr,dc).We will choose dc = 0 and vary dr between 1 and 10.

Creating a Gray-Level Co-Occurrence Matrix (23):
To create a GLCM, a gray-level co-occurrence matrix (GLCM) , calculating how often a pixel with the intensity (gray-level) value i occurs in a specific spatial relationship to a pixel with the value j. By default, the spatial relationship is defined as the pixel of interest and the pixel to its immediate right (horizontally adjacent), but you can specify other spatial relationships between the two pixels. Each element (i,j) in the resultant GLCM is simply the sum of the number of times that the pixel with value i occurred in the specified spatial relationship to a pixel with value j in the input image. Because the processing required to calculate a GLCM for the full dynamic range of an image is prohibitive, uses scaling to reduce the number of intensity values in grayscale image from 256 to eight. The number of gray levels determines the size of the GLCM. The gray-level co-occurrence matrix can reveal certain properties about the spatial distribution of the gray levels in the texture image. For example, if most of the entries in the GLCM are concentrated along the diagonal, the texture is coarse with respect to the specified offset. Figure (2) show a clear basic example to generate GLCM matrix.

Figure (2) Process Used to Create the GLCM 5. Description of Two-dimensional Co-occurrence Matrices :
Two-dimensional co-occurrence (gray-level dependence) matrices, proposed by Haralick in 1973, are generally used in texture analysis because they are able to capture the spatial dependence of gray-level values within an image (24). A 2D co-occurrence matrix, P, is an n x n matrix, where n is the number of gray-levels within an image. For reasons of computational efficiency, the number of gray levels can be reduced if one chooses to bin them, thus reducing the size of the co-occurrence matrix. The matrix acts as an accumulator so that P[i , j] counts the number of pixel pairs having the intensities i and j. Pixel pairs are defined by a distance and direction which can be represented by a displacement vector d = (dx, dy), where dx represents the number of pixels moved along the x-axis, and dy represents the number of pixels moved along the y-axis of an image slice.
In order to quantify this spatial dependence of gray-level values, calculating various textural features proposed by Haralick (24,25), including Entropy, Energy (Angular Second Moment), Contrast, Homogeneity, SumMean (Mean), Variance, Correlation, Maximum Probability, Inverse Difference Moment, and Cluster Tendency. For the formulas and the intuitive interpretations of these features with respect to the texture characterization, refer to the table (1).

Proposed algorithm:
The proposed algorithm will be achieved to look for the properties of the skin for group (25 person as a sample) then try to classify the skin of the group depending on the four properties got from the co-occurrence matrix properties by applying the following: • Prepare a skin region to be detected.

•
Apply preprocess on the selected region using [filter].

•
Arrange the region size to be divided by four.

•
Divide the selected region into four equal sizes. • Create co-occurrence matrix for the four parts generated from the previous step.

•
Calculate the properties (energy, contrast, correlation, homogeneity) of the cooccurrence matrix for each part.