The invention relates to a temporal recursive filter unit for noise filtering of a series of input images resulting in a series of output images, comprising:
The invention further relates to method of noise filtering of a series of input images resulting in a series of output images, comprising:
The invention further relates to an image processing apparatus comprising:
A unit of the kind described in the opening paragraph is known from U.S. Pat. No. 6,115,502. In that patent is described that a fresh input signal and a previously filtered signal are combined in the proportion k: (1−k), where k depends on a local amount of motion. In this manner, it is attempted to avoid smear obtained by averaging signals from mutually differing temporal instants in the presence of motion, while the noise filtering is fully active in the absence of motion. The variable k can be seen as a factor determining how much fresh input directly influence the filter output. The variable k is determined with a so-called motion detector. The variable is based on luminance differences between pixels of input images and output images. It is assumed that the luminance difference between input and output is a measure for the amount of motion. The value of variable k as function of luminance difference is monotonous: the higher the luminance differences between pixels the lower the value of variable k. Typically the value of k ranges from zero to one. A small difference is typically considered noise, and thus the k value will be close to zero, resulting in strong filtering. A large difference between input and output typically identifies motion in the scene and results in a higher value of k, thus preserving as much image detail as possible.
In a fixed point arithmetic implementation of a unit of the kind described in the opening paragraph, the internal calculations require a higher precision, i.e. word size than which is required to represent the input and output images. So, prior to the output of the unit, the accuracy of the signal has to be reduced. In a straightforward implementation the internal signal is rounded and the unused bits truncated. For example a 12 bits intermediate value is rounded to 8 bits. First the value 0.5 in fixed point 4 bits notation is added. Then the 4 least significant bits are removed by truncation. Such a filter unit, based on fixed point arithmetic, suffers from a known artifact, caused by the recursive nature of the filter unit. The value of an output pixel provided by the recursive filter unit will generally not reach the required value after a sudden change in the input signal. This artifact is known as “long term dirty window effect”. For example, when the input signal changes from a picture to black, a vague remainder image of the original input signal is left on the display.
It is an object of the invention to provide a filter unit of the kind described in the opening paragraph in which the above described artifact hardly occurs. The object of the invention is achieved in that the means for determining the value of the weighing factor is arranged to provide the value of the weighing factor, which is higher than a further value of the weighing factor if the difference between the first value and the second value is below a predetermined threshold, with the further value belonging to a further difference of further values of further pixels, with the further difference being above the predetermined threshold. Instead of applying a low value of the weighing factor in the case of a small difference between the pixels a relatively high value is applied. E.g. if the value of the weighing factor ranges from [0,1] then the value of the weighing factor is set to 0.5 if the difference between the pixel values is below a predetermined threshold. This is not obvious, because it is assumed that a small difference between pixel values means no or hardly any movement and hence much filtering should be applied. Or in other words, the value of the new output pixels is primarily determined by the value of the previous output pixel and hardly on the input pixel. However according to the invention the amount of filtering should be low in the case of a difference between the value of the output pixel and the value of the input pixel, which is below a predetermined threshold. By applying less filtering, the influence of values of the input pixels on the values of the output pixels increases and hence the values of the output pixels converge to the required value.
In an embodiment of the temporal recursive filter unit according to the invention, the predetermined threshold depends on calculation accuracy of the temporal recursive filter unit. Typically filter units are implemented by means of fixed point arithmetic. Above it is described that truncation is required to convert pixels represented by N number of bits to M number of bits. Before truncation, an offset is added. Typically this offset is equal to 0.5 times the value of the least significant bit in the representation with M bits. The predetermined threshold is related to the size of the offset being used. In other words the predetermined threshold is related to the number of bits being used to represent the images. See
An embodiment of the temporal recursive filter unit according to the invention comprises an error diffusion unit for diffusing truncation errors which are made by conversion of an intermediate image into the second output image. Error diffusion is another approach to deal with the “long term dirty window effect”. By applying the invention in a temporal recursive filter unit with an error diffusion unit, the convergence to the required output value is improved.
An embodiment of the temporal recursive filter unit according to the invention comprises a motion compensation unit for matching the first pixel with the second pixel. It is advantageous to apply motion estimation in combination with motion compensation in the temporal recursive filter unit according to the invention. By means of that corresponding pixels of successive images can be mixed.
Modifications of the temporal recursive filter unit and variations thereof may correspond to modifications and variations thereof of the method described and of the image processing apparatus described.
These and other aspects of the temporal recursive filter unit, of the method and of the image processing apparatus according to the invention will become apparent from and will be elucidated with respect to the implementations and embodiments described hereinafter and with reference to the accompanying drawings, wherein:
Corresponding reference numerals have the same meaning in all of the Figs.
The index n denotes an image number and the vector x corresponds to the coordinates of a pixel. At the input connector 108 the series of input images is provided. The temporal recursive filter unit 100 provides the series of output images at its output connector 110. The means 102 for determining the value of the weighing factor α(x,n) is arranged to determine the value based on comparing pixel values of input and output images. This can be by taking into account the luminance values of only two pixels, i.e. one pixel from the current input image and one pixel from the previously filtered output image. However preferably several pixels in the neighborhood of the pixels are taken into account. In U.S. Pat. No. 6,115,502 an example of the calculation of the weighing factor k is specified. This can be rewritten to Equation 1:
with C(x, n) the value of the input pixel at position x for image n and P(x, n−1) the value of the output pixel at position x for image n−1 and where N1 and N2 are neighborhoods around the current pixel. LUT means a look-up-table function.
The transfer function of the temporal recursive filter unit 100 can be described with Equation 2:
P(x,n)=α(x,n)C(x,n)+(1−α(x,n))P(x,n−1) (2)
By means of an example it will be explained how the temporal recursive filter unit according to the invention works. The example shows how the value P(x,n) of an output pixel of a recursive filter changes when the value of the input pixel C(x,n) changes from C(x,0)=100 to C(x,1)=10. The example comprises 3 parts:
In Table 3 it will be demonstrated that the value of the output pixel P(x,n) converges to the required value, in the case of a filter unit in which truncation is applied and in which the invention is applied: an embodiment of a temporal recursive filter unit according to the invention.
The values of P(x,n) in Table 1 are calculated by means of Equation 3:
P(x,n)=(α(x,n)C(x,n)+(16−α(x,n))P(x,n−1))/16 (3)
The value of the weighing factor α(x,n) ranges from [1,16] and is set to 14 for n=1 and is set to 1 for n=0, 2, 3, 4, . . . . The value of the weighing factor α(x,n) depends on the difference between P(x,n−1) and C(x,n). In Table 1 it can be seen that the value of P(x,n) converges very slowly to the required value 10: for n=96 the value of P(x,n)=10.02446.
The values of P(x,n) in Table 2 are calculated by means of Equation 4:
P(x,n)=truncate((α(x,n)C(x,n)+(16−α(x,n))P(x,n−1)+8)/16) (4)
This corresponds with a fixed point representation where the input and output data is represented with 8 bits. Before truncation an offset of {fraction (8/16)} is added. In Table 2 it can be seen that the required value 10 is not reached. Because of the truncation the value of P(x,n) does not become lower than 18.
The values of P(x,n) in Table 3 are calculated by means of Equation 4. The difference with Table 2 is that now the value of the weighing factor α(x,n) is set to 9 for n=0, 5, 6, 7, . . . . The value of the weighing factor α(x,n) depends on the difference between P(x,n−1) and C(x,n). In Table 3 it can be seen that the required value 10 is reached. This is because the value of the weighing factor α(x,n) is set to a high value for small differences between P(x,n−1) and C(x,n).
Output(i)=truncate(Input(i)+0.5) (5)
with index i. The error diffusion unit 202 works as specified in Equation 6:
Output(i)=truncate(Input(i)+rest) (6)
with,
rest=Input(i−1)−truncate(Input(i−1) (7)
Substitution of Equation 7 into Equation 6 yields:
Output(i)=truncate((Input(i)+(Input(i−1)−truncate(Input(i−1)) (8)
Table 4 gives an example of a standard truncation with a fixed offset of 0.5 according to Equation 5 and Table 5 gives an example of a truncation based on error diffusion according to Equation 8.
By means of an example it will be explained how the temporal recursive filter unit 200 according to the invention works. The example shows how the value P(x,n) of an output pixel of a recursive filter changes when the value of the input pixel C(x,n) changes from C(x,0)=100 to C(x,1)=10. The example comprises 2 parts:
In Table 6 it will be demonstrated that the value of the output pixel P(x,n) converges much faster to the required value, in the case of a filter unit according to the invention in which error diffusion is applied.
The values of P(x,n) in Table 6 are calculated by means of Equation 9:
P(x,n)=truncate((α(x,n)C(x,n)+(16−α(x,n))P(x,n−1)+rest)/16) (9)
with rest ranging from [0,15] and being calculated as specified in Equation 7. The value of the weighing factor α(x,n) ranges from [1,16] and is set to 14 for n=1 and is set to 1 for n=0, 2, 3, 4, . . . . The value of the weighing factor α(x,n) depends on the difference between P(x,n−1) and C(x,n). The output pixel P(x,n) converges to the required value very slowly.
The values of P(x,n) in Table 7 are calculated by means of Equation 9, with rest ranging from [0,15] and being calculated as specified in Equation 7. The value of the weighing factor α(x,n) ranges from [1,16] and is set to 14 for n=1 and is set to 1 for n=2, 3, . . . , 6 and set to 8 for n=0, 7, 8, 9, . . . . The value of the weighing factor α(x,n) depends on the difference between P(x,n−1) and C(x,n). The output pixel P(x,n) converges to the required value much faster.
The size of the memory unit 106 for storage of an output image, in any of the temporal recursive filter units 100, 200, 300 or 400, might be such that an output image can be stored with the same number of bits per pixel as being used to represent the output image provided at the output connector 110. Optionally embedded compression is applied to reduce the size of the memory unit. This is not shown in any of the
The value of the weighing factor α below the predetermined threshold is equal to 0.5. This is just an example value. Besides that it is possible that there are multiple values below the predetermined threshold, e.g. a function of the weighing factor α with a staircase shape.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be constructed as limiting the claim. The word ‘comprising’ does not exclude the presence of elements or steps not listed in a claim. The word “a” or “an” preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements and by means of a suitable programmed computer. In the unit claims enumerating several means, several of these means can be embodied by one and the same item of hardware.
Number | Date | Country | Kind |
---|---|---|---|
02075804.1 | Feb 2002 | EP | regional |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/IB03/00468 | 2/7/2003 | WO |