Abstract:
A process for enhancing a frame of an image sequence, the process comprising dividing the frame into a number of blocks and matching the blocks with corresponding blocks in the directly preceding and directly succeeding frames of the sequence to compensate for object motion between frames. Damaged pixels are identified by comparing their actual intensity values with intensity values predicted by an autoregressive process conducted on the motion compensated data. Once identified, the intensity values of the damaged pixels are replaced by values interpolated by a further autoregressive process modified to ignore the effects of damaged pixels.

Description:
BACKGROUND 
     1. Field of the Invention 
     This invention relates to image processing and is concerned with repairing corrupted data in a frame of an image sequence, e.g. due to dirt or scratches. 
     2. Description of the Prior Art 
     An image sequence, such as a motion picture, comprises a plurality of frames which are generally equally spaced in time and each of which represents a snapshot taken at one instant in time. The frames often contain noise which is significant enough to affect picture quality and which may be due to a variety of reasons including transmission errors, conversion errors arising during conversion of the sequence from one format to another, e.g. from 9 mm cine to video, contamination by dirt and scratches. Two broad categories of noise can be identified, global noise and local noise. Global noise, for example Gaussian noise or a generalised blur, results in some alteration of the data in the frame. If the form of the alteration is known it may be possible to improve image quality by producing a simple compensation model which holds true for the entire image sequence. In the case of localised noise however, for example that due to dirt or scratches, the original data is obliterated and replaced by some other random data. This presents an entirely different problem from that presented by global noise. Local noise cannot be predicted and hence cannot be removed with the use of a global type model. The only way in which data corrupted by local noise can be restored is by considering the data which remains intact in the region surrounding the damaged area. The following discussion and description is concerned with the problem of localised noise and the elimination of its effect. 
     Previous attempts to remove the effects of local noise in image sequences have drawn to a large extent on work in the field of 2-D image restoration. This ignores, however, the valuable information which is contained in frames which precede or succeed a damaged frame which it is desired to restore, i.e. in a third dimension which is time, and which usually contain images which closely correspond to those contained in the damaged frame (unless of course there occurs an abrupt scene change). 
     Early image sequence restoration work which took advantage of this three dimensional information includes the median filtering method disclosed by G. R. Arce and E. Malaret in an article entitled &#34;Motion preserving ranked-order filters for image sequence processing&#34;, IEEE Int. Conference Circuits and Systems, pages 983-986, 1989. This method considered three successive frames of an image sequence and matched an N×N block of pixels in a middle frame with corresponding blocks in the frames on either side to provide a 3×N×N box. The intensity value of the pixel in the centre of the box was replaced by the median pixel value of all the pixels contained in the box. This operation was carried out for each of the pixels comprising the middle frame. The effect of this method is to average out the effects of local noise. 
     The basic median filtering method disclosed in the above Arce document does not, however, take into account any motion of objects occurring between frames. So, for example, the image pixels contained in the middle block of one of the boxes may be offset with respect to the corresponding image pixels of the blocks on either side, possibly by a significant amount if the image is moving quickly, making the calculated median value too inaccurate to use. 
     A median filtering method which takes into account the possibility of motion between frames is that suggested by A. Kokaram and P. Rayner in an article entitled &#34;Detection and Removal of Impulsive Noise in Image Sequences&#34;, Proceedings of the 2nd Singapore International Conference on Image Processing (SICIP), pages 629-633, 1992. Prior to constructing the boxes from which a median value is calculated, the, possibly many, displacements between the three successive frames are estimated on a pixel by pixel basis. The middle block is then matched with the corresponding and possibly displaced block of each of the frames on either side so that the median filtering operation acts on data which is substantially motion compensated. 
     The above referenced SICIP article also proposes activating the filter only in those locations where an error is believed to exist. If this approach is not taken the filtering tends to remove local noise only at the expense of a general degradation of the entire frame. The method disclosed in the SICIP article compares the intensity value of pixels contained in corresponding locations after motion compensation. A large difference between the compared values indicates the presence of local noise and only then is the median filter applied to repair the damage. 
     SUMMARY OF THE INVENTION 
     According to a first aspect of the present invention there is provided a method of repairing a damaged pixel in a current frame f of an image sequence having a plurality of frames, the method comprising replacing the value I(x,y,f) of the damaged pixel with a corrected value obtained by a process using an autoregression model involving the values of pixels in a zone containing the damaged pixel and located in the current frame and in substantially the same zone of a motion compensated frame preceding and/or succeeding the current frame in the image sequence. 
     (By an autoregression process is meant a process of predicting a value of a pixel from a linear weighted combination of the values of pixels in some region surrounding that pixel.) 
     Whilst in a preferred embodiment of the first aspect the autoregression model involves the values of pixels located in the frame directly preceding and/or directly succeeding the current frame in the image sequence it will be appreciated that, in some circumstances, it may be appropriate to additionally or alternatively use pixels located in other frames. 
     The location of a damaged pixel of a frame may be identified by correlating pixels of that &#34;current&#34; frame with the same, or corresponding, elements of preceding and/or succeeding frames. Thus, according to a second aspect of the present invention, there is provided a method of detecting a damaged pixel in a current frame f of an image sequence having a plurality of frames, the method comprising evaluating the magnitude of the difference ε(x,y,f) between the actual intensity value I(x,y,f) of a current frame test pixel and a predicted intensity value I(x,y,f) for the test pixel by a process using an autoregression model involving the intensity values of pixels in a zone containing the test pixel and located in both the current frame and in substantially the same zone of a motion compensated frame preceding and/or succeeding the current frame and comparing the difference to a threshold error value ε t . 
     The autoregression modelling process, which is used to obtain a corrected value as set out in the above first aspect of the invention, may take advantage of the known location of the damaged pixels, identified for example by a method according to the above second aspect, to weight those pixels so that they have no effect on the process. 
     It is often the case that a damaged pixel in a frame which is identified as such is surrounded by elements which are also degraded but not to such an extent as to make them identifiable to the process set out above. In order to take this situation into account, the image processing method may include a dilation step which flags as damaged pixels surrounding the identified damaged pixels. Preferably only the pixels directly adjacent the identified damaged pixels are so flagged. 
     In certain embodiments of the above first and second aspects of the present invention motion compensation between frames may be according to the above SICIP article. However, there is an alternative method. 
     Thus, according to a third aspect of the present invention there is provided a method of estimating image displacement between two frames of an image sequence, wherein each frame comprises an array of pixels having intensity values, the method comprising calculating the mean absolute error MAE 0  between a block in a first of the frames and a block in the same, or corresponding, location in the second of the frames, calculating the mean absolute error MAE m  between the first block in the first frame and a plurality of blocks of a search region of m blocks in the second frame and which region contains the second block, each of the m blocks having an offset from the second block in the second frame, identifying which of said plurality of searched blocks of the search region in the second frame gives rise to the minimum MAE m  (MAE min ) and, if r*MAE min  ≦MAE 0  where r is a constant greater than 1, assigning to the first block, in the first frame, a displacement vector corresponding to said offset of the identified block. The invention also relates to apparatus for carrying out image processing. Thus, according to a fourth aspect of the present invention there is provided apparatus for repairing a damaged pixel in a current frame of an image sequence having a plurality of frames, the apparatus being arranged to replace the value of the damaged pixel with a corrected value and comprising means for obtaining the corrected value by a process using an autoregression model involving the values of pixels in a zone containing the damaged pixel and located in the current frame and in substantially the same zone of a motion compensated frame preceding and/or succeeding the current frame in the image sequence. 
     According to a fifth aspect of the present invention, there is provided apparatus for detecting damaged pixels in a current frame of an image sequence having a plurality of frames, the apparatus being arranged to evaluate the magnitude of the difference between the actual intensity value of a current frame test pixel and a predicted intensity value for the test pixel and comprising means arranged to evaluate said magnitude by a process using an autoregression model involving the intensity values of pixels in a zone containing the test pixel and located in both the current frame and in substantially the same zone of a motion compensated frame preceding and/or succeeding the current frame and means for comparing the difference to a threshold error ε t . 
     According to a sixth aspect of the present invention there is provided an apparatus for estimating image displacement between two frames of an image sequence, wherein each frame comprises an array of pixels having intensity values, the apparatus comprising means arranged to calculate the mean absolute error MAE 0  between a first pixel block in a first of the frames and a second pixel block in the same, or corresponding, location in the second of the frames, means arranged to calculate the mean absolute error MAE m  between the first pixel block in the first frame and a plurality of pixel blocks of a search region of m blocks in the second frame and which region contains the second block, each of the m blocks being offset from the second block in the second frame, means arranged to identify which of said plurality of searched blocks of the search region in the second frame gives rise to the minimum MAE m  (MAE min ) and, if r*MAE min  ≦MAE 0  where r is a constant greater than 1, means arranged to assign to the first block, in the first frame, a displacement vector corresponding to said offset of the identified block. 
     Apparatus embodying one or more of the above fourth to sixth aspects of the invention may be arranged to carry out any one of the methods set out in the attached claims. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     For a better understanding of the invention and to show how the same may be carried into effect, reference will now be made, by way of example, to the accompanying drawings, in which: 
     FIG. 1 is a block diagram of a system for removing noise from an image sequence; 
     FIG. 2 is a flow diagram for the motion estimation process; 
     FIG. 3 shows an example of the search region used in the process of FIG. 2; and 
     FIG. 4 is a flow diagram for the damage detection process. 
    
    
     DETAILED DESCRIPTION 
     FIG. 1 is a block diagram of a system suitable for carrying out the embodiment of the invention now to be described. It comprises an analogue to digital converter 2 for digitising an analogue input signal representing an image sequence comprising a plurality of frames, supplied by a VCR 1, a memory 3 for storing pixel location and intensity for three consecutive frames, f-1, f, and f+1, of the input image sequence in digital form, and a computer 4 for processing the currently stored frame f of the image sequence. After each cycle, the most recently processed frame f is fed back to the memory as frame f-1 for the next cycle, frame f+1 is designated frame f, and a new frame, which then becomes f+1, is read into the memory via the analogue to digital converter. The most recently processed frame f may be supplied in digital form to a digital memory device which retains all of the processed frames for use later or may be passed through a digital to analogue converter to an analogue storage device, e.g. a further VCR, or directly to a display. 
     The frames f-1, f, and f+1 are stored in the memory as 2-D arrays of intensity values, the address of the intensity values in memory corresponding to the location of the corresponding pixel in the image frame. 
     It will be appreciated that the input sequence could convey information additional to intensity values, for example colour information, but, in the interest of clarity, such considerations will be omitted in the following and the discussion limited to black and white signals. 
     The main steps of the embodiment can be set out as follows: 
     1) Divide frame f into a plurality of blocks containing equal numbers of pixels. 
     2) Match the blocks with corresponding blocks in frames f-1 and f+1 using a motion estimation process. 
     3) Extract a data volume including frame f and at least one of the frames f-1 and f+1, where frames f-1 and f+1 have been compensated for motion, and, using a 3D -autoregression process, generate a prediction intensity error for each pixel in frame f. 
     4) Identify damaged areas of frame f by comparing the predicted errors with a threshold error. 
     5) Replace the pixel intensity values in the damaged areas with values interpolated by a 3D-autoregression process involving the intensity values of surrounding pixels. 
     Considering firstly steps 1) and 2), a motion estimation method is used which assigns, in the current frame, to each pixel or cluster of pixels (having coordinates x,y) two displacement vectors d f-1  (x,y,f) and d f+1  (x,y,f) which define respectively the displacement of that pixel or cluster between the current and preceding frame and between the current and the succeeding frame respectively. 
     In order to reduce the computational complexity of this process, a multiresolution technique is used which involves generating a number of sublevels L1, L2, L3 . . . Ln (and where L0 represents the level of the original frame) of gradually reduced resolution for each of the three frames. FIG. 2 is a flow diagram showing the steps involved. A first estimate of displacement is obtained from a coarse, or low resolution, level Ln. A second improved estimate is obtained from a higher resolution level Ln-1 using the first estimate to reduce the area which must be searched to match areas of the current frame f with corresponding areas of the surrounding frames f-1 and f+1. The estimate is further improved by considering still higher resolution levels until finally a satisfactory estimate is obtained. In the embodiments now to be described n=3. 
     Level L1 is generated by operating on the original frame with a low pass filter, i.e. in effect passing a low pass filter mask of given window size over the original frame (which corresponds to level L0). The mask is placed over a portion of the frame to be processed and a value is then generated which is a function of the value of pixels in the area extracted by the mask window. The generated value corresponds to the pixel located in the centre of the mask window and is stored in a new array. 
     A suitable filtering function is a Gaussian function having the following form: ##EQU1## so that the intensity value generated is ##EQU2## where ##EQU3## and p and q are the local coordinates of pixels within the mask window and the pixel at the centre of the window defines the origin (0,0) of the local coordinate system. For a filter window of 9×9 pixels, R=4 and p and q are in the range -4 to +4. σ is a constant defining the Gaussian function. The mask is moved pixel by pixel across the entire frame until the new array is completely filled. Level L0 is extended at its edges by a strip of pixels having intensity values equal to zero, i.e. black, so that the filter mask can be applied to the pixels around the edges. The resulting filtered frame is subsampled in both the horizontal and vertical directions by a factor of two, i.e. only every other pixel is used in each row of the processed level L0. The result is a frame at level L1. Thus, if the original frame comprises an array of 256×256 pixels, level L1 would comprise a smaller array of 128×128 pixels providing an image which is slightly blurred in comparison to the image provided by level L0 and which has in effect a lower resolution. The process of filtering and subsampling is then carried out on level L1 to produce a level L2 having 64 ×64 pixels and finally on level L2 to produce a level L3 having 32×32 pixels. 
     In order to obtain the displacement vectors d f-1  (x,y,f) the levels L3 of frames f-1 and f are first subdivided into a number of corresponding A×A pixel blocks. For example, if A=2 each level L3 contains 256 blocks and for each block the following procedure is followed. 
     (a) Considering a block B(f) within level L3 of frame f, having its upper left corner located at the pixel (i,j), the intensity values of the pixels within the block can be written as I(i,j,f), I(i,j+1,f), I(i+1,j,f), and I(i+1,j+1 ,f). The intensity values of the pixels within the same block B(f-1 ) of frame f-1 can similarly be written as I(i,j,f-1) etc. The mean absolute error between these two blocks is calculated as follows: ##EQU4## If the mean absolute error MAE 0  between these two blocks is less than some threshold value MAE t  (if the pixel intensity is measured on a scale of 0 to 255 a suitable threshold value is 8) then the block is assumed not to be undergoing motion and the displacement vector of the block is stored as [0,0]. However, if MAE 0  exceeds MAE t  then the block B(f) might be in motion so a search of the region surrounding the initial block B(f-1 ) in frame f-1 is commenced. 
     (b) Considering FIG. 3, which shows a portion of level L3 of frame f-1, the search region is chosen to be a 6×6 block of pixels in frame f-1 centred on the block B(f-1 ). The mean absolute error MAE m  between the block in the current frame and each of the m=14 possible 2×2 blocks in the search region (this excluding block B(f-1 ) for which the calculation has already been carried out) is calculated. If the minimum MAE m  obtained (defined as MAE min ) is not sufficiently less than MAE 0 , i.e. if r*MAE min  &gt;MAE 0  where r is a real number greater than 1, then, in order to avoid noise giving rise to spurious matches which do not represent true motion in the image sequence, the displacement vector is set to [0,0]. (The threshold factor r may be user definable in order to allow for varying levels of background noise.) However, if r*MAE min  ≦MAE 0 , then the offset from the block B(f-1 ) of the block giving rise to MAE min  is stored as the displacement vector to the block B(f). It is noted that the displacement vector for a given block within level L3 can be defined as the displacement vector d f-1  L3(p,q,f) for each of the pixels within the block as those pixels are assumed to be subject to the same displacement. 
     (c) Once a displacement vector has been stored to all the A×A blocks in level L3 of frame f, whether [0,0] or not, the displacement vectors are propagated to the 64×64 pixels of level L2 as follows: 
     
         d.sub.f-1 L2(2x, 2y,f)=2d.sub.f-1 L3(x,y,f) 
    
     The displacement vectors for those pixels in level L2 which are not assigned a displacement vector by this operation, i.e. every second pixel, are obtained from a bilinear interpolation of, or averaging of, the displacement vectors of the directly adjacent pixels. 
     (d) For level L2, the motion estimation process of steps (a) and (b) is repeated except that the initial search region in frame f-1 is offset by the corresponding displacement vector propagated down from level, L3. The displacement vectors obtained from level L2 are propagated down to level L1 by repeating step (c). 
     (e) Steps (a) to (d) are in turn repeated to generate displacement vectors for level L0, where d f-1  L0(x,y,f)=d f-1  (x,y,f). On completion of this operation all 256×256 pixels (in A×A blocks) of level L0 have been assigned a displacement vector. 
     Before the final bilinear interpolation step is carried out for level L0 however, the displacement vector field propagated from level L1 is checked for so-called motion haloes. This is achieved by repeating the process of step (a) for all the blocks of level L0 without taking into account the propagated displacement vectors. If MAE 0  with no motion compensation is less than MAE 0  with motion compensation then the pixels of the block are assigned a displacement vector of [0,0] and the propagated displacement vector is ignored. This prevents stationary background regions from being assigned erroneous displacement vectors. 
     A similar process is carried out on the current and succeeding frames f and f+1 in order to obtain the forward displacement vectors d f+1  (x,y,f); 
     Steps 3 and 4 as outlined above are then carried out to detect local noise, for example dirt and sparkle, using the motion compensated data. A 3D autoregression (AR) process is used for detection and it relies on the fact that the intensity value, or grey scale value, of a pixel in an image can be predicted using a linear combination of the intensity values of pixels in a region, termed the support region, surrounding the pixel whose intensity value is to be predicted. 
     FIG. 4 is a flow diagram setting out the main steps in the process. A general formulation of the 3D-AR process is as follows: ##EQU5## where I(x,y,f) is the predicted intensity value of a pixel located at coordinates (x,y) in frame f, M is the number of pixels in the support region, a k  is a weighting coefficient, and q k  (x), q k  (y) and q k  (f) are the offset vectors in the x direction, the y direction, and with respect to frame number respectively which define the location of the pixels comprising the support region. The prediction error ε of a pixel is the difference between the predicted intensity value and the actual intensity value of the pixel and is defined as follows: ##EQU6## once ε has been obtained as set out hereinbelow it is compared to a threshold error value ε t . If ε&gt;εt then the pixel in question is flagged as being erroneous. 
     In order to obtain the prediction error ε for each pixel it is first necessary to calculate the coefficients a k . This is done by dividing the data space containing the three frames into a number of data volumes each comprising corresponding, motion compensated, N×N pixel blocks in each of the three frames f-1, f, and f+1 (where N×N&gt;M). N is chosen so that the N×N blocks contain a substantially homogeneous portion of the image. 
     The displacement vectors d f-1  (x,y,f) and d f+1  (x,y,f) previously obtained are incorporated into the offset vectors q such the 3D-AR process operates on a data volume as if that volume did not contain any moving components. 
     By way of example consider one data volume comprising a 3×3×3 box of pixels in the three frames with each pixel chosen to have a support region comprising M=2 pixels, i.e. there are two coefficients a 1  and a 2 . These two pixels may be, for example, the pixel (x-1,y,f) to the left in the current frame and the pixel (x,y,f-1 ) in frame f-1. The 3D-AR process selects those values of a 1  and a 2  which minimise the mean value of the squared prediction error in the data volume. This mean value is known as the `expected value` and, from equation (5), can be written as; ##EQU7## The minimum of the expected value is found by setting its derivatives w.r.t a 1  and a 2  to 0, i.e. ##EQU8## The matrix equation can be solved for a 1  and a 2 . The prediction error e can then be found using equation (5) for each pixel in the N×N block of frame f. For a support region containing M pixels and a data volume including a central N×N pixel block with its upper left corner located at (x 1 ,y 1 ), equation (9) can be generalised as: 
     
         Ca=-c                                                      (10) 
    
     where ##EQU9## and q 1  to q M  are the offset vectors for the M pixels in the support region. ##EQU10## 
     This process is carried out for all the data volumes into which the three frame data space has been divided until all of the pixels in the current frame f have been tested. The results are contained in an error array D(x,y), where a 0 entry indicates a pixel which is undamaged and a 1 entry indicates a damaged pixel. 
     It has been found that good results can be obtained by using two models working in tandem. A first model uses a data volume and support region confined to the frames f and f-1 whilst the second uses a data volume and support region confined to the frames f and f+1. In addition M is set to 1 and q 1  for the first model is d f-1  (x,y,f) and for the second model is d f+1  (x,y,f), i.e. the prediction is made only from the corresponding pixel in the preceding or succeeding frame. The two simplified formulations for the forward (ε f ) and backward (ε b ) prediction errors, assuming for simplicity that the vectors q 1  have been incorporated into the coefficients x and y, can be stated respectively as: 
     
         ε.sub.f (x,y,f)=I(x,y,f)-a.sub.1 I(x,y,f+1)        (11) 
    
     
         and 
    
     
         ε.sub.b (x,y,f)=I(x,y,f)-a.sub.2 I(x,y,f-1)        (12) 
    
     Good results with this simplified formulation are gained by setting a 1  and a 2  to 1. In this simplified formulation the corresponding entry in the error array D(x,y) is flagged only if both ε f  and ε b  exceed ε t . 
     The 3D-AR model works well in detecting local errors such as dirt and sparkle because a large forward and/or backward prediction error implies that the subject pixel in the current frame cannot be predicted from preceding or succeeding frames and is thus a short temporal discontinuity. Such discontinuities are unlikely to be a deliberate production feature of the image sequence and can therefore reasonably be attributed to dirt or sparkle. 
     It is often the case that a damaged region of a frame will extend over an area of several pixels with the pixels exhibiting the largest errors lying at the centre of the region. Thus, all damaged pixels are not necessarily detected by the process as so far described in view of the threshold used. Whilst the error of those central pixels may exceed ε t , and thus be flagged as damaged in the error array D, the error of the fringe pixels may not be sufficient for them to have been flagged as damaged. A dilation procedure is therefore carried out to give a pessimistic estimation of the damaged area. This involves flagging, i.e. setting to one, in a copy of the error array D the 8 elements surrounding each of those elements already flagged in the original array D during the error detection process if they are not already flagged. This has the effect, for example, of expanding an isolated error into a 3×3 square and expanding a single line of errors into three adjacent parallel lines in the copy of D. 
     Before correcting the damaged regions the area over which they extend is determined. In order to replace these regions with corrected values by the method which will be set out hereinafter, a data volume which surrounds each of the damaged areas has to be extracted which contains a sufficient number of undamaged pixels. 
     An algorithm suitable for sizing the damaged areas is as follows: 
     
         ______________________________________DEFINEdirection = 0 implies movement (x,y) =&gt; (x,y-1)direction = 1 implies movement (x,y) =&gt; (x+1,y-1)direction = 2 implies movement (x,y) =&gt; (x+1,y)direction = 3 implies movement (x,y) =&gt; (x+1,y+1)direction = 4 implies movement (x,y) =&gt; (x,y+1)direction = 5 implies movement (x,y) =&gt; (x-1,y+1)direction = 6 implies movement (x,y) =&gt; (x-1,y)direction = 7 implies movement (x,y) =&gt; (x-1,y-1)DEFINEcurrent pixel position = (x.sub.c, y.sub.c)xmax,ymax,xmin,ymin = the max and min coords of damagedblock traversedDefine current direction = directionSIZES = array (256,256); i.e. a position for each pixelof the frame - make every entry 0BEGIN10 Scan array D(x,y) in direction = 0 until end of rowthen move to next row.20 If error flagged at pixel (x.sub.e,y.sub.e) then (x.sub.c,y.sub.c) =(x.sub.e,y.sub.e).30 Set direction = 2 as there cannot be a damaged pixelabove or to the left.40 Search from the current direction clockwise and lookin those directions for a pixel which is also set to 1,i.e. search direction = direction+1,direction+2 . . . etc.(Say that the next pixel to be set to 1 is in direction4. This must be a border pixel because no other pixelwas set until that direction.)50 Go to that pixel and make it the current one.(In this case (x.sub.c, y.sub.c) = (x.sub.e,y.sub.e +1))60 Update xmax,ymax etc70 Check to see if the current pixel is the start pixelif so then goto 10080 else make the current direction = remainder((direction+4)/8)90 GOTO 40100 STORE size of bounding box in SIZES at positioncorresponding to the centre of the bounding box.110 GOTO 10 until end of array D(x,y)120 END______________________________________ 
    
     The resulting array SIZES is an 256 by 256 array containing, at the locations corresponding to the centres of the damaged flagged areas in the error array D(x,y), the maximum lengths of the flagged areas in the x and y directions so as to define a rectangular bounding box around each of the damaged areas. 
     In order to correct the now identified damaged areas of the current frame f, a process using a 3D-AR model, similar in principle to the process as set out above for detecting the local errors, is applied. An adequate support region for each pixel is provided by the eight surrounding pixel in frame f and the pixel contained in the corresponding motion compensated, 3×3 block in frame f-1, i.e. the number of coefficients M of the model is 17. 
     In order to calculate the 17 coefficients a k  from which a prediction of the missing data can be made, the array SIZES is scanned for non-zero entries which identify the damaged regions. When each such entry is located a motion compensated data volume is defined around and centred on the damaged area and which extends into adjacent frames of the image sequence. Motion compensation is achieved using the displacement vectors already obtained. Of course the data volume may overlap two or more of the blocks defined in level L0 in which case the motion vector for the data volume (being the same for each pixel within the data volume) is obtained from the four closest level L0 displacement vectors using bilinear interpolation. Whilst separate regions of the data area could be assigned different displacement vectors this would lead to an increase in the complexity of the computation. In any case, as the data volume is selected because of the similarity of the pixels it contains it should be the case that these pixels are moving in a similar manner so that they should each possess a similar displacement vector. 
     In practice, it has been found to be sufficient to create a data volume containing N×N pixels in the current frame and N×N pixels in a preceding or succeeding frame. The data volume is of a size such that it contains significantly more undamaged pixels than damaged pixels, e.g. a ratio of two to one or, more preferably, five to one. 
     To obtain the coefficients a k  a matrix equation corresponding to equation (10) can be defined as follows: 
     
         C.sub.w a=c.sub.w                                          (13) 
    
     where ##EQU11## The weighting function w(x,y,f) is included in the above equation in order to prevent the damaged pixels from adversely affecting the calculation. It has the effect of making the prediction error equal to zero for the damaged pixels. Equation (13) is solved for the coefficients a k , 
     It is the case that every pixel within the N×N block of the current frame has an intensity value which is quite well predicted by the weighted linear combination of the M pixels within its corresponding support region (N×N&gt;M). The missing intensity values are those values which bring them into line with the model formulation. This estimation process in the preferred embodiment involves selecting values which minimise the sum squared prediction error over a second data volume lying within the data volume for which the coefficients a k  were obtained. This, however, is just one approach and others may alternatively be used to bring the coefficients into line with the AR model. 
     In general terms, a prediction error as defined in equation (5) can be written for each pixel within the second data volume. The resulting set of equations can then be written in matrix form as, 
     
         e=Ai                                                       (14) 
    
     where e is a matrix containing the prediction errors ε, A is a matrix containing the model coefficients a k , and i is a matrix containing the pixel intensity values. Equation (14) can be rearranged into the form 
     
         A=a.sub.k i.sub.k +A.sub.u i.sub.u                         (15) 
    
     where i u  and i k  are matrices containing unknown and known intensity value data respectively and A u  and A k  are corresponding coefficient matrices. 
     Minimising the sum squared prediction error is equivalent to minimising the function e T  e, where the superscript T represents the matrix transpose, with respect to the missing data i u . The missing data is therefore that data which satisfies the equation, 
     
         i.sub.u =-[A.sub.u.sup.T A.sub.u ].sup.-1 A.sub.u.sup.T A.sub.k i.sub.k(16) 
    
     The interpolated data can then replace the erroneous data flagged by the error array D(x,y). 
     Considering the second data volume over which the sum squared prediction error is minimized, it is found that no matter how large this volume is made (bearing in mind that it cannot be larger than the data volume from which the a k  are evaluated as the model is not valid outside of that volume) only a subset of the equations (5) are required. In fact, the only equations required are those which involve at least one unknown pixel intensity value I. For example, if the simple case is considered where the support region for each pixel involves only the corresponding pixel in frame f-1, matrix equation (14) would contain only those prediction error equations for the damaged pixels.