Abstract:
A person tracking method and apparatus using a robot. The person tracking method includes: detecting a person in a first window of a current input image using a skin color of the person; and setting a plurality of second windows in a next input image, correlating the first window and the second windows and tracking the detected person in the next input image using the correlated results.

Description:
CROSS-REFERENCE TO RELATED APPLICATION  
       [0001]     This application claims the benefit of Korean Patent Application No. 2004-0066396, filed on Aug. 23, 2004, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference.  
       BACKGROUND OF THE INVENTION  
       [0002]     1. Field of the Invention  
         [0003]     The present invention relates to a person tracking method and apparatus using a robot, and more particularly to a method and an apparatus for detecting a person from an input image and tracking the motion of the detected person using a robot.  
         [0004]     2. Description of Related Art  
         [0005]     Recently, a robot has been spotlighted as a system to replace humans for simple tasks in a home or in a place hard to access in person. Currently, the function of the robot is only to perform simple repeated tasks. A prerequisite for performing more intelligent works is an interaction with the person who employs the robot. For smooth interaction, the robot needs to be able to locate and track the user so that it stays in the vicinity of the user.  
         [0006]     One way a robot can locate and track a user is by face detection. Most existing face detecting devices locate a person indoors or outdoors using a method of storing a background image and then detecting motion of the person using a difference image obtained by subtracting the background image from the input image, or a method of tracking the location of the person using only shape information. The method using the difference image between the input image and the background image is very efficient in a case of using a fixed camera, but not for a continuously moving camera arranged in a robot, because the background image continuously changes. On the other hand, the method using the shape information of the person takes a long time to locate the person by matching a plurality of model images, similar to a person shape, to the whole input image.  
       BRIEF SUMMARY  
       [0007]     An aspect of the present invention provides a method and apparatus for detecting a person using a skin color from an input image and tracking the detected person.  
         [0008]     According to an aspect of the present invention, there is provided a person tracking method including detecting a person in a first window of a current input image using a skin color of the person; and setting a plurality of second windows in a next input image, correlating the first window and the second windows and tracking the detected person in the next input image using the correlated results.  
         [0009]     According to another aspect of the present invention, there is provided a person tracking apparatus including: an image input unit which outputs continuous images; a person detecting unit which detects a person from a current input image in a first window using a skin color of the person; and a tracking unit which sets a plurality of second windows in a next input image following the current input image, correlates the first window and the second windows and tracks the detected person in the next input image using the correlated results.  
         [0010]     According to another aspect of the present invention, there is provided a computer-readable storage medium encoded with processing instructions for causing a processor to perform a person tracking method including: detecting a person in a first window of a current input image using a skin color of the person; and setting a plurality of second windows in a next input image, correlating the first window and the second windows and tracking the detected person in the next input image using the correlated results.  
         [0011]     According to another aspect of the present invention, there is provided a robot, including: an image input unit receiving an image and outputting a captured image; a person detecting unit detecting a person in the captured image using a skin color of the person; a tracking object determining unit selecting a detected person in the captured image as a tracking object; and a tracking unit moving the robot a location near the observation object and tracking the observation object at the location.  
         [0012]     Additional and/or other aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention  
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0013]     The above and/or other aspects and advantages of the present invention will become apparent and more readily appreciated from the following detailed description, taken in conjunction with the accompanying drawings of which:  
         [0014]      FIG. 1  is a block diagram of a person tracking apparatus according to an embodiment of the present invention;  
         [0015]      FIG. 2  is a flowchart illustrating a person tracking method according to an embodiment of the present invention;  
         [0016]      FIG. 3  is a detailed flowchart illustrating a person detecting operation;  
         [0017]      FIG. 4A  illustrates an input image and  FIG. 4B  illustrates the image with RGB colors normalized;  
         [0018]      FIG. 4C  illustrates regions that are detected as candidate regions from the input image;  
         [0019]      FIG. 5A  illustrates an example of the first normalization for a candidate region on the basis of the centroid of the candidate region;  
         [0020]      FIGS. 5B, 5C  and  5 D illustrate examples of the normalized input images;  
         [0021]      FIGS. 6A, 6B  and  6 C respectively show Mahalanobis distance maps for  FIGS. 5B, 5C  and  5 D;  
         [0022]      FIGS. 7A through 7D  schematically illustrate a process of detecting persons from an input image;  
         [0023]      FIG. 8  is a flowchart of a particle filter method;  
         [0024]      FIG. 9A  illustrates a normalization window image at time (t-1) and  FIG. 9B  illustrates the normalization window images obtained by centering around each sample; and  
         [0025]      FIG. 10 , parts (a)-(h), illustrates a process of tracking a moving person. 
     
    
     DETAILED DESCRIPTION OF EMBODIMENTS  
       [0026]     Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. The embodiments are described below in order to explain the present invention by referring to the figures.  
         [0027]      FIG. 1  is a block diagram of a person tracking apparatus according to an embodiment of the present invention. The person tracking apparatus includes an image input unit  13 , a person detecting unit  10 , a tracking object determining unit  11  and a tracking unit  12 .  
         [0028]     The image input unit  13  outputs an image captured by a photographing arrangement (not shown), and can be any type of camera which can photograph a moving person. The person detecting unit  10  detects the person using a skin color of the person from the image input from the image input unit  13 . When multiple persons are detected in the person detecting unit  10 , the tracking object determining unit  11  determines (i.e., selects) one of the detected persons, for example, a detected person who is the nearest to the centroid of the detected persons in the image as a tracking object. If the tracking object is determined, the robot approaches to a certain distance from the tracking object using the location and distance information of the tracking object.  
         [0029]     The operation of the person tracking apparatus illustrated in  FIG. 1  will now be described in detail with reference to the flowchart in  FIG. 2 .  
         [0030]     First, the person detecting unit  10  detects the person from the input image (operation  20 ).  FIG. 3  is a detailed flowchart illustrating the person detecting operation  20 . Referring to  FIG. 3 , first, color information of the input image is converted (operation  30 ). The color information conversion is to reduce the effect of the illumination included in the input image and emphasize skin color regions. RGB (Red, Green, and Blue) colors of the input image are converted into a normalized rgb domain as shown by equation (1).  
               r   =     R     R   +   G   +   B         ,     g   =     G     R   +   G   +   B         ,     b   =     B     R   +   G   +   B                 (   1   )             
 
         [0031]      FIG. 4A  illustrates an input image and  FIG. 4B  illustrates the input image with RGB colors normalized.  
         [0032]     Next, Gaussian modeling is performed as shown by equation (2) on an rgb image using averages (m r , m g ) of colors r and g and standard deviations (σ r , σ g ) of a plurality of skin color models. Regions where the modeled values are greater than a specified threshold value, for example 240, are detected as candidate regions for the skin color (operation  31 ).  
                     Z   ⁡     (     x   ,   y     )       =     G   ⁡     (       r   ⁡     (     x   ,   y     )       ,     g   ⁡     (     x   ,   y     )         )                     =       1     2   ⁢           ⁢   π   ⁢           ⁢     σ   r     ⁢     σ   g         ⁢     exp   ⁡     [       -     1   2       ⁢     {         (         r   ⁡     (     x   ,   y     )       -     m   r         σ   r       )     2     +       (         g   ⁡     (     x   ,   y     )       -     m   g         σ   g       )     2       }       ]           }                 (   2   )             
 
         [0033]      FIG. 4C  illustrates regions that are detected as candidate regions from the input image. The image is binarized so that the candidate regions are expressed by white and other regions are expressed by black.  
         [0034]     In operations  32  and  33 , a gray image and an edge image for the input image are obtained, respectively. The edge image can be obtained by the Sobel edge detecting method or the Canny edge detecting method.  
         [0035]     The regions corresponding to the candidate regions detected in operation  31  are extracted from the gray image and the edge image, and are normalized using the centroid and size information of the candidate regions (operation  34 ).  
         [0036]      FIG. 5A  illustrates an example of the first normalization for a candidate region on the basis of a centroid  50  of the candidate region. Each candidate region is normalized so that its height is greater than its width after obtaining a square of size of a×a centered around the centroid  50 . For example, the candidate region is normalized by (2×a) respectively in left and right sides from the centroide  50 , totally 2×(2×a) in width, and (2×a) upward and (3.5×a) downward from the centroid  50 , totally 2×a+3.5×a in height. Here, a may be the square root of the size information, that is, √{square root over (size)}.  
         [0037]     A second normalization is performed for each skin color region that is subject to the primary normalization. The second normalization is performed through bilinear interpolation.  FIGS. 5B, 5C  and  5 D illustrate examples of the secondly normalized images.  
         [0038]     Next, the normalized gray images are used to determine whether any of the candidate regions includes the person (operation  35 ). The determination is performed by applying an SVM (Support Vector Machine) to the normalized gray images. This process is described in more detail. First, a Mahalanobis distance for the normalized gray image is obtained in a block unit, each block having a size of p×q.  
         [0039]     The average of the pixel values of each block can be obtained using equation (3).  
                 x   _     l     =       1   pq     ⁢       ∑       (     x   ,   t     )     ∈     X   t         ⁢     x     s   ,   t                   (   3   )             
 
 Here, p and q respectively denote the number of horizontal and vertical pixels for each block, {overscore (x)} I  denotes the average of pixel values in a block, and x s,t  denotes a pixel value included in the block. 
 
         [0040]     On the other hand, a variance of each block can be expressed as equation (4).  
               ∑   i     ⁢     =       1   pq     ⁢       ∑       (     x   ,   t     )     ∈     X   t         ⁢       (       x     s   ,   t       -       x   _     l       )     ⁢       (       x     s   ,   t       -       x   _     l       )     T                     (   4   )             
 
 Here, T denotes a transpose. 
 
         [0041]     Using the average and the variance of each block, the Mahalanobis distance d (i,j)  and Mahalanobis distance map D can be obtained using equations (5) and (6), respectively.  
               d     (     i   ,   j     )       =         (         x   _     i     -       x   _     j       )     T     ⁢       (       ∑   i     ⁢     +     ∑   j         )       -   1       ⁢     (         x   _     i     -       x   _     j       )               (   5   )               D   =     [         0         d     (     1   ,   2     )           …         d     (     1   ,   MN     )                 d     (     2   ,   1     )           0       …         d     (     2   ,   MN     )               ⋮       ⋮       ⋮       ⋮             d     (     MN   ,   1     )             d     (     MN   ,   2     )           …       0         ]             (   6   )             
 
         [0042]     Here, M and N respectively denote the number of the horizontal and vertical blocks for the normalized gray image. If a region having a size of 30×40 in the normalized gray image is divided into blocks having a size of 5×5, the Mahalanobis distance map D becomes a 48×48 matrix.  
         [0043]      FIGS. 6A, 6B  and  6 C respectively show Mahalanobis distance maps for  FIGS. 5B, 5C  and  5 D. As shown in  FIGS. 6A, 6B  and  6 C, the gray image corresponding to the face of the person shows symmetry centered around a diagonal line from the top left corner to the bottom right corner. However, the gray image without the face of the person is not symmetrical.  
         [0044]     Because an SVM can be trained in advance to recognize the facial image of a person, the SVM is trained to determine whether an image is the facial image of the person by obtaining the Mahalanobis distance map according to equation (6) for the image normalized on the basis of each skin color region.  
         [0045]     Accordingly, by applying the Mahalanobis distance map obtained from the normalized gray image for the input image to the SVM, it is determined whether the image contains the person&#39;s face.  
         [0046]     Similarity between a normalized edge image and a model image of the person is determined through obtaining a Hausdorff distance (operation  36 ). Here, the model image of the person means the edge image for at least one model image. One or more of the edge images of the model images may be stored where the model images contain persons facing a front side, a specified angled left side and right side.  
         [0047]     The Hausdorff distance is obtained by calculating the Euclidean distances between every feature point of the model image and one feature point in the edge image and between one feature point of the edge image and every feature point in the model image are obtained as the following. That is, if the edge image A is composed of m feature points (pixels) and the model image B is composed of n feature points (pixels), the Hausdorff distance H(A, B) can be expressed by equation (7). 
 
 Here  
                 H   ⁡     (     A   ,   B     )       =     max   ⁡     (       h   ⁡     (     A   ,   B     )       ,     h   ⁡     (     B   ,   A     )         )         ⁢     
     ⁢       h   ⁡     (     A   ,   B     )       =       max     a   ∈   A       ⁢       min     b   ∈   B       ⁢          a   -   b                ⁢     
     ⁢     A   =     {       a   1     ,   …   ⁢           ,     a   m       }       ⁢     
     ⁢     B   =       {       b   1     ,   …   ⁢           ,     b   n       }     .               (   7   )             
 
         [0048]     In detail, h(A, B) is obtained by selecting the maximum value from the minimum values for m feature points (pixels) of the input edge image A where each of the minimum values is the minimum among Euclidean distances between a feature point (pixel) of the input edge image A and every feature points (pixels) of the model image B. On the contrary, h(B, A) is obtained by selecting the maximum value from the minimum values for n feature points (pixels) of the model image B where each of the minimum values is the minimum among Euclidean distances between a feature point (pixel) of the model image B and every feature points of the input edge image A. H(A, B) is determined as the maximum of h(A, B) and h(B, A). From the value of H(A, B), it can be known that how much the input edge image mismatches with the model image. The Hausdorff distances between the input model image and every model image, for example, the front model image, the left model image and the right model image are calculated, and the maximum value among the Hausdorff distances is output as a final Hausdorff distance. The final Hausdorff distance H(A, B) is compared with a specified threshold value. If the Hausdorff distance H(A, B) is less than the threshold value, the corresponding candidate region is determined to contain the person, otherwise the corresponding candidate region is determined to be the background.  
         [0049]     Using the SVM of operation  35  and the Hausdorff distance calculating result of operation  36 , the persons in the input image are finally detected (operation  37 ).  
         [0050]      FIGS. 7A through 7D  schematically exemplifies a process of detecting the persons from an input image. The color information of the input image of  FIG. 7A  is converted, and person candidate regions illustrated in  FIG. 7B  are detected from the converted color information. Also, a gray image and an edge image of  FIG. 7C  are obtained from the input image of  FIG. 7A . In the gray image and the edge image, the normalized images having a size of 30×40 pixels are obtained for each of the detected person candidate regions. It is determined whether each of the normalized gray images contains a person using a Mahalanobis distance map and SVM. The Hausdorff distances between the normalized edge images and the model images for the front, left and right sides of the face are obtained, and compared with a threshold value to determine whether each of the normalized edge images contains a person&#39;s face.  FIG. 7D  illustrates the detected multiple persons.  
         [0051]     Returning to  FIG. 2 , when multiple persons are detected in the input image (operation  21 ), the tracked object determining unit  11  of  FIG. 1  determines a tracking object as follows (operation  22 ). First, a center value for the horizontal axis of the input image is determined. For example, if the input image has a size of 320×240, the center pixel of the horizontal axis is 160. Next, a location and an amplitude of the centroid for the detected persons are obtained. The location and the amplitude of the centroid can be obtained by averaging locations of the skin color pixels of  FIG. 7B  corresponding to the detected persons by the number of the skin color pixels. A person who is closest to the obtained location of the centroid in the horizontal axis of the image is determined to be an observation object. For example, among the detected persons of  FIG. 7D , the person represented by a reference numeral  70  may be the observation object.  
         [0052]     When the observation object is determined, the robot is moved to a certain location in the vicinity of the observation object (operation  23 ) and begins to track the observation object at that location (operation  24 ). The tracking is performed using a particle filter method as illustrated in  FIG. 8 .  
         [0053]     In the tracking of the present embodiment, a location of a person for a specified measurement value can be expressed by a probability. If a sample set at time t is expressed by {8 t   (n) , n=1, . . . , N} and a weight, a state density, of a sample is expressed by π t   (n) , the weighted sample set for posterior p(x t-1 |Z t-1 ) at time (t-1) can be expressed by {(8 t-1   (n) ,π t-1   (n) ), n=1, . . . , N} in operation  80 . Here, Z t-1  is a feature value measured at time (t-1). In operation  81 , N samplings are performed from {8 t-1   (n) } to generate {{acute over (8)} t   (n) } and the generated samples undergo drift. The sampling is performed with reference to π t-1   (n) . That is, several samplings are performed on a sample having a high weight, and samplings may be not performed on a sample having a relatively low weight.  
         [0054]     The drift is determined according to a specified dynamics reflecting a conditional density function p(x t |x t-1 ={acute over (8)} t   (n) ) so that a new state of the sample is directly influenced by the previous state. The drifted samples are diffused in operation  82  so that the sample set {8 t   (n) } at time t is generated. The sample value is determined by a weighted sum of a vector of the standard normal random variates and the drifted sample.  
         [0055]     The weights of the samples are determined by each of observation densities p(z t |x t ) at each sample location as equation (8) (operation  83 ).  
                 π   t     (   n   )       =     p   ⁡     (         z   t     |     x   t       =     8   t     (   n   )         )         ⁢     
     ⁢         ∑   n     ⁢     π   t     (   n   )         =   1             (   8   )             
 
         [0056]     According to the above-mentioned process, in operation  84 , the weighted sample set {(8 t   (n) , π t   (n) )} at time t is obtained.  
         [0057]     In the present embodiment, the similarity based on color histogram is used as an observation feature. The similarity will be described in detail.  
         [0058]     The similarity is determined by a correlation between an image m 1  of a normalization window at time (t-1) and an image m 2  of a normalization window determined by centering around each sample at time t.  FIG. 9A  illustrates the normalization window image at time (t-1) and  FIG. 9B  illustrates the normalization window image obtained by centering around each sample. The similarity between the images of  FIG. 9A  and  FIG. 9B  is calculated, and a position of a sample of the window image having a maximum similarity is determined to be a tracking location in a current frame. The similarity is determined by equation (9). The size of the normalized image is (2n+1)×(2m+1).  
               likehood   ⁡     (       m   1     ,     m   2       )       =               ∑     i   =     -   n       n     ⁢       ∑     i   =     -   m       m     ⁢       [         I   1     ⁡     (         u   1     +   i     ,       v   1     +   j       )       -         I   1     ⁡     (       u   1     ,     v   1       )       _       ]     ×                   [         I   2     ⁡     (         u   2     +   i     ,       v   2     +   j       )       -         I   2     ⁡     (       u   2     ,     v   2       )       _       ]               (       2   ⁢   n     +   1     )     ⁢     (       2   ⁢   m     +   1     )     ⁢           σ   2     ⁡     (     I   1     )       ×       σ   2     ⁡     (     I   2     )                       (   9   )             
 
         [0059]     Here, I 1  and I 2  are color histograms of m 1  and m 2 , respectively, and (u 1 ,v 1 ) and (u 2 ,v 2 ) are central pixel locations of m 1  and m 2 , respectively.  
         [0060]     In equation 9, an average color histogram {overscore (I k (u,v))} of m 1  and m 2  and the variance thereof σ(I k ) are calculated using equation (10).  
                     I   k     ⁡     (     u   ,   v     )       _     =       ∑     i   =     -   n       n     ⁢       ∑     j   =     -   m       m     ⁢         I   k     ⁡     (       u   +   i     ,     v   +   j       )       /     [       (       2   ⁢   n     +   1     )     ⁢     (       2   ⁢   m     +   1     )       ]             ⁢     
     ⁢       σ   ⁡     (     I   k     )       =             ∑     i   =     -   n       n     ⁢       ∑     j   =     -   m       m     ⁢       I   k   2     ⁡     (     u   ,   v     )               (       2   ⁢   n     +   1     )     ×     (       2   ⁢   m     +   1     )         -         I   k     ⁡     (     u   ,   v     )       _                   (   10   )             
 
         [0061]     Next, a CDF of the current sample is obtained and operations  80  through  84  for the next frame are repeated.  
         [0062]     Parts (a)-(h) of  FIG. 10  illustrate a process of tracking a person who walks to and sits on a chair. As shown in  FIG. 10 , the person tracking is performed well.  
         [0063]     The above-described embodiments of the present invention can also be embodied as computer-readable code on a computer-readable storage medium. A computer-readable storage medium is any data storage device that can store data which can be thereafter read by a computer system. Examples of a computer-readable storage medium include read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, optical data storage devices, and carrier waves (such as data transmission through the internet). The computer-readable storage medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.  
         [0064]     According to the above-described embodiments of the present invention, a person can be detected and tracked, regardless of the facing direction of the person, by detecting persons from an image using the skin color and shape information of the persons, determining a tracking object, and tracking the tracking object using the color histogram information.  
         [0065]     Furthermore, using the correlation between the normalized image of the previous frame and the normalized images centered around each sample, a motion of the person can easily be detected.  
         [0066]     The above-described embodiments of the present invention can continuously track and monitor a determined person. Accordingly, since pictures can be taken continuously while tracking the specified specific person, the present invention can be applied to an unmanned camera of a broadcasting station.  
         [0067]     Moreover, the intelligence of household electric appliances can be accomplished using the location and distance information of the person.  
         [0068]     Although a few embodiments of the present invention have been shown and described, the present invention is not limited to the described embodiments. Instead, it would be appreciated by those skilled in the art that changes may be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.