1. Field of the Invention
This invention relates to motion adaptive image processing.
2. Description of the Prior Art
Video image capture represents a spatial and temporal sampling process. An image is captured as a set of pixels arranged in rows or lines. Successive images are captured at spaced instants in time.
A complication is the common use of interlaced video capture and processing. In an interlaced video signal, each image is handled as two sets or fields of alternate lines of pixels. For example, odd numbered lines might be included in one field, whereas even numbered lines could be included in the next field. An advantage of interlaced techniques is that they give an apparent doubling of the image rate, so reducing flicker effects, for no substantial increase in video signal bandwidth.
All of these aspects of sampling can give rise to alias effects if an attempt is made to capture or process video material having spatial or temporal frequencies which are too high for the respective sampling rate. But a particular alias problem will be described here in the area of interlace to progressive scan video conversion.
If it is desired to convert between interlaced video and progressive scan (non-interlaced) video, then for non-moving images it is merely necessary to interleave two successive fields to recreate a non-interlaced frame having all lines of pixels present. However, if there is any significant inter-field motion, this approach may not work. In such circumstances it can be more appropriate to derive the lines of pixels which are missing in one field from other pixels in that same field. In other words an intra-field interpolation process is used.
In practice, a video source may comprise image sequences in which some regions represent moving images whilst some regions do not. For example, when a newscaster speaks to a fixed camera, the newscaster's mouth, face, and head may move considerably, whilst their torso, the desk and the wall behind them do not.
Therefore the different conversion strategies noted above may be appropriate within different regions of the same image. It is therefore important to determine which strategy to use for a given pixel.
Interpolation will generally give a worse result than interleaving for non-moving portions, whereas interleaving and will generally give a worse result than interpolation for moving portions. So, the choice of the more appropriate technique is very important.
Notably, the presence of noise within the video signal can affect such determinations. It may be readily appreciated that noise can cause apparent differences between successive fields that may be erroneously interpreted as motion, but it is also true that noise can serve to counteract genuine changes due to motion, resulting in a pixel or region of pixels erroneously appearing to be static. Such noise-induced static misclassification results in different interpolation strategies being used that give different output results in the converted image, thereby exacerbating the effect of the noise in the image.
It would therefore be desirable to reduce the impact of the noise-induced misclassification of pixels as representing static image regions.
It is an object of the present invention to seek to mitigate or alleviate the above problem.
In one aspect of the present invention, a method of image processing for conversion of an image in a sequence of images comprises the steps of: associating each respective pixel of an image or a part of the image with a respective motion value indicative of a degree of inter-image motion for that pixel; adjusting the motion value of each respective pixel based upon the motion value of a secondary pixel found within a first region of a first predetermined size substantially centred upon each said respective pixel, said secondary pixel being that pixel whose associated motion value is indicative of the greatest motion of any pixel in the first region; and then adjusting the motion value of each respective pixel based upon the motion value of a secondary pixel that lies within a second region of a second predetermined size substantially centred upon each said respective pixel, said secondary pixel being that pixel whose associated motion value is indicative of the least motion of any pixel in the second region; and then selecting contributions from a first conversion process and/or a second conversion process for each respective pixel dependant upon its respective associated adjusted motion value.
In another aspect of the present invention, image processing apparatus for conversion of an image in a sequence of images comprises: a motion detector to associate each respective pixel of an image or a part of the image with a respective motion value indicative of a degree of inter-image motion for that pixel; a first motion value adjuster operable to adjust the motion value of each respective pixel based upon the motion value of a secondary pixel found within a first region of a first predetermined size substantially centred upon each said respective pixel, said secondary pixel being that pixel whose associated motion value is indicative of the greatest motion of any pixel in the first region; a second motion value adjuster operable to adjust the motion value of each respective pixel based upon the motion value of a secondary pixel that lies within a second region of a second predetermined size substantially centred upon each said respective pixel, said secondary pixel being that pixel whose associated motion value is indicative of the least motion of any pixel in the second region; and a conversion selector operable to select contributions from a first conversion process and/or a second conversion process for each respective pixel dependant upon its respective associated adjusted motion value.
Advantageously, the above two aspects therefore have the effect of firstly expanding motion regions to a first extent, and then expanding the static regions to a second, typically smaller extent (equivalent to shrinking the motion regions). However, isolated static regions that are smaller in radius than the first predetermined distance are completely removed by the motion expansion, and so are not able to recover during the subsequent static expansion. Meanwhile, other static regions recover to approximately their original state. The final result is that small, isolated static regions are removed whilst other static regions are substantially unchanged.
Further respective aspects and features of the invention are defined in the appended claims.
The above and other objects, features and advantages of the invention will be apparent from the following detailed description of illustrative embodiments which is to be read in connection with the accompanying drawings, in which:
a to 4c schematically illustrate gradient detection;
a to 6e schematically illustrate a spatial block matching operation;
a and 7b schematically illustrate an alias situation;
a to 8d schematically illustrate alias detection techniques;
a schematically illustrates a motion adaptive interpolator;
b schematically illustrates motion detection between successive video fields;
It will be appreciated that the source of interlaced material 20 need not be a broadcast receiver, but could be a video replay apparatus such as a DVD player, a network connection such as an internet connection and so on.
The interlaced output from the source of interlaced material 50 is supplied to an interlace to progress scan converter 70 to generate a progressive scan signal. This can be processed by the vision mixer 80 along with the progressive scan material from the source 60 to generate a processed progressive scan output. Of course, the progressive scan output of the vision mixer 80 can be converted back to an interlaced format if required, e.g. for subsequent broadcast or recording. It will also be appreciated that the vision mixer 80 is just one example of video processing apparatus; instead, a digital video effects unit, for example, could be used at this position in
The converter of
The motion adaptive interpolator will be described in more detail below. First, the spatial interpolator will be briefly described.
The spatial interpolator comprises a 1:2 horizontal pixel scaler 130, a spatial block matcher 140, a minimum error selector 150, a diagonal interpolator 160, a dot noise reducer 170 and a Kell-factor corrector 180. The operation of each of these is summarised below.
The scaler 130 uses horizontal linear interpolation to generate one additional pixel value between each two pixels of the input interlaced field (i.e. a 1:2 scaling operation). So, the horizontal resolution (at least in terms of number of available pixel values) is doubled, but no difference is made at this stage to the vertical resolution.
The overall operation of the spatial block matcher 140 and the diagonal interpolator 160 is to detect the orientation of an image feature relevant to a pixel position where a new pixel is to be interpolated, and then to apply an interpolation along that image feature direction. So, if a current pixel position to be interpolated lies within a diagonal image feature (a line, an edge etc.) at, say, 45° to the horizontal, interpolation of that new pixel would take place along that 45° direction. This can tend to give a better output result than restricting the interpolation to horizontal or vertical interpolation. A key part of this process, clearly, is therefore to detect the direction of an image feature at each pixel position.
Referring now to
So, referring to
Turning now to
However, in
As noted above, spatial block matching is carried out at sub-pixel accuracy; in this case half-pixel accuracy.
A range of block sizes is used, with corresponding search ranges (maximum displacements relative to the pixel position under test). Taking into account the 1:2 scaling operation, example block sizes and search ranges are given in the following table:
Note that the displacement is indicated as a displacement from the centre. The two blocks are displaced by equal amounts, though in opposite directions. Symmetrical displacements are used because otherwise the block matching could detect lines or edges which are not relevant to the pixel under test.
A sum of absolute differences (SAD) is calculated for each block match. This is defined as:
where x, y represent the current pixel co-ordinate (y being a frame line number), d is the displacement being tested, and n is the “radius” of the block (the block width is n′=2n+1).
In general terms, the SAD values for three colour components (red, green and blue) are combined, and a minimum normalised SAD value determines a gradient for interpolation. Various checks are made to avoid poor interpolation, as described below.
Measures are taken to avoid problems caused by alias situations.
Referring to
However, in
This conflict of block match results is a product of aliasing between the closely spaced diagonal image features in the image portions shown in
The basis of the rule is that the block match process is restricted so that only areas considered to be “line segments” are detected. That is to say, each block in a block match should contain a line segment.
A digitised line segment is considered to have two properties. Firstly, it is monotonic along the central scan line row of the block in question, and secondly there is a vertical transition between scan lines in the block in question. The way in which these properties may be tested will be described with reference to
In
So, turning back to
The tests are performed separately in respect of each of the colour components (e.g. R, G and B). All three tests must be passed separately. Alternatively, for example to save hardware, fewer than three tests could be performed. For example, only the luminance, or only one colour component, might be tested. Of course, a YCbCr or YPbPr representation could be tested instead.
The diagonal interpolator 160 is a simple pixel averager: given a direction it picks the pixel in that direction on the line below and the pixel in that direction on the line above and averages them.
The dot noise reducer 170 involves a process which is applied to the output of the diagonal interpolator 160. A test is applied to detect whether an interpolated pixel lies within the maximum and minimum values of four neighbouring vertical and horizontal pixels, i.e. the pixels immediately above, below, left and right of the interpolated pixel. Note that the pixels above and below the interpolated pixel will be real pixels, whereas those to the left and right will be interpolated themselves.
If the interpolated pixel does not lie within this range, then;
Let v be the original value of the pixel under consideration, and let v′ be v, clipped to lie within the range of the four locally neighbouring pixels.
Let the new pixel value be kDNR v′+(1−kDNR)v, where kDNR is a programmable constant.
The operation of the Kell-factor corrector 180 will now be described.
In the present discussion, references to the Kell-factor are simply to help explain the operation of this part of an exemplary system. What the filter is actually exploiting is simply the knowledge that the source image did not use the full bandwidth available to it, whether that is because of scanning artefacts or because of a low pass filtering process.
The Kell-factor is a quantity which represents a property of progressive scan and interlaced images. In order to represent the information being scanned, it is generally considered that only 70% (the Kell-factor) of the possible vertical bandwidth is (or should be) represented. Hence when performing an interlace to progressive scan conversion, it is potentially hazardous to attempt to produce a full vertical bandwidth image. Instead, a compensation to account for a Kell-factor of less than unity may be used.
One method to compensate for the Kell-factor would be to use a 70% bandwidth filter on the frame output of any interlace to progressive scan algorithm. However, one of the fields in the frame is ‘real’ data—i.e. it was sampled correctly, so the content arising from that field must by definition be perfect. Thus a method to filter just the interpolated lines is used.
a schematically illustrates the operation of the motion adaptive interpolator 110. The interpolator 110 comprises and inter-field block matcher 600, an optional high frequency checker 610 and a mixer 620.
The inter-field block matcher 600 uses data from the current input field and the three field stores 120 to carry out inter-field motion comparisons. This involves comparing blocks of pixels the current field (FN in
In particular, weighted sums of absolute differences (SWADs) are generated as follows.
Four block matches are performed to produce two SWADS, SWADAREA and SWADLOCAL. These are:
a 5 h×4 v weighted block match on fields FN and FN-2.
a 5 h×3 v weighted block match on fields FN-1 and FN-3.
a 1 h×1 v weighted block match on fields FN-1 and FN-3.
a 1 h×2 v weighted block match on fields FN and FN-2.
Weighted block matches sum weighted absolute differences between coincident pixels, SWAD.
where FN-1(dx,dy) is the value at the frame-relative position dx, dy to the current pixel. Typical values for the weight w are:
Summing the First Two SWADs Gives an Area-Based Block Match, SWADAREA
Summing the Latter Two SWADs Gives a Localised Block Match, SWADLOCAL
All three colour components contribute to the SWADs in the same manner. The system need only maintain a SAD of the three components for each pixel, which is then weighted and combined with the values from the other pixels in the block. This means that this aspect of the process requires only 5 line stores of about 10 bpp (bits per pixel).
Optionally, the high frequency checker 610 is arranged to detect high frequencies in the input fields. The algorithm is based on the following principle. If interleaving the two source fields produces a lot of high frequency energy, then it is appropriate to try to make sure that the inputs are reasonably static. Only static video can produce reliable high frequencies; highly aliased motion can produce high frequencies, but this is not a desirable situation for inter-field interpolation. If motion is present, then high frequencies may be produced where the fields are incorrectly interleaved.
Referring to
Let HFCthresh1 and HFCthresh2 be two programmable constants, with the former greater than the latter.
Set a flag: exceededHighEnergy=false
Over each component (or a subset of them) (RGB/YPbPr)—where YPbPr indicates the colour space in a high definition system, in a similar way to YCbCr in a standard definition system:
Set energy=0
For the pixels having a horizontal position x=−2, −1, 0, 1, 2 (relative to the current pixel), let the interleaved (FN-1) field value be v0, and the current field value of the line above and below be v−1 and v1, then:
Subsequently, if exceededHighEnergy=true, increase SWADAREA by a programmable constant value, HFCpenalty.
The increase in SWADAREA will tend to act against the use of the motion adaptive pixel at that output position.
The mixer 620 operates according to the criteria SWADAREA and SWADLOCAL and also various thresholds thresh1,2, etc.
The resulting pixel value=αFN-1+(1−α) FN′. In other words, a represents pixel motion and determines contributions from the intra and inter-field interpolators.
Whilst only FN-1 and FN′ are mixed in the above equation, it will be appreciated that additional image fields or portions thereof may be mixed with FN-1 and FN′ at a given pixel position, for example the unfiltered lines of FN for alternate lines of the image, or earlier image field FN-3 if there is substantially no motion at all.
It has been recognised that the presence of noise in successive fields of the video input can generate ‘motion noise’, that is, apparent motion in a pixel due to the changes induced by the addition of noise.
However, the converse is also possible; namely that the addition of noise can counteract genuine changes in pixel values, resulting in a pixel apparently remaining substantially static when in fact it should be classified as in motion.
Such spurious static pixels may also occur when noise affected pixel values lie very close to a classification threshold.
Clearly, if a pixel in a field FN is identified as static but is in fact in motion, then a high value of α (associated with a static pixel) can result in the actually mismatched data from previous field FN-1 being predominant in the mixed processed pixel, as can be seen in the equations disclosed above. This can blur the processed image or introduce visible artefacts.
Referring now to
Specifically,
for a typical test region of ±7 h and ±1 v pixels centred on the pixel to be changed. The value of p controls the scale of the variable offset. This process is referred to hereafter as the first process. The value p can of course be zero.
Referring to
However, referring now also to
An example of an expanded region of motion noise 502 affecting interlace to progressive scan conversion can be seen in
Referring now to
Specifically,
for a typical test region of ±4h pixels centred on the pixel to be changed. The value of q controls the scale of the variable offset.
Referring to
Thus the combined effect of the first and second processes can be summarised as follows, with reference to the flow diagram of
In a first step s1, the motion regions are expanded to a first extent;
In a second step s2, the static regions are expanded to a second extent (equivalent to shrinking the motion regions);
the first extent being such that small static regions within motion regions are completely removed by the motion expansion and so are not able to recover during the subsequent static expansion, whilst other static regions recover to approximately their original state.
This therefore removes most noise induced static pixels that occur in isolation or small regions, whilst not greatly affecting α-based motion categorisation elsewhere.
Then, in a third step s3, one can interleave image fields for static pixels, whilst using spatial interpolation for motion pixels.
Optionally, the second extent is smaller in magnitude than the first extent.
In an embodiment of the present invention, α values derived for the preceding frame are used for the first and second processes when searching for the minimum or maximum nearby α value, as applicable.
This reduces the processing delays inherent in, for example, determining the α values of the next line in the image (+1 v).
It will be appreciated that the above described techniques may be applied to a whole image or a part thereof, a part being either a contiguous or non-contiguous selection of pixels within the image.
It will be appreciated by a person skilled in the art that the reference to the mixing of fields FN′ and FN-1 is one of several potential mixing options available for interlacing images in an image sequence. Generalising FN′ to FSx and FN-1 to FM, a selection of interpolation modes may be defined as:
Consequently, for example, the mixed pixel value would equal α FM+(1−α) FSx.
The motion adaptive interpolator 110 shown in
In general, it will be appreciated that the invention can be implemented in programmable or semi-programmable hardware apparatus operating under the control of appropriate software. This could be a general purpose computer or arrangements such as an ASIC (application specific integrated circuit) or an FPGA (field programmable gate array), or the motion adaptive interpolator 110. The software could be supplied on a data carrier or storage medium such as a disk or solid state memory, or via a transmission medium such as a network or internet connection, or via combinations of these.
Although illustrative embodiments of the invention have been described in detail herein with reference to the accompanying drawings, it is to be understood that the invention is not limited to those precise embodiments, and that various changes and modifications can be effected therein by one skilled in the art without departing from the scope and spirit of the invention as defined by the appended claims.
Some example Parameters:
Number | Date | Country | Kind |
---|---|---|---|
0624400.8 | Dec 2006 | GB | national |
Number | Name | Date | Kind |
---|---|---|---|
4992869 | Samad et al. | Feb 1991 | A |
5089887 | Robert et al. | Feb 1992 | A |
5093720 | Krause et al. | Mar 1992 | A |
5301019 | Citta | Apr 1994 | A |
5510856 | Jung | Apr 1996 | A |
5631706 | Tsunashima | May 1997 | A |
5715006 | Yokoyama | Feb 1998 | A |
6304602 | Yokoyama | Oct 2001 | B1 |
20050078751 | Ghanbari et al. | Apr 2005 | A1 |
Number | Date | Country |
---|---|---|
64-54986 | Mar 1989 | JP |
WO 2004039074 | May 2004 | WO |
Number | Date | Country | |
---|---|---|---|
20080136965 A1 | Jun 2008 | US |