Histogram based Skin Detection in Video

DOI : 10.17577/IJERTCONV4IS34042

Download Full-Text PDF Cite this Publication

Text Only Version

Histogram based Skin Detection in Video

Prasad B. B

Department of Electronic & Communication Engineering CMRIT Engineering College,

Bangalore-560041

Prof. Harsha B K

Asst. Professor

Department of Electronic & Communication Engineering CMRIT Engineering College,

Bangalore-560041

Abstract – There are multiple methods available for skin detection which is nothing but a sequence to find pixels which may be of skin or non-skin colored. The different regions in an image or video may be detected for different skin color. The color of skin is due to hemoglobin and / or melanin. Apart from these natural colors, there are artificial object such as wood, copper or sand which might get detected in place of skin in a skin detection technique. In view of this, it is essential not only to devise a faster algorithm but also, one must look into the accuracy of the outputs. In this project, a decision rule based system is proposed which can differentiate between skin or non- skin types using pixel analysis. In this system video is taken as an input. Then video is converted into frames. The histogram is computed for each frame in the video. Bayes method of classification is used to find the probability of skin in each frame. Furthermore, using the images which were trained using the algorithm, skin likelihood is detected for frames. Last but not least, we use threshold for creating skin-map. A skin-map is nothing but a binary image with skin assigned a value of 1 and non-skin 0. Therefore, a high-level image processing algorithm is designed.

Keywords Bayesian classifier, skin probability, skinlikelihood, thresholding, histogram.

  1. INTRODUCTION

    The focal undertaking in the field of visual learning is to develop good amount of algorithms and schemes. The picture in all such algorithms is nothing but a map of pixels. In an attempt to answer the much needed theory in the field to represent a picture into in to its quality parameters, it is not only needed to carry many calculations but also to have a deeper understanding into its statistical parameters such as mean, variance, standard deviations, PSNR, histogram and so on.

    At the point when the measure of accessible preparing information is little, complex learning calculations might be required to interject between tests. Be that as it may, as a consequence of the Internet and the multiplication of on-line picture accumulations. In [2], Corbis of the image processing group has good amount of picture repositories which are used commonly across the globe. The sizes are uncommon and extravagance. Histogram models are employed by Schiele and Waibel [1]and Kjeldsen and Kender model skin color as a single Gaussian [2], while Jebara et al [3]employ a mixture density. Comparative performance of different skin chrominance models and chrominance spaces for the automatic detection of human faces in color images is performed in [6] [9]. The vast information sets are able to provide simple and effective calculations for image learning

    and processing. Nonetheless, information set which are publicly available for example creates a one-sided test for conceivable symbolism. In order to understand these concepts better, a sample skin detected image is shown in Figure 1.1.

    Figure1.1: Sample Skin Detected Image

    There are various ways skin detection can be done. One of the popular methods is using histogram. In order to understand it properly, let us see the in and out of it.

  2. BASICS OF HISTOGRAM

      1. Histogram

        Graph of hists is called a histogram that is the repetition of an object or thing for example a pixel in this case. Typically histograms are presented using bars the height of which shows the number of such items or things. In a histogram, x-axis typically denote the item while the y-axis denote the repetitions of that item in the complete data set.

        Histogram can be plotted using the frequency table as shown in Table I.

        Table 1: Sample Table for Plotting Histogram

        Each picture demonstrates a different histogram. The histogram shows the repetitions of pixel level (0 to 255). We can get to know about the various properties of an image just by doing a pixel analysis. Also, we can predict the nearby

        pixel values by analysing the pixel values of centre pixel. In general (except for corner pixel values) there are 8 surrounding pixels which can be compared to the centre

        The probability of skin detection is done using the following equations: 1.1 and 1.2

        pixels.

        ( ) = []

        (1.1)

        Histogram is also used to analyse the various characteristics

        of an image with respect to the different frames of a video.

        ( ) = []

        (1.2)

        In this case, one of the many applications is to find the moving objects in a video which are essential to be determined for use-cases such as surveillance or security.

        In next section, we want to discuss about the histogram colour models of an image.

      2. Histogram Colour Models

        In order to understand the characteristic of a coloured image, following parameters play prime importance:

        • The choice of colour which is used in each pixel

        • The intensity of histogram around a pixel

          Above parameters can be measured directly using the histogram model in MATLAB.

          The colour images which are found in the web are used to represent the feasibility of proposed algorithm in this case. In the coloured image, each pixel is represented by Red, Green and Blue shades where each of these colours are represented by 8 bits which means there are 0 to 255 levels

          Where rgb skin and non-skin colours are separately treated and Tn and Ts are the total amount of pixels present in the image.

      3. Colour Models Approach for Finding Skin

        A classification based bin is designed in this approach which can classify the set of pixels contained in the image as skin or non-skin types. This is helpful in 2 settings:

        • To start with, for applications, for example, the location and acknowledgment of appearances is considered in all the figures

        • The low-level of pixel in an image are then contained in a bin.

        • Part of the skin image is utilized for recovery and to create a data set for learning algorithm

          Using the Bayes standard, the probability to find skin colour is defined as following equation (1.3):

          present. When we mix all these colours, we get all the

          ( )()

          colours present in the world.Skin color has proved to be a

          (

          ) =

          (1.3)

          useful and robust cue for face detection [7] [8].

          ()()+()()

          In 24 bit colour model (8 bit model is used for gray scale images), each set of 8 bits is separately manipulated. This kind of model has around 167000000 different colours possible and thereby creating a huge range of pixelates.

          RGB is one of the triplet model used although there are many more such colour models are available. The pixel marking or block making is a specific approach to detect the type of pixels making up and object or colour in an image. If we want to detect only skin, we can use a contour which will use the type of skin colour we want to detect in our image.

          In a note to see that, skin-tint is generally non-responding to crosswise over various cultural-group gatherings when the illuminate is marked down which is on grounds that

          An image can be called skin if and only if:

          () (1.4)

          Where 1 0 is a threshold value decided by our method.

          In equation 1, the values of all kind of probabilities (prior) are determined using the pixel method. Also, the pair of probabilities sum is 1, so just finding one probability mean that we can find the other one automatically. One method to find the probability is just by dividing skin pixel with the total pixels in the image. That is,

          distinctions in the grouping of shades essentially influence the immersion of skin shading, not the tone. Tragically we

          () =

          +

          (1.5)

          don't have the foggiest idea about the brightening conditions in a self-assertive image thus the variety in skin hues is a great deal less obliged by and by. This is especially valid for web pictures caught under a wide assortment of conditions. In any case, we can represent pixel group to mark our image detection algorithm and detection methodology.

          In this project a skin and without skin model is built using histogram. A series of more than 13000 photographs are utilized to create the same. Around 4000 photos are shown to have skin their pixels while remaining were non-skin pictures. The marking method is detailed further in coming sections.

          The most important property of a skin detection algorithm is

          the working trademark which helps in finding the different varieties and types of skin available in different pictures around the web. Incidentally the ROC bend is not dependent on Bayesian models of detection. Other types of models other than RGB do not actually enhance the quality of execution and extraction and therefore, we stick to the RGB model in this work for designing the algorithm.

          Identifier execution relies totally on the tests for skin and non-skin types of pictures. Those, hues which happen in both types and have very similar frequencies can't characterized dependably. In none of the settled worldwide change which shading empty places can influence this highlight. Then again, shading standardization which

          conform the hues in a picture in light of its worldwide characteristics is useful to isolate the different types of skins. In this study, there is no utilization of shading standardization since current calculations don't function admirably enough over an extensive variety of pictures.

      4. Skin Detection using Histogram

    The headways of picture handling make sure that a newer part of calculations to cook the advanced difficulties. Along these lines, different ascribes of picture are taken among different skin characteristics. The shading has ended up being a helpful and hearty signal for the identification of lips and face ongoing tracker, target recognition, discovery of intruders in the fringe and movement analysis.

    Moreover, types of skin shading are created employing extensive arrangement of pictures. The above techniques face difficulties in changing the places in the pixels. There are frameworks utilized for recognizing individuals as a part of client intermediate part. Many a applications also use models which are quite common in the industry including but not limited to the histogram ones. In this work, relative execution of various skin types is also performed.

    A circular limit model is utilized in this work. A combination of skin models for different races is used and is combined with the existing algorithm to show superiority. In these frameworks, the shading model is also utilized in an efficient way without bothering about the type of pixels compared among different images. Non-skin type of work is mostly avoided to show proficiency.

    Although colour models are superior than any other model, they cannot be used globally due to their limitations in the approach as there are non-colour images present in the world.

    This work proposed herewith uses the differentiated colour model. The model uses various pictures from the Internet and is superior to any other model present in the literature. The skin colour is properly differentiated and is used to show the good efficiency along with faster processing.

    In this section we have just came to know about the introduction of project and the methodology used in Histogram for skin detection. In the next section we are going to know about the literature survey. The earlier work on this topics and all.

  3. NON PARAMETRIC HISTOGRAM BASED SKIN MODELLING

    1. SYSTEM ANALYSIS

      In this section we are going to know about the existing technique and work done on in this project.

    2. Existing Scenario

      This section presents the available existing techniques and their disadvantage which can be worked upon.

    3. Skin Detection using Fusion Technique

      Skin shading has vital sign to derive assortment of angles including excellence, race, culture and age and so forth. Discovery of skin shade of human is most significance in various applications including motion investigation, perceiving human by human and/or machine and face following. Recognition of skin shading pixels and non-skin shading pixels and its order is very testing undertaking. The human visual frameworks combine shading opponency. Additionally, in a picture the skin shading is touchy to different variables, for example, camera attributes, ethnicity, haircut, cosmetics, shadows, brightening, movement foundation hues, likewise impact skin shading appearance.

      A solid human skin recognition technique that is versatile to various human hues and enlightenment. It is crucial for partitioning the skin types for detection+. Albeit different human skin shading discovery arrangements have been viably connected, they prostrate with bad skin identification. Therefore, these methods cannot be used to detect skins hues crosswise over various ethnic.

      Despite the fact that diverse human skin-shading location arrangements have been effectively connected, the inclination to bad skin identification is not prepared. In addition, existing techniques need good amount of processing power. In this work, a mixed model based skin detection algorithm is proposed and designed along with novel results.

      The method works irrespective of ethnicity, race and type of skin texture. Special care is taken in providing algorithm with sufficient amount of data in the form of images so that there should not be any kind of mismatch in real-time usage of this application. Also, the prime assumption used is that it has variety of images and the data set is exhaustive not exclusive.

    4. Proposed System

      There is a need of the hour to develop a skin detection type of model which should work not only in a robust manner but also should take minimum amount of processing time. A straightforward answer comprises presenting a picture in the pixel format and analyzing it. At point when the measure of accessible preparing information is little, complex learning calculations might be required to interject between tests.

      Be that as it may, as an after effect of the Internet, the vision group is the largest repository of data images. So, this expansive information base can bolster basic, and effective methodical calculations. Be that as it may, an information set, for example, web pictures constitute a one-sided test from the space of conceivable symbolism. The accompanying segment depicts the development and representation of histogram shading models.

    5. Histogram Colour Models

      The main approach to get the skin detected is to have pixel showing the colour of an image. The pixels are then processed such that each block of pixel should show us the type of colour it has. The colour matching in turn shows that whether the said colour can be treated as skin or not.

      Also, there should be some interjections of images to create a complete dataset of skin and non-skin type of ground rules. A skin should not be confused with the object colour and the object colour should not be treated as skin colour. By providing andusing complex algorithms and learning based methods, one can easily achieve this goal.

      The method works irrespective of ethnicity, race and type of skin texture. Special care is taken in providing algorithm with sufficient amount of data in the form of images so that there should not be any kind of mismatch in real-time usage of this application. Also, the prime assumption used is that it has variety of images and the data set is exhaustive not exclusive.

    6. Proposed System

      There is a need of the hour to develop a skin detection type of model which should work not only in a robust manner but also should take minimum amount of processing time. A straightforward answer comprises presenting a picture in the pixel format and analyzing it. At point when the measure of accessible preparing information is little, complex learning calculations might be required to interject between tests.

      Be that as it may, as an after effect of the Internet, the vision group is the largest repository of data images. So, this expansive information base can bolster basic, and effective methodical calculations. Be that as it may, an information set, for example, web pictures constitute a one-sided test from the space of conceivable symbolism. The accompanying segment depicts the development and representation of histogram shading models.

    7. Histogram Colour Models

The main approach to get the skin detected is to have pixel showing the colour of an image. The pixels are then processed such that each block of pixel should show us the type of colour it has. The colour matching in turn shows that whether the said colour can be treated as skin or not.

Also, there should be some interjections of images to create a complete dataset of skin and non-skin type of ground rules. A skin should not be confused with the object colour and the object colour should not be treated as skin colour. By providing and using complex algorithms and learning based methods, one can easily achieve this goal.

IV SYSTEM IMPLEMENTATION

In this chapter, implementation scenarios and system aspects are discussed.

    1. List of Modules

      • Initialization

      • Skin Colour model

      • Skin Modelling

      • Skin probability computation

      • Skin Likelihood Computation

    2. Module Description

      In this section we are going to describe about the various modules which are used in the project. The main task is to

      construct statistical model of image appearance for pixel data. This consist of a representation of image learning algorithms and source training image.

    3. Initialization

      Skin identification is characterized for identifying shaded pixels including the areas in a picture or moving slideshows. Skin shading emerges because of melanin and hemoglobin, however there are numerous different articles on the planet which are effectively mistaken for skin, certain sorts of wood, copper, sand and in addition garments regularly have skin like hues. In this manner there is a need to appropriately plan the skin finder, beating every one of the troubles that emerge in distinguishing skin in a video.

      Skin discovery process constitutes of two stages: a preparation stage and a location stage. Preparing a skin identifier includes three essential strides:

      • Gathering images from different resources.

      • Tapping community for images

      • Choosing part of colour images.

      • Designing skin classifier.For a given skin detector, finding out the skin frames involves following steps:

      • Convert video into colour types or pixel based frames

      • Classify frame using the appropriate algorithm

    4. Skin Colour Model

      Hemoglobin and melanin are the primary reason for skin color. Using an appropriate model of colour one can differentiate between skin or not. Skin and non-skin colors in un-normalized color space. Around 13,640 photo dataset is constructed for Skin and non-skin histogram models. The skin pixels in the 4675 images containing skin were labeled manually and placed into the skin histogram. The 8965 images that did not contain skin were placed into the non-skin histogram. Given histogram models of skin and non-skin in a skin pixel classifier can be constructed. Such a classifier are useful in two scenario. One, for detection and recognition of faces and figures, skin that can be used to focus on the most relevant portions of an image .And next role in image for skin pixel detection is indexing and retrieval. Where the presence of skin pixels in a image is an attribute that support queries or categorization [9].

      A colour might seem different in different kind of lights. For example a skin colour in white light is very bright while in a bulb it might seem yellowish orange. If we are under consideration of a skin colour, the same skin should be detected same even under the different light conditions. This is an important aspect as the camera images at different locations and at different time zones is always different.

    5. Skin Modelling

      Also, one of the important objectives of skin shade discovery is to have pixel based detection which should not consider surroundings. This kind of contouring technique should be well suitable for all kind of images irrespective of their colour.

      The issues which are to be handled are as follows:

      • All unique histogram must be comparable and detectable

      • Each pixel graph should be quickly be able to get

        The work carried out uses the Bayesian based approach which is the best in industry.

        ( )

        (4.3)

        converted into histogram ( )

      • The analysis time should not exceed more than milliseconds

        ( )

        ( )

        = (())

        (4.4)

      • The processing power requirements should be minimal.

Each of three histogram measurements is separated into 256 receptacles, and every container stores a whole number checking the quantity of times that shading esteem happened in the whole database of video. The RGB model is the most suitable model for this kind of approach which should be very accurate and mistakes are not allowed in this.

4.8 Skin Likelihood Computation

There are also loglikelihood calculations which are used in this approach. For a particular histogram pixel and color the log likelihood of it being skin is calculated using the (4.5).

The same are also calculated using pixels and histogram and is illustrated in the below equation.

Using Bayes theorem, the skin can be represented as a

= ((,,))

(,,)

(4.5)

probability function shown in below equation (4.1).

Skin and non-skin histogram are separately plotted and compared using pixel analysis and matching.

( )()

(

) =

(4.1)

()()+()()

In a sample chosen video, the LL of all the frames is different. The threshold approach is also used which assigns bit 1 or 0

A particular RGB value is labelled skin if the condition in (4.2) is satisfied:

() (4.2)

The above mentioned probabilities are complementary to each other and therefore finding one means that the other is already known. Also, the sum of these probabilities is one.

These probabilities can be found using the pixel analysis by dividing the skin pixels with the total number of pixels present in the image.

    1. Histogram Based Skin Classifier

      The image can be classified using the pixel analysis where the histogram can easily show us what kinds of pixels are there in excess in an image. The pixel can then be compared with the neighboring ones and hence a skin detected image can be outlined.

      The region of convergence based appoach is used in this work which does not restrict the type of image or size of image to be used. Also, the false findings are used as learning to improve the algorithm itself and therefore there is no wastage of processing power.

      The RGB based 24 bit modelling approach ensures that there is no colour missed or lost from the image and there is ample amount of data available which can be compared with the image. The results presented in the next section coherently convey the findings of our work.

    2. Skin Probability Computation

The model works on probability basis along with the learning methods. As one cannot be sure whether an image is skin or not, we use the pixel based probabilistic analysis to find the truth using the comparison.

for different types of images.

In case, the approach does not work, we use it as a learning method and devise a new method to solve it. The work also focuses to create an eco-system of skin detection which can be used in future for a complete system in mentioned applications.

V. RESULTS AND DISCUSSION

Results and Discussion

Implementation of skin detection contain steps like original image skin likelihood image, Likelihood Threshold Image and overlay image. The detector works step by step – First, Input image is manually given and skin and non-skin pixel are marked. For skin pixel the RGB histogram is created.

Totally there are three images as output result they are skin- likelihood, likelihood and overlay images.

Likelihood is a synonym for probability. The probability of outcomes for the given set of parameter is called likelihood. Same way skin-likelihood is the probability of skin areas in a given image.

The proposed skin detection technique is tested on DELL PC (windows installed) with MATLAB software installed. The video of 20s is given as input, there are 300 total frame, 15 frames per second. The video is played and it takes small amount of time for processing. The video is processed in frame by frame. The processing technique is same for image and a single frame. As we cant see all the different result at a time we make all results original frame, skin-likelihood frame, likelihood frame and overlay frame in a single figure and taken and it is shown in the last Figure 5.5.

The system is implemented using MATLAB and is completely shown to perform better as compared to methods present in the literature. Figures 5.1 show the original image used in the system as input.

The Graphical User Interface (GUI) is used for the following studies of case:

Case 1: Clicking input image, Figures 5.1 will appear with the capability for user to choose a folder for storage.

Case 2: Figures 5.2 will appear for skin-likelihood. Case 3: Figures 5.3 will appear for skin map.

Case 4: Figures 5.4 will appear for overlay image.

The complete MATLAB plots are now shown herewith in the sub-sections to come. As shown in Figure 2, the original image shows a group of people with different colour of skin.

This image is particularly chosen so that all types of algorithms and methods designed in this thesis can be showcased.

Implementation of skin detection includes main steps such as skinlikelihood, Computation and threshold. Skinness is calculated for a given image by fixing the threshold to zero. Fig. 4 shows an input image which when subjected to designed system will yield results as shown in the figures to follow.

The analysis of the above GUI is discussed through the following cases.

Case1: When the input image button is clicked, the Fig. 4 appears. Select the folder where the images are stored.

Case2: When the skin likelihood button is clicked, Fig. 5 appears.

Case3: When the skin map button is clicked Fig.6 appears.

The skinness detected for different set of images are tabulated in the Table 1 using the (6)

S=Log (H(r,g,b)/h(r,g,b)) (6)

Fig5.1:Input Image Fig5.2: Skin Likelihood

Fig5.1:Input Image Fig5.2: Skin Likelihood

Fig 5.2: Likelihood Threshold Fig5.3: Overlay Image

Fig 5.2: Likelihood Threshold Fig5.3: Overlay Image

Figure5.4 :Result of video frame

V. CONCLUSION AND FUTURE SCOPE

In this segment, the conclusion is introduced which represented that the proposed framework gives an elite and less calculation speed skin recognition strategy which is better than the current frameworks. Skin indicator is a capable pre-handling method. This helps a client to play out a much precise, abnormal state picture preparing. Skin identification gave in adjusting environment there by clearing approach to outline a strong framework.

The numerous applications of image processing have motivated the researchers and scholars across the globe to look for newer challenges and solve them systematically to simply the lives of each and every human being. Detection is a measurable skill which provides an outline to improve a system, method, technique, device or stuff. Skin detection is one such skill which is seeking multiple applications

including but not limited to differentiating background, virtual reality and real virtually.

There are multiple methods available for skin detection which is nothing but a sequence to find pixels which may be of skin or non-skin coloured. The different regions in an image or video may be detected for different skin colours. The colour of skin is due to hemoglobin and / or melanin. Apart from these natural colours, there are artificial object such as wood, copper or sand which might get detected in place of skin in a skin detection technique. In view of this, it is essential not only to devise a faster algorithm but also, one must look into the accuracy of the outputs.

In this project, a decision rule based system is proposed which can differentiate between skin or non-skin types using pixel analysis. In this system video is taken as an input. Then video is converted into frames. The histogram is computed for each frame in the video. Bayes method of classification is used to find the probability of skin in each frame. Furthermore, using the images which were trained using the algorithm, skin likelihood is detected for frames. Last but not least, we use threshold for creating skin-map. A skin-map is nothing but a binary image with skin assigned a value of 1 and non-skin 0. Therefore, a high-level image processing algorithm is designed.

With the help of Skin detection system, we bring a robust system into the field which will not only guide the researchers but also create a path for adopting new environments.

Our future work includes usage of probabilistic and markov models to detect the skin using the combination of analytical as well as prediction framework. Work will also be sought to obtain high accuracy without loss of original data contained in the pixels of image. A high performance video processing toolbox will then be created which will enable the community for further research in the field

REFERENCES

  1. Bernt Schiele and Alex Waibel. Gaze tracking based on face-color, In Proceedings of the International Workshop on Automatic Face-and Gesture-Recognition, pages 344 349, Zurich, Switzerland, June 26- 28, 1995.

  2. Rick Kjeldsen and John Kender. Finding skin in color images, In Proceedings of the International Conference on Automatic Face and Gesture Recognition, pages 312317, Killington, VT, October 14-16, 1996.

  3. T. S. Jebera and A. Pentland. Parameterized structure from motion for 3d adaptive feedback tracking of faces, In Proc. Computer Vision and Pattern Recognition, pages 144150, San Juan, Puerto Rico, June 17-19, 1997.

  4. Menser, B., and Wien, M. 2000. Segmentation and tracking of facial regions in color image sequences. In Proc. SPIE Visual Communications and Image Processing 2000, 731740.

  5. Jones, M. J., and Rehg, J. M., Statistical color models with application to skin detection, In Proc. of the CVPR '99, vol. 1, 274- 280, 1999.

  6. li>

    Terrillon, J.-C., Shirazi, M. N., Fukamachi, H., and Akamatsu, S., Comparative performance of different skin chrominance models and chrominance spaces for the automatic detection of human faces in color images, In Proc. of the International Conference on Face and Gesture Recognition, 54-61, 2000.

  7. Hsu, R.-L., Abdel-Mottaleb, M., and Jain, A. K., Face detection in color images, IEEE Trans. Pattern Analysis and Machine Intelligence 24, 5, 696-706, 2002.

  8. Yang, M.-H., and Ahuja, N., Detecting human faces in color images, In International Conference on Image Processing (ICIP), vol. 1, 127- 130, 1998.

  9. M. L. J. Shruthi and B. K. Harsha, "Non-parametric histogram based skin modeling for skin detection," Computational Intelligence and Computing Research (ICCIC), 2013 IEEE International Conference on, Enathi, 2013, pp. 1-6.doi: 10.1109/ICCIC.2013.6724287

Leave a Reply