TRACKING OBJECTS IN VIDEO SEQUENCES

Abstract: A process is described for tracking a subject in a sequence of image frames, for example received from the camera of a video film. Regions of each new image frame are classified in accordance with pre-defined criteria to determine the probability that they form part of the subject being tracked. This information is used with a record of the region previously designated as containing the subject in a previous frame, to update the designated region. In particular, a spatially varying threshold is defined with reference to the previously designated region, and regions of the new frame whose probability classification does not exceed this threshold are excluded from the updated designated region. The updating is performed only according to certain conditions, in particular to prevent excessive growth or shrinkage of the designated region. The process described can also be applied to more general subject tracking applications, for example in transferring cine film images to MPEG digital video. In such applications, a chrominance probability distribution or some other classification criterion can be used in place of motion detection.

Description: TRACKING OBJECTS IN VIDEO SEQUENCES The invention relates to methods and apparatuses for tracking subjects in motion picture sequences, to apparatuses for performing such methods and to related methods and apparatuses. The invention may be applied for example in videophones, or in the digital encoding of general motion picture sequences, for example for publishing motion pictures on optical Compact Discs . The improvement in the subjective image quality of videophone images that can be achieved by enhancing the area around the user's face, at the expense of the rest of the frame, has been known for some time and successful algorithms to accomplish this task have already been developed. Implementation of such algorithms on commercial hardware, however, has been delayed by the computational complexity. Most successful algorithms rely on techniques for edge detection and operate at pixel rates requiring much high speed hardware. Some algorithms operate on frame differences for motion detection, a much simpler technique, but they have, however, had problems in the past with changes in overall lighting intensity, movement in the background (a common occurrence in office environments), or even non movement of the user. Other algorithms exploit the fact that the video compression codec divides the image into blocks (typically of 16x16 pixels) for coding, and extracts a few parameters from each. By operating on these much smaller arrays of parameters they can run at a lower rate and are much less demanding computationally. The invention provides techniques which can detect movement on a block or pixel level but addresses the above problems through a process that discriminates between the user of the videophone and other moving objects. The techniques are also suitable for general subject tracking, when colour, or some attribute other than movement, can be used as the basis for tracking. In a first particular aspect, the invention provides a method of image processing for tracking a subject in a sequence of image frames, the method comprising: (a) defining criteria for classifying image regions as being potentially part of the subject to be tracked; (b) obtaining for each new image frame a record of an image region previously designated as containing the su ject; (c) classifyinc regions of each new image frame in accordance with the defined criteria; and (d) updating the designated region with reference to both the classification of regions in the new frame and the previously designated region. In embodiments of the invention, on the assumption that the subject being tracked does not move very far from frame to frame, regions classified as potentially part of the subject are included or not included in the updated designated area, depending on their proximity to the previously designated region. Embodiments of the invention employ a spatially varying threshold level to make this discrimination, which is defined with reference to the previously designated region. Embodiments of the invention include steps of inhibiting the updating of the designated region to prevent excessive growth or shrinkage of the designated region from frame to frame, as might happen for example when another object having the same attributes as the subject moves close to the subject being tracked. Similarly, updating of the designated region may be inhibited in the event that the updated designated region would include an excessive proportion of regions not classified as potentially part of the subject. Regions may be classified on a pixel basis, on a block basis, or on a mixture of the two. Regions may be classified in a graded form for comparison with the previously designated area, and then classified in binary form to define the updated designated region. Other features which may be advantageous generally or in specific fields of application are disclosed in the specific embodiments described below. An alternative aspect of the invention provides a method of image processing for tracking a subject in a sequence of image frames, the method comprising: (a) defining a default position for the subject within each image frame; (b) obtaining and updating over the sequence of image frames a record of the subject's position in each new frame by reference to predetermined subject identification criteria and also with reference to criteria based on a previous recorded position; (c) determining whether features satisfying the subject identifying criteria but not the criteria based on previous recorded position are closer to the default position; and (d) if such features are closer, updating the recorded position to refer to such features . This method finds particular application in a videophone, where the assumption is made that the user of the videophone is sitting centrally in the field of view of the camera. The updating step may be performed subject to a time delay, to avoid returning to the default position in error. The invention yet further provides methods for encoding motion picture images with limited data rate using the results of subject tracking methods such as are described above. The encoding method may for example be H261 compatible or MPEG compatible. The invention yet further provides a videophone apparatus including means for encoding image frames as set forth above, a motion picture signal generated by such a method, and a motion picture recording conveying images encoded by such a method. The invention yet further provides a data processing apparatus wherein elements of a stored regular two- dimensional array are designated active or inactive, the apparatus comprising means for identifying a convex hull, encompassing all active elements of the stored array, including: (a) means for scanning rows of the array to record the most extreme active element(s) in each row in a linear list; and (b) means for processing the linear list of extreme active elements to identify the desired convex hull without considering further the other less-extreme active elements in each row of the array. Such an apparatus embodies an efficient method of fitting a convex hull, for example around pixels or blocks which are designate as active in a digitised image frame. The linear list may be ordered by the scanning process, to achieve higher efficiency. Embodiments of the invention will now be described, by way of example only, with reference to the accompanying drawings in which: Figure 1 shows a preprocessing stage for motion detection in a videophone according to the invention; Figure 2 shows a sample array of changed pixel counts per block generated by the process of Figure 1 ; Figure 3 shows the same array after thresholding; Figure 4 shows the fitting of a convex hull around the thresholded values of Figure 3; Figure 5 shows a potential well formed by fitting spatially varying threshold values around the convex hull of Figure 4 ; Figure 6 illustrates the operations performed per frame for subject tracking in the videophone; Figure 7 illustrates the operation of subject tracking in a chrominance-based embodiment used in the encoding of general motion picture sequences; Figure 8 shows a conditional update method as applied in the process of Figures 1-6 or Figure 7; and Figure 9 illustrates a "return to centre" behaviour in the subject tracking of the videophone; For background information in the art of image encoding, many references are available. For the field of videophones in particular, a well known standard H261 has been developed for the efficient coding of digitised moving pictures at a data rate of 64k bits per second. This system, and an experimental setup for encoding videophone images using automatic face tracking techniques are summarised for example in a paper "A Real Time Face Location System to Enhance Videophone Picture Quality" by TIP Trew et_ aj ^ , British Machine Vision Conference Proceedings, 1992, page 488. The contents of that paper and the H261 standard are incorporated herein by reference, although the detail thereof is not necessary for an understanding of the present invention. Another encoding standard suitable for higher bit rates is known as MPEG. The particular embodiments to be described exploit the fact that the above encoding systems are block based, and perform as much processing as possible at a block level, rather than the more computationally intensive pixel level. Nevertheless, the techniques described herein are not necessarily limited to block-based processing, and can be implemented at the pixel level, if sufficient computational power is available. The first embodiment is based on an algorithm which first identifies moving areas in the frame, as distinct from uncovered stationary areas, by considering the frame differences over three consecutive frames. If the only moving object were the videophone user (hereinafter referred to as "the subject"), and the videophone camera and ambient lighting intensity remain fixed, the frame difference will contiin information only in the regions of the subject and the uncovered background. The conditions, however, are not always ideal; that is, there are other moving objects in the background and the ambient lighting conditions are variable due to, for instance, shadows falling across parts of the field of view. Either of these conditions will generate extraneous motion. This means that the frame difference signal will also contain information relating to these changes in the background. Thus the need arises to somehow differentiate between the changes in the image caused by the subject and those caused by the unwanted effects described above. If it is assumed that the subject will not have moved very far between frames this information can be used towards that end. For every new frame (F k , comprising for example 352 x 288 pixels ) , the movement information is first extracted and processed into a block format (M k ) ready for the higher level processing that forms the main part of the algorithm. This must be sensitive to the movement of areas with little texture, and yet should be immune to camera noise. The pixel-level procedure is described below and summarised in Figure 1 with a typical M k shown in Figure 2. For two frames k-1 and k, the pixel-by-pixel frame difference is calculated at 100. The magnitude of the frame difference signal is then thresholded at 102. This means that pixels whose frame difference is greater than a certain threshold are designated as having changed while the rest are designated as being unchanged. 1 if \F k {x, y) -F k _ 1 {x, y) \ > T n , 0 otherwise . where: x,y denote pixel co-ordinates, I k is the thresholded frame difference between frames k and k-1, F k denotes the kth frame of data in the sequence, T n is a threshold level . The primary reason for this thresholding is to limit the effects of camera noise. A secondary but very desirable effect of this thresholding operation is to disregard slow lighting changes, having an interframe difference below T n . Unavoidably, some movement information generated by the subject and other moving objects will be lost too, but in most cases this will be insignificant. The thresholded interframe difference I k (x,y) is then partitioned at 104 into blocks, for which a typical size would be 16x16 pixels, and the number of changing pixels in each block is counted at 106. This is the block based movement information on which the main part of the algorithm operates and will be given the symbol M k where the subscript k denotes information derived from the interframe difference between frames (k) and (k-1). N N M, (i ' ') = ∑∑ I k ^ + u) (j + v) U=0 v=G where: i,j denote co-ordinates in the block array, u,v denote co-ordinates within a block, N is the size of a block side in pixels. As mentioned above, when an object moves, the frame difference signals contain information in the locations of both the subject and the uncovered background. In order to track the subject reliably it is preferred to discriminate between the two. If the two frame differences derived from a sequence of three frames showing a moving object are considered, it is clear that the information common to both these frame differences will be in the location of the object during the second frame. This means that blocks that are non-zero in both M k and M k+1 will give the locations of moving objects in frame (k-1), while blocks that change from non-zero to zero will represent uncovered background (and those changing from zero to non-zero will represent background covered in frame (k+1)). Thus the locations of moving objects can be identified with a one frame delay through what is essentially an ANDing operation. Noise can cause blocks to be erroneously designated as being moving objects. Although most of the noise will have been removed by the pixel rate thresholding operation described above, in order to remove the residual effects of noise and simultaneously convert M to a binary format, the contents of M are thresholded giving a binary image of the frame differences. Thus any blocks wi th a number of changing pixels greater than a threshold T m are designated as being changing. The result of this thresholding operation is denoted as M' k and the result of the ANDing operation as S k . S k ( i , j ) = M' k ( i , j ) Sc M' ^ d - j ) With a block size 16x16 pixels, the count M k (i,j) can range fτom 0 (no changed pixels) to 256 (all changed), and a threshold T a =5 has been found to give good results in such a case. The M' k corresponding to the signal shown in Figure 2 with T π = 5 is shown in Figure 3. Now, the result of the ANDing operation (S k ), as described so far will naturally contain the locations of both the subject and foreign moving objects in frame (k). If it were possible for any one of the operands of the ANDing operation to contain solely information on the movement (i.e. location and uncovered background) of the subject, then S k would show the location of the subject, disregarding any foreign objects. In order to do this in accordance with the invention a spatially varying threshold, which is hereinafter referred to as a "potential well", has been devised. Figure 4 shows, for the frame represented in Figures 2 and 3, an array H k identifying the regions (blocks) which are currently designated as belonging to the subject being tracked. Figure 5 shows an array P k of threshold values defining the "potential well". The schematic diagram of Figure 6 summarises the process adopted in one embodiment. It is first assumed that an array S k . j (stored at 400) identifies only the blocks that form part of the subject's location in previous image frame F k _ : . How this situation is achieved initially and maintained subsequently will be described later. A convex hull array H k _ ! (Fig. 4) is then fitted around the subject at 402, and this bounds the floor of a potential well. This potential well array P k _ ! (Fig. 5) is generated at 404 and consists of a set of thresholds for deciding whether a changing block was caused by the subject's movement or not. The array of such thresholds fitted around the subject in frame (k-1) is denoted as P _ ! • As shown in Fig. 5, these thresholds P k _ι(i,j) increase for blocks further away from the convex hull in frame F k .j . A decision is made at 406 by comparing each element M k (i,j) (representing the number of changing pixels in block (i,j)) with the corresponding element P k . j (i,j) of P k . j (the corresponding value of the potential well for that block). Those blocks whose changing pixels exceed the potential well threshold (and therefore are close to the subject) are designated as being part of the moving subject. Those blocks which contain movement but do not exceed the potential well threshold (because they are relatively distant from the subject) are designated as being part of a foreign moving object. It may be noted that in the example the value of the potential well threshold P (i,j) is only one within the convex hull itself. This value is less than the noise threshold T m which is used to obtain M' k , meaning that the regions which are very likely to form part of the subject being tracked are also extremely sensitive to noise. It has been found in practice that, in areas of a subject that lack texture or contrast, this noise sensitivity can actually aid the tracking process. Methods of convex hull fitting are known, although one novel method will be described later. The steepness of the potential well will determine how well the algorithm responds to movement: if the sides are made too steep there is a danger that if the subject moves too quickly it will overshoot the potential well and part of it will be designated as a foreign object. As an improvement to reduce this problem, the position of the convex hull can be modified by motion prediction, based on the movement observed between the previous two frames . Thus the potential well is used to discriminate between changing blocks that are attributed to the subject and other changing blocks. The comparison at 406 gives a block map 408 of changes in the subject only which is given the symbol D k . This is used instead of M' k in the ANDing operation (at 410) with M' k+1 , yielding an array S k that ideally contains only the subject's position in frame (k). S k can then be used to define a new convex hull H k and potential well P k , which in turn can be used to track the subject as it moves in frame F k+1 , and so on. 1 if M k (i,j)>P k (i,j) , D k H,j) = 0 otherwise S k {i,j) = D k {i,j) s→ M'^.d j) Other Embodiments As noted in the introduction, the presence of motion is not the only means of tracking a subject, and in general image processing (as opposed to videophone applications), motion detection will not generally be suitable for tracking an object, since the camera position itself is not fixed and the entire scene may include motion. The pre-processing stages of the process illustrated in Figure 6 can readily be adapted to implement any classifying process, which can then be used to update the designated region and the potential well which is used to track the subject further. As a particular example, a specific subset of colour space, and in particular chrominance space, can be identified which includes colours typical of the subject to be tracked. Conditional probabilities can then be established, so that, for a pixel having a given colour, a probability can be evaluated the that pixel is part of the subject being tracked. Colours which tend to appear equally in the background and the subject being tracked will be assigned a neutral probability value, while colours which tend to occur only in the subject being tracked will be assigned a very high probability value. For each new frame, it is then simple, to arrive at an array of probability values per pixel, or per block, which can be used in place of the array M k in comparison with the potential well array P _ ! . Of course in non- motion based embodiments, the ANDing process becomes unnecessary, and there is no distinction between the arrays D,„ and S k shown in Figure 6. Figure 7 illustrates in steps 700 to 708 the general tracking process as outlined above. In step 700, the region previously designated as including the subject to be tracked is shown at 710. A new position of the subject is shown dotted at 712. In step 702, the pixel values of a new frame are classified to determine the probability that each pixel or block of the new image might be part of the subject being tracked. In particular, the chrominance of each pixel is compared with a probability distribution table, to identify colours which have a high probability of belonging to the subject being tracked. Pixels (or blocks) having a fair probability of belonging to the subject being tracked are shown with diagonal hatching at 714 and 718. Regions (pixels or blocks) showing a very high probability of belonging to the subject are shown with cross-hatching, for example at 716 and 720. In the present embodiment, these probabilities are based on a chrominance distribution as described. In a videophone embodiment operating on the basis of detected motion, the cross-hatched areas can correspond to blocks with a lot of motion, with the more lightly shaded areas corresponding to blocks with moderate morion. It wiil be appreciated that the areas 714 and 716, although containing colours appropriate to the subject being tracked are in fact caused by foreign objects also represented in the image frame. Regions 718 and 720, on the other hand, truly belong to the object being tracked. Step 704 illustrates how the use of the potential well 722, defined on the basis of the previously designated region 710, can be used to discriminate between the regions which are part of the subject being tracked and regions which are not. Specifically, regions 718 and 720 fall within the low threshold part of the potential well 722, and through the comparison step (406 in Figure 6) are able to contribute to the definition of an updated designated region. Regions 714 and 716, on the other hand, fall in the very high threshold region of the potential well 722 and are unable to influence the updating of a designated region. Subject to certain conditions at step 706, which will be described below, the regions which pass the potential well test are used at step 708 to define the updated designated region 712, now shown in solid lines. Conditional Update Returning to the context of a motion-based videophone, two problems that arise in the embodiments as described so far are: (i) when the subject is motionless, the technique as described so far would lose track of it and (11) i n the cases when there are moving foreign objects behind the subject, the algorithm might incorporate them into the region designated by S k as the subject, thus causing to the designated region to grow. Figure 8 shows how these problems can be counteracted, in particular in that the potential well and the active regions array D k are not updated for each new frame, unless certain conditions are met at step 706 (Fig. 7). Specifically, for each frame, the total active area of the subject in S k is calculated at 800 and passed into a time-averaging filter (step 802). The filter taps are separated by one frame delay and their weights (coefficients) are normalised so that their sum is equal to unity. A division is then performed at step 804 to form a ratio r x of the subject's current area to its weighted time average area. If rj>l, the subject's active (moving) area is increasing compared to recent frames, possibly because the subject is being merged with a moving object in the background. Equally, if r^l it means that the subject's moving area is declining, which may be because the subject has stopped moving. Thresholds T a < and T a2 can be defined (for example 0.9 and 1.1 respectively) within which normal operation occurs. When these thresholds are violated (tested at steps 806 and 808) the algorithm does not update the designated region. In that case (step 510) the convex hull and potential well are not fitted around the new S k , D k is not updated (step 812) and the subject's area data is not allowed to propagate through the filter (step 802). The wider the range between these thresholds, the more flexibility is permitted. As the subject may not be a rigid object, some flexibility is necessary to allow it to turn, move towards or away from the camera, etc. If the thresholds are assigned too generous values, however, the process will become unstable, losing track of the subject when it becomes still, or incorporating foreign objects into the area it believes to be occupied solely by the subject. The length (in frame periods) of the filter implemented at step 804 will determine how long the algorithm retains a record of the subject's area. Its impulse response will determine how quickly the process can respond to rapid changes in area: if the most recent inputs are weighted most heavily, the bandwidth of the filter will increase, making it more responsive to rapid changes. Assuming that the area test is satisfied, a prospective udpated convex hull H k+J is calculated at step 814. The area filter's primary function is to enable the process to keep track of the subject when it does not move, although it serves equally well to restrict rapid growth of the area of S k . However, the stability imposed by the filter on S in many cases is not enough to prevent S from growing out of control when foreign objects are moving close to the subject. Thus, another test is employed in this embodiment to further control the conditions under which the process updates the designated region. This second test involves forming at 816 the ratio r 2 of the area inside the convex hull H to the moving area in S (i.e. the input to the area filter), both measured in numbers of blocks. When the area filter thresholds T al and T a2 are not violated, this ratio r 2 is compared at 816 to another threshold T r2 and the process only updates the designated region if this threshold is not exceeded. The reasoning behind the test on r 2 is that in many cases where a foreign object was mistakenly thought to be part of the subject, the two objects are only connected by a narrow isthmus, so that when the algorithm fits a convex hull H around the "active" regions in S, there will be many "holes" of background within the convex hull. This leads to r 2 >T r2 , causing the algorithm not to update. Thus, r 2 can be thought of as a measure of "compactness" of the subject and the potential well will only be updated (path 820) if the subject is reasonably compact. Trials show that values of T r2 in the region of 1.5 work well. It will be appreciated that, while the above description of Figure 8 refers to moving regions and motion as the criterion for judging that regions are likely to form part of the subject being tracked, the same test for conditional updating can be applied whether the "active regions" identified in array S are determined by reference to motion, chrominance, colour or any other classification criterion. Whereas, in a motion-based embodiment, the second area filter test at step 808 is useful to accommodate the situation where a moving subject suddenly becomes still for a period of time, in a colour-based embodiment the same test is effective in situations where the subject is temporarily obscured by an object of a different colour. Initialisation At startup, the device will have no knowledge of the subject's position. For the videophone application, it can be instructed to look for the subject in a specific area of the screen by specifying the contents of D 0 , as this is ANDed with any movement in the screen to give S 0 . The AND result S 0 will be flawed as it will be the union of the subject's position at both frames 0 and 1, but is an adequate approximation. By way of example, this initial search area may be defined to be the centre half of the screen. The normal process operation (described above) can be started when the number of active (changing) blocks in this search area exceeds twenty, for example. Furthermore, until normal operation starts: i) the potential well thresholds within the convex hull are raised to a level that is slightly above that required to counteract the effects of noise, in order to ensure that noise does not prevent the process from locking on to the subject quickly and correctly, ii) the area filter is disabled by having all its taps loaded with the current changing area (sum over S k ), thereby ensuring that T al and T a2 are not violated, iii ) the process is only allowed to update the designated region when r 2 is smaller than its previously smallest value. This feature is designed to ensure that the algorithm starts searching for the subject in the entire area specified in D 0 and then gradually converges upon the subject. In tests it was found that the algorithm locked on to the subject in approximately three frames. For general tracking of a subject in a motion picture sequence, for example in the field of generating digital video recordings from cinema films, an alternative initialisation procedure might be more suitable, in which the user manually outlines the subject to be tracked in the first image frame of the relevant sequence. The skilled person will readily appreciate how this can be implemented in a digital video editing environment. Moreover, the reader will appreciate that in such an embodiment the criteria for judging whether a pixel or block is potentially part of the subject to be tracked can be defined automatically by the apparatus, by comparing the statistics (colour distribution or whatever) of the manually designated region with the statistics of the image frame as a whole. Given that the manually designated region is known from the outset to be the region containing subject, the measures (i) to (iii) above need not be applied, as normal operation can commence immediately. Error Recovery - "Return to Centre" Inevitably there will sometimes be errors when the process loses track of the subject and locks onto a foreign object. In order to allow recovery in such circumstances a "return to centre" feature may be added, as illustrated in Figs. 9A and 9B. For each frame, the apparatus calculates the mean distances from the centre of the horizontal axis, first of the blocks encircled by the convex hull (shown for example at 900 in Fig. 9A) and secondly of the blocks designated as belonging to foreign objects (902). If the former distance "a" is greater than the latter distance "b" by a substantial number of blocks, it means that there is a foreign object much closer to the centre than the object currently designated as being the subject. In such cases the apparatus may be programmed to assume that the subject is, in fact, the object 902 at the centre of the screen and that somehow a mistake has occurred causing it to lock onto a foreign object (900). Then, the moving object at the centre of the screen will be designated as the subject and will have a convex hull and potential well fitted around it, while the object which was previously designated to be the subject is redesignated to be a foreign object. The changed situation is illustrated in Fig. 9B. This feature is also effective as a general "reset" when, for example, the subject moves out of the field of view of the camera, or if someone else wishes to use the videophone during the same conversation: in cases of dispute the algorithm will choose to track the object closest to the centre of the screen. To prevent the system from switching subjects erroneously an extra safety feature of a time delay can be added before switching to track a more central object. Selection of Region for Enhancement Since videophones and digital video systems such as MPEG operate at a fixed mean data rate, the enhancement of picture quality of the subject is achieved at the expense of that of the background. This is done by diverting information (bits) from the background to the area of interest and the tracking process allows the area to be enhanced to be restricted. For a videophone application, further restriction is possible if the head can be localised within the subject's silhouette. The region to be enhanced must of course also be aligned with block boundaries. One simple method for locating the subject's head is by placing a rectangle at an offset from the centre of gravity of the convex hull. Both the dimensions of this rectangle and its offset from the centre of gravity are selected automatically according to the total area of the convex hull. This helps to ensure that the smallest adequate region of enhancement is maintained in order to get the greatest benefit possible from the enhancement. Extracting the Convex Hull The following describes a fast algorithm used to extract the convex hull of a set of points in a two-dimensional array of discrete locations (e.g. a digitised image). The convex hull will be extracted as a set of vertices . The algorithm can be shown to have a maximum computational cost of the order of 2m 2 where m is the smallest dimension of the array, irrespective of the number of points in the set that is to be bounded. In most cases the computational complexity will be substantially less. The smallest dimension of the array is first selected. Let us assume that this is the vertical direction and that this comprises of m rows . The rightmost points of the set to be bounded are selected by scanning each row from the top to the bottom of the array. The co¬ ordinates of these points are placed sequentially in a one dimensional array A. This is repeated for the leftmost points but this time scanning from bottom to top, and these points are appended to A. Thus the clockwise circumference of the set of points to be bounded will be held in A, which in turn will have a maximum number of elements 2m. The algorithm then proceeds as follows: 1. Select the first element as a PIVOT. Define the bearing of a vector as the angle that this vector makes with the upwards pointing vertical axis . 2. Calculate the bearings of the vectors from the pivot to each point in a position further down the array A. Then select the point in the array A whose vector from the pivot has the smallest bearing. Define this to be the LANDING POINT. To avoid having to calculate ARCTANs to do this, we can consider the slope that the vectors make with the axis of smallest dimension (defined to be the vertical axis in this case) and add the appropriate offset according to the signs of the vector components to take into consideration the quadrant in which the vector lies. If two points in A have the same bearing, the one with the greatest array index (the one furthest away in the array A from the pivot) is selected to be the landing point. 3. If the landing point is not the last point in the linear array A, designate the landing point to be the next pivot and proceed from step 2. When the landing point is also the last point in A (which will necessarily be on the convex hull), the pivot points will define the vertices of the convex hull. Caution must be taken in case a row in the two dimensional image has only one point which is in the set of points to be bounded. In this case, this point will appear twice in the array. To avoid such errors the (k+l-i)th point must be ignored if it happens to have the same horizontal co-ordinate as the ith point (the vertical co-ordinates will necessarily be identical as these two points will be on the same row) . Let us denote the pivot point and landing point co- ordinates as (x p , y p ) and (x l r y λ ) respectively. Then we can use equation A.l in order to find the co-ordinates of every point (x c , y c ) on the line segment of the convex hull between the pivot and landing points: where: y c takes values between y p and y lr and s is the slope that the vector from the pivot to the landing point makes with the axis of the smallest dimension (in this case the vertical axis). This convex hull extracting algorithm owes its speed to two factors, firstly there is the pre-processing: instead of considering the whole set of points to be bounded we only consider two from each row. During trials of the face location algorithms it has been found that the subject comprised approximately 120 blocks, whilst the convex hull extracting algorithm was only considering 18 or 20 blocks in the linear array A. The second source of computational saving comes from the ordering in the linear array A and the pivoting action: during the search for the next pivot, the algorithm need only consider the points in the A array with a greater index number than the pivot. Therefore, if the convex hull can be defined by a small number of vertices compared to the number of points in A, the number of bearing calculations will be small. An alternative algorithm to find the convex hull is the Graham Scan (see R. Sedgwick, "Algorithms", p.326, Addison-Wesley, 1983), which can be used with a few modifications. This algorithm relies on forming a closed polygon from all the points in the set to be bounded. It then considers each side of this polygon as a line segment and, using this information, decides which points form part of the convex hull and which are bounded by it. Thus, the Graham Scan can be used on the points in A, which are already in the required closed polygon form. The computational complexity of the convex hull algorithm after the preprocessing will be of the order of 2m. Implementation The implementation of the above embodiments requires frame differences or chrominance probabilities, to be taken at pixel rates which, in turn, requires a full size frame storage buffer. Subsequently, however, most operations are carried out at block-level resolution on binary data. Thus the storage requirements are small. The computationally intensive part of the process is that which has to be done at pixel rates, and specialised image processing hardware of conventional design can be employed. Of the higher level processes running at block rate, the most computationally intensive parts are the fitting of the convex hull and the potential well around S. Fortunately a fast algorithm for convex hull extraction is described above, and the potential well is only fitted when there is enough change to warrant an update. The area filter operations are very straightforward and the rest of the computations are mostly logical or comparative operations which are relatively easy to carry out. In the embodiments which rely on a number of changing pixels per block for movement detection, it is important that the system's camsra or other video source is not too noisy. As mentioned above, the apparatus has a substantial amount of built-in noise immunity, but once this is overcome the noise would cause the performance to degrade rapidly. Another very important factor to the performance of the tracking process is the amount of contrast in the images, when the process depends on frame differences. If there is little contrast, even large movements will not cause a great deal of information to be contained in the frame differences and thus the system's tracking ability will be impaired. Lack of contrast can stem from various sources such as the camera, miscalibration of the system's ADCs or even the ADCs having insufficient dynamic range and causing clipping. This last point becomes a serious problem in extreme ambient lighting conditions (i.e. too bright). While the invention has been described chiefly in the context of tracking the head of a videophone user it is equally appliable to the tracking of any other object of interest and to systems other than videophones, for example when coding video signals for interactive media applications using coding systems such as MPEG. In the transfer of cine films to digital Compact Disc, for example, the process described above based on chrominance probability distributions has been shown to be effective in tracking the principle subjects of a scene, so as to increase the number of costs allocated to blocks falling within the designated region. Clearly, for general image processing the tracking achieved by the above processes is for superior to tracking based on motion or chrominance alone.

Claims: CLAIMS 1. A method of image processing for tracking a subject in a sequence of image frames, the method comprising: (a) defining criteria for classifying image regions as being potentially part of the subject to be tracked; (b) obtaining for each new image frame a record ( H k -ι) of an image region previously designated as containing the subject; (c) classifying regions of each new image frame in accordance with the defined criteria; and (d) updating the designated region with reference to both the classification of regions in the new frame (M k ) and the previously designated region (H k .i). 2. A method as claimed in claim 1 wherein regions classified as potentially part of the subject are included or not included in the updated designated region, depending on their proximity to the previously designated region. 3. A method as claimed in claim 1 or 2 wherein regions are classified in a graded form, wherein a spatially varying threshold level (P ) is defined with reference to the previously designated region and wherein regions whose classification grade is below the threshold level are not included in the updated designated region. 4. A method as claimed in claims 1, 2 or 3 wherein the updated designated region is defined as a convex hull with reference to all regions which are to be included. 5. A method as claimed in any preceding claim wherein updating of the designated region is automatically inhibited to prevent excessive growth of the designated region. 6. A method as claimed in claim 5 wherein growth in area of the designated region is judged excessive or not by comparison with an area value averaged over a number of previous frames . 7. A method as claimed in any preceding claim wherein updating of the designated region is automatically inhibited to prevent excessive shrinkage of the designated region. 8. A method as claimed in claim 7 wherein shrinkage in area of the designated region is judged excessive or not comparison with an area value averaged over a number of previous frames. 9. A method as claimed in any preceding claim wherein updating of the designated region is automatically inhibited in the event that the updated designated region would include an excessive proportion of regions not classified as potentially part of the subject. 10. A method as claimed in any preceding claim wherein motion of the subject or designated region is detected over successive frames, and wherein updating of the designated region in step (d) is performed with reference to the classification of regions in the new frame, the previously designated region and a predicted degree of motion. 11. A method as claimed in any preceding claim wherein each new image frame is divided into blocks of pixels and the classification step (c) is performed on a block by block basis. 12. A method as claimed in claim 11 wherein the pixels of each frame are classified individually and the classification for each block is obtained by combining the classifications of the pixels within the block. 13. A method as claimed in 12 wherein individual pixels are classified in binary form and the classification of each block is performed by counting pixels within each block meeting the pixel classification criteria. 14. A method as claimed in claims 11, 12 or 13 wherein blocks are classified in binary form. 15. A method as claimed in any preceding claim wherein the classification criteria are defined so as to classify moving objects as potentially part of the subject being tracked. 16. A method as claimed in any preceding claim wherein the classifying criteria for each region include whether a pixel value or values of the region in the new frame is different to the corresponding pixel value of a previous frame. 17. A method as claimed in claim 16 wherein for the classifying step (c) pixel differences are disregarded below a predetermined noise threshold. 18. A method as claimed in claims 16 or 17 wherein the classifying step (c) includes a step of discriminating between changes representing movement of the subject and changes representing uncovering of background. 19. A method as claimed in claim 18 wherein two successive comparisons are performed over three successive image frames and wherein changes are disregarded for regions which do not change in both comparisons . 20. A method as claimed in any preceding claim wherein the classifying criteria for each region include whether a pixel value or values of the region in the new frame fall within a predetermined subset of possible pixel values. 21. A method as claimed in claim 20 wherein said predetermined subset is determined automatically by probability analysis of pixel values present in a designated region when compared with the image frame as a whole. 22. A method as claimed in claim 20 or 21 wherein said subset of possible pixel values is defined with reference to the chrominance characteristics of the subject to be tracked. 23. A method as claimed in any preceding claim wherein a default designated region is defined for the start of the sequence. 24. A method as claimed in claim 23 wherein updating of the default designated region is inhibited until a significant area within the designated region is classified as potentially part of the subject. 25. A method as claimed in any of claims 1 to 22 wherein an initial designated region for the sequence is defined by manual input. 26. A method as claimed in claim 25 wherein the classification criteria are defined automatically with reference to the initial designated region. 27. A method of image processing for tracking a subject in a sequence of image frames, the method comprising: (a) defining a default position for the subject within each image frame; (b) obtaining and updating over the sequence of image frames a recor of the subject's position in each new frame by reference to predetermined subject identification criteria and also with reference to criteria based on a previous recorded position; (c) determining whether features satisfying the subject identifying criteria but not the criteria based on previous recorded position are closer to the default position; and (d) if such features are closer, updating the recorded position to refer to such features. 28. A method as claimed in claim 27 wherein the updating step (d) is performed subject to a time delay. 29. A method of encoding motion picture image frames with limited data rate wherein image quality is enhanced for a region designated as including a particular subject, and wherein the designated region is updated to track the subject using a method according to any of claims 1 to 28. 30. A method according to claim 30 wherein data capacity is allocated on a block basis and wherein the designated region is updated in corresponding block units. 31. A method as claimed in claim 29 or 30 wherein the encoding is H261 compatible. 32. A method as claimed in claim 29 or 30 wherein the encoding is MPEG compatible. 33. A videophone apparatus including a camera and means for encoding image frames output by the camera by a method as claimed in any of claims 29 to 32. 34. A motion picture signal generated by a method as claimed in any of claims 29 to 32. 35. A motion picture recording conveying images encoded by a method as claimed in any of claims 29 to 32. 36. A data processing apparatus wherein elements of a stored regular two-dimensional array are designated active or inactive, the apparatus comprising means for identifying a convex hull, encompassing all active elements of the stored array, including: (a) means for scanning rows of the array to record the most extreme active element(s) in each row in a linear list; and (b) means for processing the linear list of extreme active elements to identify the desired convex hull without considering further the other less-extreme active elements in each row of the array.

Inventors: PONTICOS CONSTANTINE, PONTICOS, CONSTANTINE
Applicants: KONINKL PHILIPS ELECTRONICS NV, PHILIPS ELECTRONICS UK LTD, PONTICOS CONSTANTINE, PHILIPS ELECTRONICS N.V., PHILIPS ELECTRONICS UK LIMITED, PONTICOS, CONSTANTINE
Application year: 1994
Main classification: G06F15
IPC codes: G06T7, H04N7