Abstract:
A hand washing monitoring system ( 1 ) comprising a camera ( 2 ), a processor ( 4 ), the processor being adapted to receive from the camera images of hand washing activity. The processor analyses mutual motion of hands to determine if the hands mutually move in desired poses, and if so, the durations of the patterns; and generates a hand washing quality indication according to the analysis. The processor extracts information features from the images and generates feature vectors based on the features, including bimanual hand and arm shape vectors, and executes a classifier with the vectors to determine the poses. The processor uses edge segmentation and pixel spatio-temporal measurements to form at least some of the feature vectors.

Description:
INTRODUCTION 
       [0001]    1. Field of the Invention 
         [0002]    The invention relates to monitoring of hand washing. 
         [0003]    2. Prior Art Discussion 
         [0004]    It is well known and documented that transmission of infection in environments such as hospitals and kitchens due to incorrect hand washing is widespread, has a major detrimental effect on health, and a huge financial cost. 
         [0005]    In both healthcare and food preparation environments training is given in hand washing techniques. While there is a recognized problem to encourage people to wash their hands in the first place, it is also critical that they do so in an effective manner—by following the guidelines. It has been shown that particular areas of the hand are frequently missed with hand washing—notably the tips of fingers and the thumbs. Fingers are thought to be the most important part of the hand in terms of the transfer of pathogenic mirco organisms. 
         [0006]    While the recommended time for hand washing is a minimum of 15 seconds of hand rubbing, studies have shown that both long (3 mins) and short (10 seconds) can produce a ten fold reduction in the median number of transient bacteria and suggests that hand washing technique is more important than duration. 
         [0007]    A recommended technique for hand washing consists of the following phases:
       1. Apply soap, wet hands and rub palms together.   2. Rub right palm over the back of the left hand up to wrist level, and do the same with the other hands.   3. With the right hand over the back of the left hand rub the fingers, do the same with the other hand.   4. Rub palm to palm with the fingers interlaced.   5. Wash the thumbs of each hand separately.   6. Rub the tips of the fingers against the opposite palm.   7. Rinse hands thoroughly removing all traces of soap.   8. Dry hands (without touching the taps).       
 
         [0016]    WO03/079278f describes a system which executes a pattern recognition algorithm with digitized images to generate a pass/fail report for hand washing or disinfectant application. 
         [0017]    WO2005/093681 describes a cleanliness monitoring system and method involving a fluorescent tracer, a UV irradiation source, and determining the proportion of the hands which are clear of tracer. 
         [0018]    GB2337327 describes pixel-by-pixel analysis of soap on hands, and WO98/36258 also describes an approach involving pixel analysis to detect soap on hands. 
         [0019]    U.S. Pat. No. 5,952,924 describes an RFID badge to trigger measurement of hand washing. A motion sensor is used to trigger the device and an alcohol sensor is used to detect if hand washing occurs. 
         [0020]    U.S. Pat. No. 6,236,317 describes an RFID-based tracking system to ensure that people wash their hands when entering and leaving defined zones such as toilets and raw meat counters. IR reflection sensors are used to localise the user in front of the sink. 
         [0021]    U.S. Pat. No. 6,426,701 describes use of audio visual feedback to guide the user through hand washing. Proximity sensors are used to ensure that the user&#39;s hands have remained in the sink for 20 seconds. 
         [0022]    While various techniques have been described in the art it appears that they suffer from not analysing the hand washing in a very comprehensive manner. 
         [0023]    The invention is directed towards achieving improved monitoring of hand washing. 
       SUMMARY OF THE INVENTION 
       [0024]    According to the invention, there is provided a hand washing monitoring system comprising a camera, a processor, the processor being adapted to receive from the camera images of hand washing activity, characterized in that, the processor is adapted to:
       analyse mutual motion of hands to determine if the hands mutually move in desired poses, and if so, the durations of the patterns; and   generate a hand washing quality indication according to the analysis.       
 
         [0027]    In one embodiment, the processor analyses the images within a region of interest encompassing joined hands. 
         [0028]    In another embodiment, the processor generates the indication independently of the order of motion poses. 
         [0029]    In a further embodiment, the processor extracts information features from the images and generates feature vectors based on the features, including bimanual hand and arm shape vectors, and executes a classifier with the vectors to determine the poses. 
         [0030]    In one embodiment, the processor uses edge segmentation to form at least some of the feature vectors. 
         [0031]    In another embodiment, the processor uses pixel spatio-temporal measurements to form at least some of the feature vectors. 
         [0032]    In a further embodiment, the processor decomposes an image into cells and uses each cell to calculate a histogram, and combines the histograms to form a feature vector. 
         [0033]    In one embodiment, the processor generates the feature vectors using rules derived from a training phase performed with reference images. 
         [0034]    In another embodiment, the processor reduces size of the feature vectors. 
         [0035]    In a further embodiment, the processor reduces feature vector size using Principal Component Analysis. 
         [0036]    In one embodiment, the processor uses linear discriminate analysis to reduce feature vector size. 
         [0037]    In another embodiment, a self-organising map is generated to represent clustered datasets of a reduced feature vector. 
         [0038]    In a further embodiment, the processor classifies the feature vectors by executing a multi-class classifier which is trained with exemplar feature vectors to generate an estimate of a hand pose. 
         [0039]    In one embodiment, the processor performs the classification using a support vector machine. 
         [0040]    In another embodiment, the processor executes an ensemble of support vector machines. 
         [0041]    In a further embodiment, the processor determines a pose according to votes from different support vector machines. 
         [0042]    In one embodiment, the processor filters bimanual hand pose classifications. 
         [0043]    In another embodiment, the processor performs said filtering by using probabilistic bimanual hand motion models to remove anomalous results. 
         [0044]    In a further embodiment, the processor determines a time duration for a pose by registering a count of the number of image frames for a pose. 
         [0045]    In one embodiment, the processor assigns a minimum threshold for each pose. 
         [0046]    In another embodiment, the processor is calibrated for light level and/or colour changes in an image normalisation process. 
         [0047]    In a further embodiment, the processor performs segmentation according to colour, texture and/or motion to avoid noise arising from reflections. 
         [0048]    In one embodiment, the processor eliminates pixels representing watches or jewelry according to region size and shape analysis. 
         [0049]    In another embodiment, the system is battery powered. 
         [0050]    In a further embodiment, the classifier comprises an ensemble of weak classifiers. 
         [0051]    In one embodiment, the processor, before feature extraction, detects skin by normalizing pixel colour values to skin and non-skin class bins, and processes bin counts to determine skin probability values. 
         [0052]    In another embodiment, the processor executes a lighting compensation filter operating on the basis that the spatial average of surface reflectance in a scene is achromatic. 
         [0053]    In a further embodiment, the processor performs optical flow calculations based on pixel distance moved and direction of movement, and applies motion data to a filter to eliminate skin false-positive pixels. 
         [0054]    In one embodiment, the processor determines increase and decrease factors representing pixel motion increase and decrease, and applies a greater weighting to motion than absence of motion. 
         [0055]    In another embodiment, the processor performs hand and arm detection by monitoring geometric characteristics of pixel blobs, including major and minor axes. 
         [0056]    In a further embodiment, the processor performs feature extraction by generating histograms of gradient orientation in a local part of an image by accumulating votes into each of a plurality of bins, each for an orientation. 
         [0057]    In one embodiment, the processor generates a gradient orientation histogram for each of a plurality of pixel cells comprising pre-defined numbers of pixels. 
         [0058]    In another embodiment, the processor concentrates all histograms into a single vector. 
         [0059]    In a further embodiment, the processor normalizes cell histograms. 
         [0060]    In one embodiment, the processor performs a training phase in which vectors are generated from training images. 
         [0061]    In another aspect, there is provided a soap dispensing unit comprising a monitoring system as defined above. 
         [0062]    In a further aspect, there is provided a computer readable medium comprising software code for performing operations of a processor of a monitoring system as defined above. 
     
    
     
       DETAILED DESCRIPTION OF THE INVENTION 
       Brief Description of the Drawings 
         [0063]    The invention will be more clearly understood from the following description of some embodiments thereof, given by way of example only with reference to the accompanying drawings in which:— 
           [0064]      FIG. 1  is a high-level representation of a monitoring system of the invention; 
           [0065]      FIG. 2  is a flow diagram showing operation of the system; 
           [0066]      FIG. 3  shows, left, an original image and, right, a compensated image with a standard mean of 97; 
           [0067]      FIG. 4  shows motion (left) increase and (right) decrease functions with a threshold T ID =50; 
           [0068]      FIG. 5  shows skin and motion detection for a hands/arms segmentation scheme; 
           [0069]      FIG. 6  shows hand ROI selection; 
           [0070]      FIG. 7  shows HOG description, (a) original image, (b) gray image, (c) gradient image, (d) HOG cells distribution and blocks normalization; 
           [0071]      FIG. 8  is a flow diagram showing training to generate feature selection rules, and performance of feature selection during operation of the system; 
           [0072]      FIG. 9  shows single frame classification results in a sequence; and 
           [0073]      FIG. 10  is a perspective view of a stand-alone battery-operated sensor head of an alternative monitoring system. 
       
    
    
     DESCRIPTION OF THE EMBODIMENTS 
       [0074]    Referring to  FIG. 1  a monitoring system  1  comprises a camera  2 , an illuminator  3 , a processor  4 , a storage device  5 , and a display  6 . The camera  2  captures images of handwashing activity and these images are processed by the processor  4  to determine if the desired hand motions have taken place by using motion tracking techniques. 
         [0075]    The system  1  tracks the hand motions and classifies the type of motion pattern used by performing the following steps:
       Detection of the hands.   Detection if the hands are joined.   Creating a region of interest around the joined hands.   Extracting edge and region information for the hands within the region of interest to provide feature vectors.   Classifying the bimanual hand motion information (in the form of the feature vectors) using a multi-class classifier such as an ensemble of Support Vector Machine (SVM) or a cascade of weak classifiers to determine if the hands are in one of the different hand washing motions.   Ensuring that each of the steps of the hand washing have been achieved for the desired amount of time. The sequence of the washing steps is not important. What is important is the set of bimanual hand motions performed.       
 
         [0082]    The camera  2  captures images, and the processor  4  analyses the images to analyse bimanual hand washing motions to check if all of the required steps of hand washing have been adequately completed. 
         [0083]    The image processing information is used to determine if the hands are moved in predetermined patterns, that the patterns are each executed for a minimum length of time, and that all required patterns in the hand washing procedure are executed. 
         [0084]    The following describes the method in more detail, with reference to the steps of  FIG. 2  and also to  FIGS. 3-12 . 
       Image Normalisation,  70   
       [0085]    In this step the brightness, colour balance, and contrast of the image are modified on the basis of parameters measured during a set-up phase. A typical example of this is to determine the white balance of the camera by the camera capturing an image of a pure white card and associating the values it reads with pure white. 
         [0086]    Lighting compensation or color constancy algorithms are used. A greyworld algorithm is used in one embodiment. It is based on the assumption that the spatial average of surface reflectance in a scene is achromatic. Since the light reflected from an achromatic surface is changed equally at all wavelengths, it follows that the spatial average of the light leaving the scene will be the color of the incident illumination. The grey-world algorithm is defined as, 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       B 
                       C 
                     
                     = 
                     
                       
                         B 
                         std 
                       
                       
                         B 
                         avg 
                       
                     
                   
                   ; 
                   
                     
                       G 
                       C 
                     
                     = 
                     
                       
                         G 
                         std 
                       
                       
                         G 
                         avg 
                       
                     
                   
                   ; 
                   
                     
                       R 
                       C 
                     
                     = 
                     
                       
                         R 
                         std 
                       
                       
                         R 
                         avg 
                       
                     
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where BGR C  is the scale factor for every channel. BGR avg  is mean values of the specific channel in a specific frame. BGR std  is the 50% ideal grey under the canonical, i.e. the BGR avg  given by BGR avg =½BGR canonical =½2256=128. The limitation of the grey-world algorithm is that the constant standard mean value (128) will not fit well for images with a dark background, which will be over-compensated. The processor computes the standard mean value as: 
         [0000]    
       
         
           
             
               
                 
                   
                     C 
                     std 
                   
                   = 
                   
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           1 
                         
                         m 
                       
                        
                       
                         [ 
                         
                           
                             mas 
                              
                             
                               ( 
                               
                                 
                                   B 
                                   i 
                                 
                                 , 
                                 
                                   G 
                                   i 
                                 
                                 , 
                                 
                                   R 
                                   i 
                                 
                               
                               ) 
                             
                           
                           + 
                           
                             min 
                              
                             
                               ( 
                               
                                 
                                   B 
                                   i 
                                 
                                 , 
                                 
                                   G 
                                   i 
                                 
                                 , 
                                 R 
                               
                               ) 
                             
                           
                         
                         ] 
                       
                     
                     
                       2 
                        
                       xn 
                     
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
             
               
                 
                   n 
                   = 
                   
                     m 
                     - 
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           1 
                         
                         m 
                       
                        
                       
                         ( 
                         
                           B 
                           = 
                           
                             G 
                             = 
                             
                               R 
                               = 
                               0 
                             
                           
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where m stands for the number of pixels in the image and n stands for the number of non-black pixels in the image. Thus the over-compensation problem is solved. By calculating the average of the maximum and minimum channel percentage, an adaptive mean gray value of the whole image is obtained. The BGR avg  is the mean of the non-black pixels in each channel. The scale factor S C =C std /BGR avg  is applied for all pixels in the image. 
       Skin Detection,  71   
       [0087]    Using a skin detector such as a Poesia™ filter identify the regions of the image that can be classified as skin. Sometimes reflections from specular surfaces such as stainless steel sinks will also be classified as skin using this method. 
         [0088]    Non-parametric skin modeling with Bayesian models based on histograms is applied. The skin and non-skin colors are modelled through histograms. The color space RGB is normalized to a number of bins rgbεRGB and the processor counts the number of color pixels in each bin N skin  (rgb) for skin class as well as N nonskin  (rgb) for non-skin class. Finally, each bin is normalized to get the discrete conditional skin/non-skin color distribution p(rgb|skin)/(rgb|nonskin). Letting TS and TN denote the total counts contained in the skin and non-skin histograms, i.e., the number of skin and non-skin pixels in the training set, we have: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       P 
                        
                       
                         ( 
                         
                           rgb 
                            
                           
                             / 
                           
                            
                           skin 
                         
                         ) 
                       
                     
                     = 
                     
                       
                         
                           N 
                           skin 
                         
                          
                         
                           ( 
                           rgb 
                           ) 
                         
                       
                       
                         T 
                         S 
                       
                     
                   
                   ; 
                   
                     
                       P 
                        
                       
                         ( 
                         
                           rgb 
                            
                           
                             / 
                           
                            
                           nonskin 
                         
                         ) 
                       
                     
                     = 
                     
                       
                         
                           N 
                           nonskin 
                         
                          
                         
                           ( 
                           rgb 
                           ) 
                         
                       
                       
                         T 
                         N 
                       
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
         [0089]    As well as the priors: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       P 
                        
                       
                         ( 
                         skin 
                         ) 
                       
                     
                     = 
                     
                       
                         T 
                         S 
                       
                       
                         
                           T 
                           S 
                         
                         + 
                         
                           T 
                           N 
                         
                       
                     
                   
                   ; 
                   
                     
                       P 
                        
                       
                         ( 
                         nonskin 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           T 
                           N 
                         
                         
                           
                             T 
                             S 
                           
                           + 
                           
                             T 
                             N 
                           
                         
                       
                       = 
                       
                         1 
                         - 
                         
                           P 
                            
                           
                             ( 
                             skin 
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
         [0090]    Then the Bayesian formula is employed to estimate the skin/non-skin probability-according to the color of a given pixel: 
         [0000]    
       
         
           
             
               
                 
                   
                     P 
                      
                     
                       ( 
                       
                         nonskin 
                          
                         rgb 
                       
                       ) 
                     
                   
                   = 
                   
                     
                       
                         p 
                          
                         
                           ( 
                           
                             rgb 
                              
                             skin 
                           
                           ) 
                         
                       
                        
                       
                         p 
                          
                         
                           ( 
                           skin 
                           ) 
                         
                       
                     
                     
                       
                         
                           p 
                            
                           
                             ( 
                             
                               rgb 
                                
                               skin 
                             
                             ) 
                           
                         
                          
                         
                           p 
                            
                           
                             ( 
                             skin 
                             ) 
                           
                         
                       
                       + 
                       
                         
                           p 
                            
                           
                             ( 
                             
                               rgb 
                                
                               nonskin 
                             
                             ) 
                           
                         
                          
                         
                           p 
                            
                           
                             ( 
                             nonskin 
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                    
                   
                     
                       P 
                        
                       
                         ( 
                         
                           nonskin 
                            
                           rgb 
                         
                         ) 
                       
                     
                     = 
                     
                       1 
                       - 
                       
                         p 
                          
                         
                           ( 
                           
                             skin 
                              
                             rgb 
                           
                           ) 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   7 
                   ) 
                 
               
             
           
         
       
     
         [0091]    Skin and non-skin reference histograms were obtained from the open source filtering according to the Poesia project. The project has compiled 323 3D RGB histograms from the Compaq database and has left them available in two files, one for skin pixels and other for non-skin pixels. Prior probabilities of skin and non-skin are assumed to be 0.4 and 0.6 respectively. After applying equation (6) the skin detection results in a skin probability map Xp(i, j). A skin binary map Xb(i, j) can be made upon a properly selected threshold Th, 0≦Th≦1. The pixel is said to be a skin pixel if p(skin/rgb)&gt;Th, or a non-skin pixel if p(skin/rgb)″Th. 
       Optical Flow Calculation,  72   
       [0092]    This determines the way that pixels move from one image to the next. The movement at each pixel is represented as distance moved and a direction of movement. As the hands are the primary moving object in the scene they will produce the primary optical flow vectors. Reflections and water can also produce optical flow measurements. Motion information is calculated using dense optical flow measurements using the Lucas Kanade method. Coarser methods such as block matching do not provide sufficient per-pixel information to produce a reliable segmentation. 
       Background Subtraction,  73   
       [0093]    In order to have a robust segmentation process motion information is also used. The technique consists in computing an averaged image integrating both skin and motion features. For each skin pixel, which could be a false positive, the processor measures the motion, after applying an average filter over the motion magnitude image. If the averaged motion magnitude is greater than a fixed threshold T ID  the probability is increased. If it is less than T ID , then the probability is decreased. The increase and decrease values are computed according to the following equations: 
         [0000]    
       
         
           
             
               
                 
                   I 
                   = 
                   
                     
                       I 
                       F 
                     
                     ( 
                     
                       1 
                       - 
                       
                         1 
                         
                           exp 
                            
                           
                             ( 
                             
                               
                                 
                                   M 
                                   t 
                                 
                                 - 
                                 
                                   T 
                                   ID 
                                 
                               
                               
                                 0.5 
                                  
                                 
                                   T 
                                   ID 
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                     ) 
                   
                 
               
               
                 
                   ( 
                   8 
                   ) 
                 
               
             
             
               
                 
                   D 
                   = 
                   
                     
                       D 
                       F 
                     
                      
                     
                       1 
                       
                         exp 
                          
                         
                           ( 
                           
                             
                               M 
                               t 
                             
                             
                               0.5 
                                
                               
                                 T 
                                 ID 
                               
                             
                           
                           ) 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where I F  and D F  are the increase and decrease factors with which the processor tunes how fast or slow the variations are when there were motion or not, M i  is the motion magnitude of pixel i, and T ID  is the threshold value which decides if there is going to be an increase or a decrease in the output image. In  FIG. 4  the increase and decrease functions are depicted for a threshold T ID =50. The increase function reaches the maximum value quickly, whereas the decrease function is less steep. This is because to stress quickly the motion when it appears and penalize the absence of motion in a slower way. 
         [0094]    Thus skin pixels due to metal sinks and specular reflections, are removed while the hands/arms are correctly segmented only if they are moving. 
         [0095]    Accordingly, the problem of hands/arms miss detection when these ones are stopped remains unresolved. In  FIG. 5  we can see the global architecture of the skin-motion segmentation. 
       Hand and Arm Detection,  75   
       [0096]    Even with the filtering in steps  71 ,  72  and  73  some erroneous regions can still exist. The largest blobs in the scene are analysed to find regions that may be arms and hands. The shape parameters of the blobs: size, major versus minor axis, and angle of major and minor axes are used to identify the hands and arms. 
         [0000]    Hands Joined decision,  76   
         [0097]    By analysing the shape parameters of the hand and arm blobs a decision can be made about whether the hands are joined in a rubbing motion. 
       High Risk Gesture Recognition,  77   
       [0098]    If the hands are not joined the system tries to determine if the hands have gone near the taps. This would be a high risk gesture but only if it occurs at the end of the hand wash cycle. 
         [0099]    Monitoring hand motions during washing is important to ensure the cleanliness of hands. However it is also important to prevent contamination of the hands at the end of hand washing because the hands rather than an elbow were used to turn off the water supply. These actions must also be interpreted in context as it is hygienic to use the hands at the start of hand washing to turn on the water but not hygienic to do so at the end of hand washing. Thus the detection of the actions is separate to the classification of the risk behaviour. 
       Reaction of Interest Calculation,  78   
       [0100]    Based on the location of the hands within the image a region of interest around the hands is created. 
         [0101]    Once the hands and the arms are segmented the processor applies a simple connected components analysis over the binary image, removing small area components. Then, a region of interest covering the hands is selected. The vertical symmetry axis is used for computing upper and lower boundaries, which are then used for computing lateral ones. This process is depicted in  FIG. 6 . 
         [0102]    The region of interest should be square sized in order to keep a constant size and not distort the hands pose. Sometimes, the processor enlarges the width or the height to obtain a square region of interest. Then it resizes the ROI to a fixed size of 128×128 where features will be subsequently extracted. Sometimes the range of hand sizes, large hands, small hands, and the position of the hands, i.e. close to the camera, or far from the camera change the size of the hands in the image. To compensate for these scale changes the processor passes multiple ROIs to the feature extraction system e.g. 128×128, 64×64, 32×32. Extracting features across a range of scales makes the classification more tolerant to different sizes of hands in the image. 
       Feature Extraction,  79   
       [0103]    Using algorithms such as the histograms of optical flows, histograms of orientation gradients, or reduced scale images of the hands, the system extracts information and measurements from the images. 
         [0104]    Choosing discriminating and independent features is important to pattern recognition being successful in classification. Where the processor uses local Histograms of Oriented Gradients (HOG) as a single frame feature extraction method, the aim of this method is to describe an image by a set of local histograms. These histograms count occurrences of gradient orientation in a local part of the image. First the gradient image is computed. Then the image is split in cells which can be defined as a spatial region like a square with a predefined size in pixels. For each cell, the processor computes the histogram of gradients by accumulating votes into bins for each orientation. Votes are weighted by the magnitude of a gradient, so that the histogram takes into account the importance of gradient at a given point. 
         [0105]    When all histograms have been computed for each cell, the processor builds the descriptor vector of an image, concatenating all histograms in a single vector. However, due to the variability in the images, it is necessary to normalize cell histograms. Cell histograms are locally normalized according to values of the neighboured cell histograms. The normalization is done among a group of cells, which is called a block. A normalization factor is then computed over the block and all histograms within this block are normalized according to this normalization factor. Once this normalization step has been performed, all the histograms can be concatenated in a single feature vector. We use the L2-norm scheme: 
         [0000]    
       
         
           
             
               
                 
                   v 
                   -&gt; 
                   
                     v 
                     
                       
                         
                           
                             
                                
                               v 
                                
                             
                             2 
                             2 
                           
                           + 
                         
                         ∈ 
                       
                     
                   
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
           
         
       
     
         [0106]    Where ε is a small regularization constant needed because sometimes empty gradients are going to be evaluated. According to how each block has been built, a histogram from a given cell can be involved in several block normalization. Thus, there is some redundant information which improves the performance. This method is illustrated in  FIG. 7 . 
         [0107]    In order to compute the vector dimension several parameters have to be taken into account: ROI dimension, cell size, block size, number of bins, and number of overlapped blocks. The ROI size is 128×128, each window is divided into cells of size 16×16 and each group of 2×2 cells is integrated into a block in a sliding fashion, so blocks overlap with each other. Each cell consists of a 16-bin Histogram of Oriented Gradient (HOG) and each block contains a concatenated vector of all its cells. Each block is thus represented by a 64 feature vector which is normalized to an L2 unit length. Each 128×128 region of interest is represented by: 
         [0000]      Cells Row   =ROI   Width /cells Width   (11) 
         [0000]      Cells Column   =ROI   Height /cells Height   (12) 
         [0000]      CellsBlock Row =block Width /cells Width   (13) 
         [0000]      CellsBlock Column =block Height /cells Height   (14) 
         [0000]      OverlapBlocks Row =Cells Row −CellsBlock Row +1  (15) 
         [0000]      OverlapBlocks Column =Cells Column −CellsBlock Column +1  (16) 
         [0000]      Vector DIM =OverlapBlocks Row *OverlapBlocks Column *  (17) 
         [0000]      CellsBlock Row *CellsBlock Column *bins HOG   (18) 
         [0108]    Thus, the feature vectors are of 3,136 dimension. 
         [0109]    Referring to  FIG. 8  in a training phase the system uses stored videos of gestures previously identified by human observers. This information is used to select the relevant features, train the classifier and tune the filters. In a second phase, “normal operations”, the system executes the image processing, feature extraction, feature selection, classification and filtering operations. 
         [0110]    Referring to  FIG. 3 , the training phase includes:
         101 , human labelling of images,     102 , image processing of the stored video,     103 , feature extraction,     104 , dimensionality reduction,     105 , creating and applying feature selection rules,     106 , constructing a feature vector,     107 , training a classifier, and     108 , tuning the filter rules       
 
         [0119]    In the training phase the full set of features are generated using histogram of Orientation Gradients, or histogram of flows (or “spatio-temporal motion”). This generates a large number of features not all of which are contributing positively to the classification. The dimensionality of the feature set is reduced to identify and use only that sub-set of the features which contribute most to the classification of the hand motions. Mathematical techniques such as Principal Components Analysis or Linear Discriminant Analysis are used to identify this subset of features. This process is called feature selection. The subset of features to be used, typically about 10% of the original set, is passed to the classifier. The classifier learns to associate the features with the motion patterns and thus identifies the hand motions used in hand washing. The final stage of training is to tune the filters that detect and correct errors of classification by examining the sequence of hand motions along with the underlying prior probabilities of the hand poses. Mathematical structures such as Kalman filters, Bayesian networks or Markov decision processes are used to implement these filters. 
         [0120]    In the normal operations phase the image processing filters are applied, regions of interest (ROI) are identified and the feature extraction algorithms are run. A subset of the features are selected according to the prior training and concatenated to form a feature vector. This feature vector is passed to the classifier that determines which of the hand motion is currently in use. This result is filtered to remove errors resulting in the final hand motion classification. 
       Build Feature Vectors,  80   
       [0121]    An array of the measurements suitable for classification are made and only those measurements which contribute most to the classification are used. The measurements from the feature extraction algorithms are combined to create an array called a feature vector, and this could contain over 3000 different measurements. 
         [0122]    Two approaches to feature vector building are processing histograms of edge orientation, and processing histograms of spatio-temporal motion. 
         [0123]    Where histograms of flows are used to create a feature vector using the spatio-temporal information a region of interest around the hands and arms is created and dense motion vectors are extracted. The image is divided into cells and the histograms of the motion vector directions are calculated. The histograms from several subsequent frames may also be added to calculate the motion direction histogram over a sequence of frames. The histograms are normalised either globally or in overlapping local neighbourhoods. The resulting histograms are combined to form a feature vector that is passed to the multi-class classifier. This is described in more detail above. 
         [0124]    In order to reduce the dimensionality of the feature vectors the processor analyses the variance in the feature vector using Principal Components Analysis (PCA). This helps the processor  5  to identify which feature measurements are contributing most to a correct classification. The processor keeps only those features which contribute most to the correct classification; this could typically be only 10% of our original features. 
         [0125]    Also, in another embodiment a data reduction technique other than PCA is used, such as linear discriminate analysis (LDA), particularly Fischer LDA. Using smaller and better clustered data sets can allow the use of a simple K-nearest neighbour classifier that can be implemented easily in hardware. 
       Classification,  81   
       [0126]    The feature vector is passed to a multi-class classifier to produce an estimate of the current hand pose. In situations where there is little noise (good lighting, non-specular sinks) a simple classifier such a KNN (K nearest neighbour, or “supervised K means”) can be used. If a more complex and general classification problem exists an ensemble of Support Vector Machine or a Cascade of Weak Classifiers can be used. 
         [0127]    A multi-class classification system is trained using exemplar feature vectors to produce reliable classifications, a computationally efficient structure and one which generalises well to the wide variety of hand shapes, sizes and bi-manual configurations. One such approach is to use an ensemble of support vector machines. Several strategies may be used to perform this type of ensemble classification. One such strategy is to train an individual support vector machine to classify one pose against a different pose. Multiple support vector machines are trained to cover all possible combinations. The results of the different support vector machines can be combined using a voting scheme with the pose which has the highest number of votes being selected as the correct pose. 
         [0128]    In more detail, the Support Vector Machine classifier is a binary classifier algorithm that looks for an optimal hyperplane as a decision function in a high dimensional space. It is a kind of example based machine learning method for both classification and regression problems. This technique has several features that make it particularly attractive. Traditional training techniques for classifiers, such as multi-layer perceptrons (MLP) use empirical risk minimisation and only guarantee minimum error over the training set. In contrast, SVM based on the structural risk minimisation principle minimise a bound on the generalization error and therefore perform better on novel data. 
         [0129]    Thus, consider one has a training data set {x k , y k }εχx{−1, 1}, where x k  are the training examples (feature vectors) and y k  the class label. At first, the method consists in mapping xk in a high dimensional space owing to a function φ. Then, it looks for a decision function of the form: f(x)=w. φ(x)+b and f(x) is optimal in the sense that maximizes the distance between the nearest point φ(xi) and the hyperplane. The class label of x is then obtained by considering the sign of f(x). 
         [0130]    This optimization problem can be tuned, in the case of soft-margin SVM classifier (misclassified examples are linearly penalized), in the following way: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       min 
                       
                         w 
                         , 
                         ξ 
                       
                     
                      
                     
                       
                         1 
                         2 
                       
                        
                       
                         
                            
                           w 
                            
                         
                         2 
                       
                     
                   
                   + 
                   
                     C 
                      
                     
                       
                         ∑ 
                         
                           k 
                           = 
                           1 
                         
                         m 
                       
                        
                       
                         ξ 
                          
                         
                             
                         
                          
                         k 
                       
                     
                   
                 
               
               
                 
                   ( 
                   19 
                   ) 
                 
               
             
           
         
       
     
         [0000]    under the constraint ∀k, ykf(x k )≧1−ξ k . The solution of this problem is obtained using the Lagrangian theory and it is possible to show that the vector w is of the form: 
         [0000]    
       
         
           
             
               
                 
                   w 
                   = 
                   
                     
                       ∑ 
                       
                         k 
                         = 
                         1 
                       
                       m 
                     
                      
                     
                       
                         α 
                         k 
                         * 
                       
                        
                       
                         y 
                         k 
                       
                        
                       
                         φ 
                          
                         
                           ( 
                           
                             x 
                             k 
                           
                           ) 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   20 
                   ) 
                 
               
             
           
         
       
     
         [0131]    where α* k  is the solution of the following quadratic optimization problem: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       max 
                       α 
                     
                      
                     
                       W 
                        
                       
                         ( 
                         α 
                         ) 
                       
                     
                   
                   = 
                   
                     
                       
                         ∑ 
                         
                           k 
                           = 
                           1 
                         
                         m 
                       
                        
                       
                         α 
                         k 
                       
                     
                     - 
                     
                       
                         1 
                         2 
                       
                        
                       
                         
                           ∑ 
                           
                             k 
                             , 
                             l 
                           
                           m 
                         
                          
                         
                           
                             α 
                             k 
                           
                            
                           
                             α 
                             l 
                           
                            
                           
                             y 
                             k 
                           
                            
                           
                             y 
                             l 
                           
                            
                           
                             K 
                              
                             
                               ( 
                               
                                 
                                   x 
                                   k 
                                 
                                 , 
                                 
                                   x 
                                   l 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   21 
                   ) 
                 
               
             
           
         
       
     
         [0000]    subject to 
         [0000]    
       
         
           
             
               
                 ∑ 
                 
                   k 
                   = 
                   1 
                 
                 m 
               
                
               
                 
                   y 
                   k 
                 
                  
                 
                   α 
                   k 
                 
               
             
             = 
             0 
           
         
       
     
         [0000]    and ∀k, 0≦α k ≦C, where K(x k , x l )=(φ(x k ), φ(x l )). K(x k , x l ) is called the kernel function. Even though new kernels are being proposed by researchers, beginners may find in SVM books the following four basic kernels: 
         [0000]      linear:  K ( x   i   , x   j )= x   i   T   x   j . 
         [0000]      polynomial:  K ( x   i   , x   j )=(γ x   i   T   x   j   +r ) d , γ&gt;0. 
         [0000]      radial basis function (RBF):  K ( x   i   , x   j )=exp(γ∥ x   i   −x   j ∥ 2 ), γ&gt;0. 
         [0000]      sigmoid:  K ( x   i   , x   j )=tan  h (γ x   i   T   x   j   +r ) 
         [0000]    where γ, r and d are kernel parameters. 
         [0132]    The LIBSVM library is used for training and test. The RBF kernel non-linear maps samples into a higher dimensional space, so it, unlike the linear kernel can handle the case when the relation between class labels and attributes is nonlinear. The second reason is the number of hyper-parameters which influences the complexity of the model since polynomial kernel has more hyper-parameters than the RBF kernel. In addition RBF kernel has less numerical difficulties. 
         [0133]    In order to perform the multi-class classification the “one against one” method is used, in which k(k−1)/2 (with k=7 we have 21 classifiers) different binary classifiers are constructed and each one trains data from two different classes. In practice “one against one” method is one of the more suitable strategies for multi-classification problems [14]. After training data from the ith and the j th classes, the following voting strategy is used: if sign((w ij ) T φ(x)+b ij ) says x is in the ith class, then the vote for the ith is added by one. Otherwise the j th is increased by one. Then x is predicted to be in the class with the largest vote. This approach is usually referred as the “max wins” strategy. In case that two classes have identical votes, the decision values (distance to the decision surface) of each one of the classifications is taken into account as in. 
       Pose Filtering,  82   
       [0134]    The bimanual hand poses are represented as a table of transitions from prior poses with probabilities assigned. For example, if the current pose is B and the previous was E, then the likelihood of this transition is 80%. All prior and current poses are assigned poses based on training and analysis. Low probability poses are deleted as they are likely to be the result of misclassification. 
         [0135]    The use of a post classification filter allows for a small and efficient classifier to be used. Occasional classification errors are caught and rectified based on a probabilistic model of hand position reachability. For example, it is unlikely that hands may move immediately from pose A to pose F without some transition pose. It is therefore more likely that pose F is in fact a misclassification and the filter assigns the most likely transition pose. Filters operate on multiple time intervals; frame-to-frame transitions and weighted averages over several frame intervals to produce a reliable sequence of hand pose classifications to the hand motion analysis system. 
       Time and Motion Analysis,  83   
       [0136]    Poses which are sustained for a threshold number of frames (e.g. 3) are passed to an accumulator which counts the number of frames that each pose has been maintained for, which effectively counts the amount of time spent in each pose. Each pose has a configurable threshold minimum time. When all thresholds are exceeded the hands are deemed to have been washed to a sufficiently high standard. 
         [0137]    The hand pose information is used to complete a hand hygiene assessment. Each of the hand poses must be recorded for a configurable time period. Bi-manual hand washing poses can be executed in any order. This information is integrated over time and provided to the user via a graphical display such as a speaker or an audio display device. Site-specific options can be implemented regarding overall hand washing metrics such as total time and critical versus non critical hand poses. 
         [0138]    The system  1  displays on the simple low-power display  6  permanent graphics of the individual hand poses. The display is a low power LCD display. This indicates to the user that each pose has been achieved. The graphics can be easily customised for each installation. 
         [0139]    The system must deal with the challenges posed by changing lighting. A typical scenario is where a hand washing facility is positioned where there is a mix of natural and artificial lighting. Each of these light sources cause colour casts in the image and depending on the time of day the proportions of artificial and natural light can vary significantly. Because the detection of the hands is a significant issue and uses colour as a significant feature algorithms have been developed to calibrate for colour changes. These are contained within an image normalisation process. 
         [0140]    Many hand wash stations are high reflective, particularly stainless steel wash hand basins. Basing the segmentation of the hands purely on colour information can lead to significant false positives as the colour of the hands are reflected in the specular surface. By segmenting based on a combination of colour, texture and motion the specular reflections in the typical hand wash station it is possible to achieve reliable segmentation. 
         [0141]    When colour and texture are used to segment hands and arms from the background, personal jewelry such as watches and rings often result in small disconnected regions being created. Typically, small regions are also created due to background segmentation errors. Small regions would normally be deleted based on a size filter. However shape analysis of the region boundary is also used to assess if the small region is due to a background segmentation error or a personal jewelry item. The signature shape that is used is if the two shapes on either side of the split share a narrow parallel boundary and in addition the colour and texture on either side of the divide are identical. If this is the case the regions are merged. 
       Results 
     Supervised Training and Test 
       [0142]    A supervised labeling process is used for generating training and test data sets. Firstly a database with ROI images and their labels is generated. Thus the reuse of the database is assured. Secondly an off-line application computes the feature vectors for both training and test procedures. Once we have one classifier correctly trained we can use it for on-line pose recognition. The number of training and test samples, is depicted in Table 1. We have one class for each one of the different poses of the recommended hand washing procedure. 
         [0000]    
       
         
               
             
               
               
               
               
               
               
               
               
             
               
               
               
               
               
               
               
               
             
           
               
                 TABLE 1 
               
             
             
               
                   
               
               
                 Class distribution of the training and test data sets 
               
             
          
           
               
                 Data 
                 Pose 
                   
                 Pose 
                   
                   
                   
                   
               
               
                 sets 
                 1 
                 Pose 2 
                 3 
                 Pose 4 
                 Pose 5 
                 Pose 6 
                 Others 
               
               
                   
               
             
          
           
               
                 Training 
                 638 
                 780 
                 594 
                 977 
                 902 
                 1073 
                 587 
               
               
                 Data Set 
               
               
                 Test 
                 488 
                 414 
                 360 
                 456 
                 477 
                 358 
                 304 
               
               
                 Data Set 
               
               
                   
               
             
          
         
       
     
         [0143]    We can see the results after applying multi-classification with HOG features and SVM classifier in Table 2. These are single frame results which means that they are not filtered in a post-processing stage. Although detection rate is low for the “other poses” case, which is reasonable taking into account that it is the class with higher variability, all the recommended poses are classified with detection rates greater than 85%. Three of them are classified with accuracy greater than 91%, and the best classified class has a detection rate of 96.09%. A multi-frame validation process would improve these results by far. 
         [0000]    
       
         
               
             
               
               
               
               
               
               
               
               
             
               
               
               
               
               
               
               
               
             
           
               
                 TABLE 2 
               
             
             
               
                   
               
               
                 Detection Rate for the different classes 
               
             
          
           
               
                   
                 Pose 1 
                 Pose 2 
                 Pose 3 
                 Pose 4 
                 Pose 5 
                 Pose 6 
                 Others 
               
               
                   
                   
               
             
          
           
               
                 De- 
                 86.07% 
                 91.55% 
                 94.72% 
                 89.25% 
                 86.37% 
                 96.09% 
                 61.84% 
               
               
                 tec- 
               
               
                 tion 
               
               
                 Rate 
               
               
                   
               
             
          
         
       
     
         [0144]      FIG. 9  depicts the single flame classification results in a sequence. The detected class is shown with a picture at the top left of the image. The system correctly detects when the hands are separated or joined. Even with a single frame approach the classifier correctly detects the transitions between poses, which are classified as other poses class. Second, fifth and sixth poses are correctly classified in both cases: when the left hand is rubbing the right one and vice versa. 
         [0145]    Referring to  FIG. 10  another system,  160 , is illustrated. The system  160  comprises a housing  161  with a camera window  162  facing towards a sink unit. A processor is contained within the housing, and the system is battery powered. A background plate  163  extends outwardly. 
         [0146]    By implementing a system based on a cascade of efficient but error-prone segmentation and classification methods an overall highly reliable performance is achieved. This allows the system to be implemented on low cost and low power computer hardware. The resulting system can operate on a battery and could be integrated into a replaceable soap dispensing unit. 
         [0147]    The system can provide the hand washing data to an on-system storage device or can be broadcast via a wireless link to central data storage. In either case the records can for part of a HACCP (Hazard Analysis and Critical Control Points) records for use in food preparation or other hygiene standards. 
         [0148]    The invention is not limited to the embodiments described but may be varied in construction and detail.