Abstract:
To identify an image characteristic, a tree structured code having coding representing each of a plurality of training images is stored in a memory. Coding representing a sample image, not included in the plurality of training images, is compared to the tree structured code to identify the training image coding in the structured tree code closest to the sample image coding. A characteristic of the sample image is identified based upon the training image represented by the closest training image coding.

Description:
This application is a continuation of application Ser. No. 08/729,600 filed on Oct. 11, 1996 now U.S. Pat. No. 6,144,755. 
    
    
     FIELD OF THE INVENTION 
     The present invention relates to a system for determining poses of a test subject. More particularly, it relates to determining a direction the head of a driver of an automobile is facing. 
     BACKGROUND OF THE INVENTION 
     Operator error is a principal cause of automobile accidents. Different methods have been developed to alert drivers of dangerous conditions in order to prevent errors. As part of such systems, the driver is monitored to determine the driver&#39;s state, and whether the driver is paying proper attention to conditions of the road and vehicle. Typically, this is done by including a camera in the vehicle to take a picture of the driver. The picture is then analyzed to determine features and characteristics of the driver, such as whether the eyes are open and which way the driver is looking. The difficulty is in developing a system for analyzing the picture of the driver which operates with different drivers, different lighting conditions, and different driver positions. 
     Various techniques have been developed for analyzing images of a driver. In order to be useful, a technique must be quick and economical. It must be analyze a picture quickly in order to alert the driver of the dangerous condition and allow time for an appropriate response. In addition, it must be economical to build so that it is affordable within an automobile Techniques which use large amounts of memory or require high speed processors are not sufficiently economical. 
     In a feature extraction technique, the image is analyzed to determine specific facial features of the driver. Generally, an objective is to determine the size, shape, and position of the eyes. Features are abstracted from the image based upon the light and dark areas in the image. However, with different drivers and lighting conditions, the light and dark areas, particularly around the eyes, can vary greatly. Thus, determining the feature is difficult and requires significant processing. An example of a feature determining and tracking system is illustrated in “Recursive Estimation of Structure and Motion Using the Relative Orientation Constraint”,  Proceedings IEEE CVPR,  1993, by Messers. Azarbayejani Horowitz, and Pentland. 
     In another technique, templates representing face or feature structures are used in determining head position and orientation. The image is compared with the various templates to determine which one is closest. An example of a template matching system is illustrated in “Tracking Facial Motion”,  Proceedings of the - Workshop on Motion of Non - rigid and Articulated Objects,  app 36-42,  TERE Computar Society  1994, by Messrs. Essa, Darreil, and Pentland. The significant differences in driver images resulting from different drivers, different lighting conditions, and different appearances, makes matching with templates difficult. Furthermore, in performing the matching, significant processing is required to compare an image with each of the templates. Thus, more powerful and faster processors are required, which increases the expense. 
     In another technique, optical flow is used to determine positions of features and assumes small head movements. An example of the optical flow technique is shown in “Analysis and Synthesis of Facial Image Sequences Using Physical and Anatomical Models”,  IEEE Pat. Anal. Mach. Intell.,  15(6): 569-579, June 1993 by Messrs. Terzopoulus and Waters. In the optical flow technique, the sequence of images are used to follow features and determine a change in position from one image to the next. This requires fast processing so that the head movements between images are small. It also requires significant, processing power in order to meet these processing speed requirements. 
     Thus, a need exists for a rapid and low cost image analysis system for determining head position and pose of the driver. A need exists for a system which accomodates different subjects, appearances, and lighting. A need exists for a system which does not require high speed processing. 
     SUMMARY OF THE INVENTION 
     The present invention uses a non-linear mapping technique to map a sample image to a set of output model parameters. The model parameters principally relate to pose or head position. A training set of images and corresponding model parameters is used to learn the mapping from the inputs to the outputs. Non-parametric estimation techniques, such as nearest neighbor estimation techniques, can be used for comparing the sample image to the training set images in order to determine the output parameter. 
     According to another aspect of the invention, a tree-structure vector quantization technique is used to organize the images in the training set in order to reduce processing time and indexing costs. Each of the images, or data points, in the training set is a leaf of the tree. When an input image is received, the tree is traversed to determine a closest data point in the training set. The output parameter of the closest data point in the training set, i.e., a corresponding pose, is outputted. 
     According to another aspect of the invention, in building the tree structure, k-means clustering (with K=2) is used to separate the data points iteratively into each side of the tree nodes. Alternatively, according to another aspect of the invention, principal components analysis (PCA) is used to find a direction of maximal variation for the data points assuming an n-dimensional space. The data points are then separated into halves in the direction of maximal variation. 
     According to another aspect of the invention, a cropping window is used to select a portion of an image in order to limit the image to the face. The training set includes images with faces offset or at different distances in order to determine adjustments to the cropping window. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 illustrates hardware implementing the present invention. 
     FIG. 2 illustrates different pose positions for the training set. 
     FIG. 3 illustrates the tree-structured vector quantization organization of the images in the training set. 
     FIG. 4 illustrates one method for dividing images in the training set in order to create the tree structure. 
     FIG. 5 illustrates a cropping window. 
     FIG. 6 illustrates images in the training set for adjustment of the cropping window. 
    
    
     DETAILED DESCRIPTION 
     As illustrated in FIG. 1, the present invention can be implemented in a system  1  including a camera  20 , central processing unit (CPU)  10 , memory  30  and output  40 . The camera  20  is used to generate an image of a subject  2 , such as a driver of an automobile. According to an embodiment of the invention, the sample image would be limited to the face of the subject. However, the sample image may include other portions of the subject, and the system may be used to determine more than just face position and direction. The camera  20  provides the digitized sample image to the CPU  30  for processing. Preferably, the camera  20  provides a series of sample images over time. Each image is separately processed to determine a pose. A memory  30  is connected to the CPU  20  to store the image data while it is processed. In addition, the memory  30  includes image data for the images from the training set and the output pose corresponding to each image in the training set. Furthermore, the program steps for operating the CPU  20  to analyze the sample image from the camera are stored in the memory  30 . The CPU  20  also includes an output  40  for indicating the pose determined for the inputted image. The output  40  could be provided to other processing circuitry for determining whether a hazardous condition is present and whether to alert a driver. The use for the output depends upon the system in which the pose determining system is operating. 
     The pose determining system uses a training set of images as a basis for determining the pose. Each image in the training set is associated with a specific pose. The system then determines the closest image in the training set to the sample image. The pose of the closest image is outputted as the pose for the sample image. Different mechanisms can be used for generating the images in the training set. 
     According to an embodiment of the present invention, the training set is obtained by taking pictures of various subjects at different poses and saving them in memory  30  as images. The pose associated with each respective image is also stored. FIG. 2 illustrates a set of images at different poses for use in determining the direction the head is facing. Each row represents a vertical displacement of the pose and each column represents a horizontal displacement. For example, the subject in row  110  has no vertical tilt to the face. In row  111 , the subject is looking upward and in row  112 , the subject is looking downward. In column  120 , the subject is facing forward. In columns  121  and  122 , the subject is looking to the left and in columns  123  and  124 , the subject is looking towards the right. Fifteen different poses are associated with these images corresponding to the vertical and horizontal position of the head. In order to generate the images, the subject is photographed while looking in the direction represented by each pose. In order to accommodate different drivers, appearances, and lighting conditions, different subjects would be photographed under different conditions to generate images. Each subject and condition is photographed at all of the fifteen poses. 
     In order to efficiently search through the images in the training set in comparing with a sample image, an index needs to be used with a large set. In order to reduce indexing cost, in one embodiment, the images are organized using a tree-structured vector quantization. At each node  200  in the tree, a code is stored. Indexing involves recursively choosing the child node which has the nearest code to the code of the sample image. The process is repeated until a leaf is reached. The leaf includes one of the images  210  from the training set and the corresponding pose  220  information. In creating the tree-structured vector quantization format, each image is considered to be a vector in n dimensional space, where n is the number of pixels in the image. Thus, each image is an n dimensional code. Techniques for building a tree-structured code book are generally known, follow a recursive form, and are intuitively easy to construct. According to one procedure, the images in the training set are separated into two parts. K-means clustering (K=2) can be used for separating the images into parts. Alternatively, PCA can be used to find the direction of maximal variation of the data sets in the n dimensional space. Each image is then projected onto a weight relative to the direction of maximal variation. As illustrated in FIG. 4, each data point representing an image has a distance  310  from the direction of maximal variation  300 . Each data point or image is then assigned to one the two children depending on whether the weight is positive or negative. The process is repeated until the tree-structure is completely formed. 
     Once the tree-structure is formed, it is stored in the memory  30 . When a sample image is obtained by the camera  20 , it is also considered a vector in n dimensional space. The code for that vector is used and compared with the nodes in the tree to traverse the tree. The tree is traversed to the leaf node having a code closest to the code for the sample image. The pose  220  corresponding to the image  210  of the leaf node is then outputted through the output  40 . 
     In addition to changing head direction, the driver may also spatially move relative to the camera. Since the faces in the images of the training set are centered, erroneous results may occur for images with a face which is not centered. Such movements may be accommodated through the use of a cropping window and additional images in the training set. As illustrated in FIG. 5, a cropping window  410  can be selected out of an image  400  taken by the camera. Preferably, the cropping window  410  is placed so that the face  2  of the subject is centered relative to the cropping window. As the subject moves spatially with respect to the camera image  400 , the cropping window  410  needs to move so that the face remains centered. In order to determine movement of the cropping window, additional images are included in the training set as illustrated in FIG.  6 . Image  500  represents a subject facing forward without any vertical tilt. This would correspond to the image in column  120  and row  110  of FIG.  2 . In addition to this centered image, the training set includes additional images having the same pose with offsets to the right  510 , bottom  520 , left  530 , and top  540 . These offset images are included for each pose, subject, and lighting condition. The tree-structure vector quantization method is used with a training set including these additional images. If one of the offset images is determined to be the proper match for the sample image, then the cropping window  410  is moved in order to center the face for the next sample image. For example, if image  510  were the closest image, the cropping window would be moved to the right in order to more closely approximate image  500  for the next sample. FIG. 6 illustrates offsets in four directions. Additional offsets could also be used, such as the diagonal offsets. Furthermore, the size of the cropping window can be adjusted by including images which have larger or smaller faces relative to the image size. Thus, the system can accommodate movement of the subject toward or away from the camera  20 . Other types of transformations could also be accomodated through use of the cropping window. For example, tilt of the head could be compensated for by changing the tilt of the cropping window. 
     In one implemented embodiment, the training set includes eleven subjects, at 15 poses, with 7 images per pose (those shown in FIG. 6, and a larger and smaller face image) for tracking in position and scale. Each image consists of 40×30 pixels with one byte representing the gray scale level of the pixel. This system requires 1.4 Mb of storage for the training set. Once the tree-structure is developed, the system is able to traverse the tree to determine a pose for persons not in the training set on a 1995 SGI Indy workstation at the rate of 11 frames per second. This example only used one lighting condition. Preferably, additional subjects would be used in the training set, with additional lighting conditions. Additional memory space may be saved by reducing the size of the images ill the training set. Although a 40×30 pixel image was used in the tested embodiment, the size of the heads were much smaller, roughly 16×16 pixels. Furthermore, the processing time for additional images would not increase greatly. With the tree-structure, the number of comparisons to find a leaf node is log, (number of images). Thus, each time the number of images in the training set doubles, a single additional comparison is required. A training set using 25 subjects under 4 lighting conditions would require 2.6 Mb storage space, and 6 comparisons to traverse the tree to obtain the closest image and pose. Thus, the storage and processing requirements meet the objectives of being quick and economical. 
     Having now described a few embodiments of the invention, it should be apparent to those skilled in the art that the foregoing is merely illustrative and not limiting, having been presented by way of example only. Numerous modifications and other embodiments are within the scope of one of ordinary skill in the art and are contemplated as falling within the scope of the invention as defined by the appended claims.