The present invention concerns a method and a device for filtering, especially for high-pass filtering, of a signal.
As represented in
Traditional high-pass filters are linear filters, such as the FIR filter shown in
With respect to the input signal in(k), such a filter provides an output signal value of three consecutive input signal values, the output signal value corresponding to a normalized difference between the middle of the three signal values and the mean value of the other two signal values.
The mode of operation of such a low-pass filter arrangement for an input signal in(k), represented as an example in
The range of application of such filter arrangements is very large, and the discrete signals that are filtered are formed, for example, by sampling a signal that is continuous over time. However, such signals can also be graphical information values, which are taken from an image line by line or column by column. In the processing of television signals, there are known methods in which frames with graphical information in every line are generated from the transmitted fields, in which only every other line contains graphical information. In the event of an incorrect interpolation of the intermediate-image lines, it may happen that a signal variation is produced in the vertical direction of the picture, where maximum and minimum signal values alternate from line to line (for example, luminance values or chrominance values). Such high-frequency signal processes need to be filtered, so as for example to generate a gray value from a black/white variation from one line to another, in every line. However, individual signal steps, which are represented as brightness edges or color edges in the picture, should remain unaffected by such a filter process. The same holds for signal pulses, i.e., narrow bright or dark regions in the picture, which likewise should not be wiped out by the filter process.
Thus, the basic goal of the present invention is to provide a method and a device for the high-pass filtering of a signal, which is able to filter out high-frequency signal components but does not filter out signal pulses or signal steps, or does so only to a small degree.
This goal is accomplished by a method according to claim 1 and by a high-pass filter arrangement according to claim 14. Advantageous embodiments of the invention are the subjects of the dependent claims.
The method according to the invention for high-pass filtering of a signal having a succession of signal values, in order to provide a high-pass filtered signal having a succession of signal values, comprises the following steps in order to generate a signal value of the filtered signal each time:
The method according to the invention for high-pass filtering is a nonlinear method, in which one first determines whether a first signal value lying in the signal sequence between the at least one second signal value and the at least one third signal value lies inside or outside an interval spanned by the second and third signal values. If this first signal value lies within this interval, then a filter signal value of zero is preferably generated. If the first signal values lies outside the interval boundaries formed by the at least one second signal value and the at least one third signal value, there is a pulselike deviation of the first signal value relative to these interval boundaries, so that a filtered signal value not equal to zero is generated, reflecting this pulselike deviation of this first signal value relative to the interval boundaries. The value of the filtered signal value is then preferably chosen so that it corresponds to the distance between the first signal value and the closest interval boundary.
The sign of the filtered signal value depends on the position of the first signal value relative to the mean of the interval boundaries, and for example the sign of the filtered signal value is set at minus when the first signal value is smaller than this mean, and this sign is preferably set at plus when this first signal value is larger than this mean.
In order to suppress noise during the high-pass filtering, it is preferable to set at zero the distance value resulting from the determination of the first, second, and third distance if the distance is smaller than a given limit value. This is based on the knowledge that slight deviations between signals, for example, between a first signal value and the closest interval boundaries formed by one of the neighboring signal values, usually result from noise factors, which can be suppressed by the method explained.
In an exemplary embodiment of the invention, the interval boundaries are formed by a second signal value preceding the first signal value in the sequence and a third signal value following the first signal value in the sequence. Another embodiment specifies how to select several second signal values preceding the first signal value and several third signal values following the first signal value, form an interval between each second signal value and each third signal value, and for example select as interval boundaries the second signal value and the third signal value that span the largest interval or the smallest interval. Basically, it is also possible to select any one of the second and third signal values.
Preferably, the filtered signal value is confined to an upper or lower limit value.
The method according to the invention is especially suitable for low-pass filtering in that it discloses how to produce a high-pass filtered signal according to the method according to the invention and how to generate the low-pass filtered signal from the high-pass filtered signal and the input signal.
In the simplest case, the high-pass filtered signal is subtracted from the delayed input signal in order to provide a low-pass filtered signal.
In another embodiment of a low-pass filter method applying the high-pass filter method according to the invention, the following method steps are provided:
In a modification of the last mentioned low-pass filter method, the difference signal is filtered prior to the limiting.
Furthermore, the possibility exists of weighting the difference signal and adding the weighted difference signal to the first low-pass filtered signal and to the bounded difference signal in order to generate a low-pass filtered output signal.
A high-pass filter arrangement according to the invention for filtering an input signal having a succession of signal values comprises an input for supplying the input signal and an output for providing a filter output signal, as well as a first and a second high-pass filter, each of which is connected behind the input. Furthermore, the high-pass filter arrangement comprises a coring unit with a signal input, which receives a signal depending on a filter output signal of the first high-pass filter, with a control input, which receives a signal depending on a signal at the output of the second high-pass filter, and with an output which is coupled to the output of the high-pass filter arrangement.
This high-pass filter arrangement according to the invention adaptively filters the input signal, in that the parameter of the coring unit is set each time depending on the filter output signal of the second high-pass filter, and the input signal is supplied to this second high-pass filter.
Preferably, between the output of the second high-pass filter and the control input of the coring unit an arrangement is connected to form the absolute value of the filter output signal of the second high-pass filter. Optionally, moreover, an amplifier arrangement is connected between the second high-pass filter and the control input of the coring unit, which preferably has a gain between 0 and 1, and which thus offers an opportunity to adjust the filter behavior.
The first high-pass filter preferably has a transfer function for which:
H1(z)=k1·[−z−2+2z−1−1],
where k1 is a constant. Such a filter processes three consecutive signal values of the input signal and makes available at the output a filtered value that is proportional to the difference between the middle of the three signal values and the mean of the other two signal values.
Preferably, for the transfer function of the second high-pass filter:
H2(z)=k2·[z−2−1],
where k2 is a constant. A high-pass filter with such a transfer function processes three consecutive signal values and provides a filter value that is proportional to a difference between the first and third of the three consecutive input signal values. Referring back to the above-explained method according to the invention, this filter signal value corresponds to the interval between the second and third signal values.
The coring unit, as is known, is used to set at zero the input signal values that lie within an interval dictated by a control signal, while values that are smaller or larger than this interval are decreased or increased by the control signal value, regardless of whether the input signal value is larger than the upper interval boundary dictated by the control signal or smaller than the lower interval boundary dictated by the control signal value.
When two high-pass filters with the above-explained transfer functions are used, the control signal which represents the coring parameter of the coring unit is thus dependent on the interval width between the second and third signal values, and this control signal is applied to a signal corresponding to the difference between a first signal value and the mean between the second and third signal values. Preferably, a device is connected between the output of the coring unit and the output of the filter device so that the output signal of the coring unit can be adjustably amplified or attenuated from the outside.
Preferably, a limiting arrangement is connected between the output of the coring unit and the output of the filter arrangement.
The high-pass filter arrangement according to the invention is suitable for use in a low-pass filter arrangement, in which an input signal is combined by means of a switching circuit with the output signal of the high-pass filter arrangement in order to form a low-pass filtered signal.
The present invention will now be explained in greater detail hereinbelow in exemplary embodiments with reference to the drawings:
In the figures, unless otherwise indicated, the same reference numbers designate the same parts and signals with identical meaning.
The method according to the invention for filtering a signal s(k) having a sequence of signal values in order to generate a filtered signal hp(k) likewise having a sequence of signal values is explained hereinbelow for the generation of a signal value hp(i) of the filtered signal hp(k) with reference to
The signal s(k) to be filtered can be any signal having a sequence of signal values, in particular a time-discrete signal, and thus it can represent sample pulses of a time-continuous signal. The sequence of signal values s(k) also represents a sequence of graphical information values, which are read out column by column or line by line from a picture.
The method according to the invention, in order to furnish a signal value hp(i) of the filtered signal calls for selecting a signal value of the signal s(k) to be filtered, which is represented by the signal value s(i) in
Besides this interval, the mean value of the first and second signal values s(i−1), s(i+1) is determined, being designated as m in
A determination is made as to whether the first signal value s(i) lies within the interval given by the second and third signal values s(i−1), s(i+1). If so (see
The selecting of the smaller of the first and second distance d1, d2 results in the magnitude of the filtered value hp(i) lying in an interval which is formed by the distance to the closest interval boundary and the distance to the middle of the interval. In the example of
If the selected signal value s(i) should lie within the interval of width t spanned by the second signal value s(i−1) and the third signal value s(i+1), a signal value is chosen for the filtered signal value hp(i) extending within an interval from zero to half the interval width t/2, the sign of the filtered signal value hp(i) being minus if the first signal value is smaller than the mean value m, and plus if the first signal value s(i) is greater than the mean value m.
It follows from the above that, in the case when the second and third signal values s(i−1), s(i+1) are the same size, but the first signal value s(i) is greater or smaller than the other two signal values, a value is output as the filtered signal value hp(i) whose magnitude corresponds to the difference between the first signal value s(i) and one of the other two signal values s(i−1), s(i+1), and whose sign is chosen depending on whether the first signal value s(i) is greater or smaller than the other two signal values.
In the event that the first, second, and third signal value are the same size, the filtered signal value hp(i) is equal to zero.
In order to suppress noise influences, it is preferable to set at zero the first through third distances determined during the method and the interval width, provided the value determined is less than a given limit value, since one must assume that only slight deviations of the particular signal values will result from unwanted noise influences.
The method according to the invention will preferably output, as the filtered signal value hp(i), a value whose magnitude corresponds to the distance between the first signal value s(i) and the closest interval boundary and whose sign is chosen depending on the position of the first signal value s(i) relative to the mean value m, if the first signal value s(i) lies outside the interval spanned by the second and third signal values. Preferably, moreover, the filtered signal value hp(i) will be set at zero if the first signal value s(i) lies within the interval spanned by the second and third signal values s(i−1), s(i+1). In this special configuration of the method, the filtered signal value hp(i) is equal to zero if the first signal value s(i) corresponds to the second or third signal value s(i−1), s(i+1).
For purposes of explanation, it has been assumed thus far that the second and third signal values spanning the interval come immediately before and immediately after the particular signal value s(i) in the signal sequence, and these second and third signal values form the boundaries of the interval that is considered when generating the filtered signal value hp(i).
However, the possibility also exists of selecting several second signal values preceding the particular signal value s(i) and several third signal values following the particular signal value s(i) and forming an interval between each of the second signal values and each of the third signal values and selecting the first signal value and the third signal value that span the largest interval, this second and this third signal value then forming the boundaries of the interval considered thereafter.
Mathematically, the signal value hp(k) generated by the filtering in the case when the first signal value s(i) lies outside the interval formed by the second and third signal values s(i−1), s(i+1), can be formed by forming the difference between the first signal value s(i) and the mean value m, and subtracting the magnitude of half the interval width from the resulting difference if the signal value s(i) is larger than the upper interval boundary, and adding the magnitude of half the interval width to the resulting difference if the signal value s(i) is smaller than the lower interval boundary. If s(i) lies above the upper interval boundary, the difference determined between the signal value s(i) and the half-interval boundary is positive, and the value obtained by subtracting the half-interval width from this difference value is preferably bounded at the bottom as far as zero. If s(i) lies below the lower interval boundary, the difference determined between the signal value s(i) and the half-interval boundary is negative, and the value obtained by adding this difference value to the half-interval width is preferably bounded at the top by zero. Also, in this special procedure for determining a filtered value hp(k), both the difference and the half-interval width are preferably set at zero when the value determined for this difference or the half-interval width is smaller than a given limit value.
The special advantage of the method according to the invention becomes clear from
b illustrates the high-pass filter method according to the invention by means of a signal s(k) having a pulse of amplitude a, wherein the filtered signal hp(k) likewise contains a pulse of amplitude a.
The mode of operation of a coring unit is sufficiently familiar and will be briefly summarized here. An output signal value hp(i) furnished by the coring unit 12 is zero if the input signal value hp1(i) lies within an interval given by −p(i) and +p(i). If the input signal value hp1(i) is greater than p(1), the output signal value hp(i) will be the difference between the input signal value and the control signal value p(i). If the input signal value hp1(i) is less than the negative control signal value −p(i), the output signal value hp(i) will be the sum of the input signal value hp1(i) and the control signal value p(i).
The transfer function H1(z) of the first high-pass filter is preferably:
H1(z)=0.5·[−z−2+2·z−1−1].
In terms of the discrete input sequence s(k), this means that a signal value hp1(i) at the output of the first filter 10 is proportional to a difference between a signal value s(i) and the mean value of the preceding value s(i−1) and following value s(i+1). For the transfer function H2(z) of the second filter 20, we have preferably:
H2(z)=0.5·[1−z−2] (1).
In terms of the discrete signal s(k), this means that the signal used as the parameter signal for the coring unit 12 represents each time, for a signal value s(i) of the discrete signal s(k), the half-interval width of an interval spanned by the signal value s(i−1) preceding this value s(i) and a signal value s(i+1) following this value. The output signal of the coring unit 12 is preferably subjected to amplification or damping before being taken to the output of the filter.
In this filter arrangement, therefore, a filter output value of zero is output if the difference between a signal value and the mean value of the neighboring signal values is less than the half-interval width, i.e., if this value lies within the interval spanned by the neighboring signal values. If the difference between the signal value and the mean value of the neighboring signal values is larger than the half-interval width represented by p(k), a filter signal value will be output that corresponds to the difference between the signal value and the mean value plus or minus the half-interval width, and which thus represents the distance between the signal value and the closest interval boundary of the interval spanned by the neighboring signal values.
As depicted by broken line in
By means of this gain factor v, the amplitude of the high-pass filtered signal hp(k) can be varied, where a gain factor of zero corresponds to the case in which the coring unit lets the signal present at the output of the first filter 10 pass through to the output unchanged, wherein the individual signal values in view of the above-mentioned transfer function of the first filter then correspond each time to the difference between a signal value and the mean value of the neighboring signal values.
The high-pass filter according to the invention in
The high-pass filter signal hp(k) is weighted by means of a weighting arrangement 17 with a multiplication factor 0.5 prior to the subtraction of the delayed input signal s(k) in the low-pass filter arrangement in
H1(z)=0.5·[−z−2−2z−1−1] (2)
and is constructed as an FIR filter with a sufficiently familiar nonrecursive structure made of weighting elements 101, 102, 103, delay elements 107, 108, adders 104, 105, and another amplification element 106 connected ahead of the filter output.
The second low-pass filter 20 has the transfer function H2(z) referred to above, and this filter as well is constructed as an FIR filter from a nonrecursive structure, which comprises a weighting element 201, delay elements 207, 208, an adder 204, and a weighting element 206 connected ahead of the output of the high-pass filter 20. Then, for a transfer function P(z), which defines the mapping of the input signal p(k) onto the signal p(k) supplied to the coring unit in the frequency domain, we have:
P(z)=v·|0.5·(z−2−1)| (3),
where v is the gain factor of the amplifier 24, and this gain factor is preferably 1.
a shows, as an example, one possible input signal s(k) fed to the low-pass filter arrangement in
The input signal s(k) in the depicted feature is a step signal with a step from a lower level to an upper level at k3, there being superimposed on this step signal a positive pulse at k0 and a negative pulse at k4, as well as a high-frequency signal component between k1 and k3 and k5 and k6.
As can be seen from the pattern of the low-pass filtered signal tp(k), the low-pass filter leaves the step, as well as the lower level and the upper level of the step function, unchanged, since in the manner explained the high-pass filtered signal hp(k) has a signal value of zero for constant values of the input signal and for a step in the input signal from a lower constant value to an upper constant value. The pulses at k0 and k4 remain essentially preserved, but are cut in half in their amplitude as compared to the ground level, which represents the lower level of the step signal for the pulse at k0, and the upper level of the step signal for the pulse at k4, since in the already explained manner the high-pass filter arrangement responds to a pulse likewise with a pulse, and this pulse of the high-pass filtered signal's high-pass signal hp(k) in
There is an optional possibility for varying the amplitude of the pulses remaining after the low-pass filtering tp(k), by weighting the high-pass filtered signal present at the output of the coring unit 12 by means of the weighting arrangement 18 depicted in
As is further shown by
Depending on the application, however, the sampling pattern can be varied at will, for example by setting at zero only every n-th output value hp(k) or letting through only the n-th value, where n is an integer value.
b shows the diagram obtained when only the values with even-numbered index k are low-pass filtered, where the pulses at k0 and k4 are not even contained in this sampled signal, subjected to the low-pass filtering, and are therefore not considered in the high-pass filtering, and thus are contained unchanged in the low-pass filtered signal tp(k). It is further clear that this type of filtering creates an envelope for the high-frequency signal components between k1, k2 and k5, k6.
c shows the filter result for the case in which all input signal values s(k) with odd-numbered indices are low-pass filtered, these filtered signal values containing the pulses at k0 and k4, and these pulses are fully extinguished in the low-pass filtered signal tp(k) present at the output, provided the gain factors are v=1 and v2=1, since the high-pass filtered signal then contains the pulses at their full amplitude and these pulses are subtracted from the input signal.
The limiting unit 16 is preferably designed to limit the high-pass filtered signal hp(k) symmetrically to an upper limit value g or a lower limit value −g, this limit value g being adjustable from the outside via a control input of the limiting unit 16. At the output of the limiting unit 16 there is a signal ghp(k) that is subtracted from the delayed input signal s(k). The limiting unit has the effect that the high-pass signal values ghp(k) subtracted from the input signal s(k) have a maximum amplitude g. High-pass signals components in the input signal s(k), whose amplitudes lie within the limiting region, are thus entirely low-pass filtered by the arrangement, while signal components whose amplitudes are larger than the limiting region are only reduced in amplitude by a value dictated by the limiting region. In particular, noise influences with low amplitude can be filtered out in this way, although useful high-frequency signal components will also be influenced.
In the arrangement in
Filter 32 makes it possible to organize the previously mentioned transition range between a low-pass filtering of the high-frequency signal components and their unchanged passage. This transition region can become narrower if filter 32 has an amplifying nature with a gain factor larger than one, since limiting will then occur already for small values of the difference signal df(k).
This transition region can also become broader if filter 32 has an amplifying nature with a gain factor less than one, since then limiting will occur only for large values of the difference signal df(k).
Preferably, filter 32 has a transfer behavior that damps small values of the difference signal df(k), amplifies medium values, and again damps large values, preferably values that are only somewhat smaller than the limiting value, in order to organize a smooth transition between the low-pass behavior and the free passage behavior. The filter can contain a reference table whereby the individual gain factors are assigned to the amplitudes of the difference signal df(k).
As was explained with reference to FIGS. 6 to 8, low-pass filtering with filter arrangements according to
As represented in
The improvement in the transfer behavior of the system according to
The system according to
To summarize, it may be said that the high-pass filter method according to the invention and a high-pass filter arrangement according to the invention with an adaptively adjusted coring unit has diversified applications and that the high-pass filter arrangement according to the invention has advantages over traditional linear high-pass filter arrangements, especially when filtering step signals.
For the discussion of the method according to the invention it has been assumed thus far that the signal values processed came from a signal sequence with signal values consecutive in time or space, generating an output value for every input value by using neighboring values. Depending on the specific configuration of the method, the signal sequence furnished at the output represents a high-pass filtered or low-pass filtered input sequence.
However, the method according to the invention is not limited to the processing of signal sequences with consecutive signal values in time or space, but instead can also be applied to otherwise generated signal values, as will be explained hereinbelow, where the first signal value S1 replaces the former first signal value s(i), the second signal value S2 the former second signal value s(i−1), and the third signal value S3 the former third signal value s(i+1).
In the device according to
Based on the fact that, in
The device according to
This device according to
If one furnishes these three signal values S1, S2, S3 to the device of
S1=(PC(x1, y1)+PD(x2, y2))/2
The second signal value S2 being processed corresponds to the video information value PC(x3, y3) at the starting point of the second vector vec2 in the first image C and the third signal value S3 being processed corresponds to the video information value PD(x4, y4) at the end point (x4, y4) of the second vector vec2 in the second image D.
If one furnishes these signal values S1, S2, S3 to the device of
Although the application of the method according to the invention to pixel interpolation is explained by means of a modification of the device according to
Number | Date | Country | Kind |
---|---|---|---|
103 27 578.9-35 | Jun 2003 | DE | national |