GB2493396A - A two-dimensional rolling-sum FIR filter with a non-rectangular aperture - Google Patents

A two-dimensional rolling-sum FIR filter with a non-rectangular aperture Download PDF

Info

Publication number
GB2493396A
GB2493396A GB1113569.6A GB201113569A GB2493396A GB 2493396 A GB2493396 A GB 2493396A GB 201113569 A GB201113569 A GB 201113569A GB 2493396 A GB2493396 A GB 2493396A
Authority
GB
United Kingdom
Prior art keywords
filter
text
aperture
sum
partial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
GB1113569.6A
Other versions
GB201113569D0 (en
GB2493396B (en
Inventor
Michael James Knee
Martin Weston
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Snell Advanced Media Ltd
Original Assignee
Snell Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Snell Ltd filed Critical Snell Ltd
Priority to GB1113569.6A priority Critical patent/GB2493396B/en
Publication of GB201113569D0 publication Critical patent/GB201113569D0/en
Publication of GB2493396A publication Critical patent/GB2493396A/en
Application granted granted Critical
Publication of GB2493396B publication Critical patent/GB2493396B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0202Two or more dimensional filters; Filters for complex signals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0223Computation saving measures; Accelerating measures
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0223Computation saving measures; Accelerating measures
    • H03H17/0227Measures concerning the coefficients
    • H03H17/0229Measures concerning the coefficients reducing the number of taps
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/06Non-recursive filters

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Image Processing (AREA)

Abstract

A two-dimensional rolling-sum FIR filter with a non-rectangular aperture. A 2D filter, with equal-valued coefficients and a non-rectangular aperture, may be  implemented economically by accumulating the difference 1333 between partial sums 1325  and 1331 for the leading and trailing edges of the aperture (figure 12). Each partial filter  aperture comprises only one sample in each row of the overall filter aperture.

Description

MULTIDIMENSIONAL SAMPLED-SIGNAL FILTER
FIELD OF INVENTION
This invention concerns the implementation of multidimensional filters, and particularly rolling-average or rolling-sum filters of arbitrary shape.
BACKGROUND OF THE INVENTION
The invention concerns sampled-signal finite-impulse-response (FIR) filters.
Figure 1 illustrates one implementation of a general FIR filter with arbitrary coefficients denoted w. The input signal (101) is passed through a series of single-sample delay elements (102) and each delayed version of the signal (103) is multiplied by a fixed coefficient (104). The outputs (105) of the multipliers are added together (106) to form the final output of the filter (107).
A more practical implementation, suitable for high-speed hardware, is shown in Figure 2. The single seven-input adder (106) has been replaced by six two-input adders (201), with the delay elements (202) placed at their inputs in order to ease propagation delay requirements of the adders.
Certain classes of FIR filter can be implemented more simply than the general case. For example, if all the coefficients are equal to unity, the filter no longer requires coefficient multipliers and becomes a one-dimensional rolling-sum filter.
Figure 3 is a block diagram of such a filter.
It is well known that a rolling-sum filter can be further simplified. Referring to Figure 4, the group of samples (401) that are added together to form the filter output at time t (measured in sample periods) is shown. At time t+1, the group of samples to be added together (402) consists of the previous group (401) with a new sample (403) added and an "old" sample (404) removed.
A rolhng sum filter implementation that makes use of the observation illustrated in Figure 4 is shown in Figure 5. The difference is taken (504) between the new input sample (501) and the old sample (502) which is the output of a series of delay elements (503). The result (505) is added to the previous filter output (507) at the output of delay element (508) to produce a current filter output (509).
Figure 6 shows a further simplification in which the series delay elements (503) are replaced by a single multi-element delay (603) because no intermediate outputs of the delay elements are required.
The filter shown in Figure 6, along with all subsequent rolling filters described in this specification, has a recursive element because a previous output is involved.
Consequently, care must be taken to ensure that the stored output is correctly initialized, for example at the start of each line. A convenient known way to do this is to initialize the output to zero and to extend the input line to the left with zero-valued input samples. Other known techniques, such as position-dependent gating or switching of signals, may also be used.
In image processing, the stream of samples representing an image may be considered as a two-dimensional sampled representation in which each line is scanned from loft to right and then the lines are ordered from top to bottom.
Filters with two-dimensional apertures may be implemented as shown in Figures 1, 2 or 3 with some or all of the single-sample delay elements replaced by line delays. Certain two-dimensional apertures lead to so-called "separable" filters, which can be implemented as a cascade of a horizontal filter involving only single-sample delays and a vertical filter involving only line delays. Two-dimensional rolling sum filters, having rectangular apertures and unity coefficients, are separable filters, and may therefore be implemented as a cascade of a horizontal and a vertical rolling sum filter. Figure 7 gives an example of such an implementation in the case of a rectangular aperture of 4 lines by 7 columns. A vertical rolling sum filter involving a 4-line delay (701) and a single-line accumulating delay (702) produces an intermediate output (703) which is passed to a horizontal rolling sum filter involving a 7-sample delay (704) and a single-sample accumulating delay (705) to produce a final output (706).
The action of this filter is illustrated in Figure 8. For the next output sample, a new column sum (801) is added to the filter output and an old column sum (802) is subtracted from the filter output. The new and old column sums are both obtained from the 4-line vertical rolling sum filter.
In the example shown in Figures 7 and 8, the vertical filter precedes the horizontal filter. Equally, the horizontal filter may precede the vertical filter.
We now consider the case of non-separable rolling sum filters. Figure 9 shows an example of a non-separable aperture involving 37 samples. A first known, "brute force" implementation of such an aperture would be to use 36 delay lines connected in series and to sum their outputs. This is clearly highly inefficient, even for this simple example. In a second known implementation, suitably delayed versions of the outputs of three one-dimensional rolling-sum filters of length 3, 5 and 7, as illustrated in Figure 10, could be added together. A third known implementation would make use of a two-dimensional 7 x 3 rolling-sum filter and two horizontal rolling-sum filters by dividing the aperture into segments as shown in Figure 11.
It is the object of this invention to provide a method or apparatus for realising non-separable rolling-sum or rolling-average filters using substantially fewer
processing resources than the prior art.
SUMMARY OF THE INVENTION
The invention consists in one aspect in a method and apparatus for implementing multidimensional sampled-signal filters of arbitrary aperture and equal-valued coefficients, characterized in that the output is an accumulated difference of the outputs of two substantially smaller partial filters.
BRIEF DESCRIPTION OF THE DRAWINGS
An example of the invention will now be described with reference to the drawings in which: Figure 1 is a diagram of a general FIR filter implementation according to
the prior art
Figure 2 is an improved FIR filter implementation according to the prior art Figure 3 is a rolling-sum filter according to the prior art Figure 4 illustrates how a rolling-sum filter may be simplified according to
the prior art
Figure 5 is a simplified implementation of a rolling-sum filter according to
the prior art
Figure 6 is a further simplification of a rolling-sum filter according to the
prior art
Figure 7 is an implementation of a two-dimensional separable rolling-sum
filter according to the prior art
Figure 8 illustrates the operation of a two-dimensional separable rolling-
sum filter according to the prior art
Figure 9 illustrates a non-separable filter aperture Figure 10 illustrates one segmentation of a non-separable filter aperture
according to the prior art
Figure 11 illustrates a second segmentation of a non-separable filter
aperture according to the prior art
Figure 12 illustrates the operation of a non-separable rolling-sum filter according to the invention Figure 13 is a diagram of a non-separable rolling-sum filter according to the invention Figure 14 illustrates a non-separable aperture with a simple polygonal structure Figure 15 illustrates the operation of a non-separable rolling-sum filter with a simple polygonal aperture, according to the invention Figure 16 is a diagram of a non-separable rolling-sum filter with a simple polygonal aperture, according to the invention.
DETAILED DESCRIPTION OF THE INVENTION
A non-separable rolling-sum filter according to the invention operates by accumulating the difference between the outputs of two substantially smaller filters.
Figure 9 gives an example of a non-separable two-dimensional filter aperture.
The inventors have recognized that, as the aperture moves from left to right across an image or other two-dimensional data array, a set of samples is added to the aperture and another set of samples is removed. Referring to Figure 12, the samples shown linked together on the right (1201) are added to the aperture and the samples shown in white and linked together on the left (1202) are removed. A new output of the filter could therefore be generated by adding to the previous output the sum of"new" samples (1201) and subtracting the sum of "old" samples (1202).
Referring to Figure 13. the filter input signal (1301) is passed through a series of cascaded delay lines (1302 to 1312) to produce a set of delayed input signals (1313to1323). Sevenofthesesignals(1301, 1313, 1315, 1317, 1319, 1321 and 1323) are added together (1324) to produce a partial sum (1325) of the set of "new" samples (1326). Likewise, another set of seven signals (1301, 1314, 1316.
1318, 1320, 1322 and 1323) are added together (1327) and delayed (1330) to produce a partial sum (1331)of the set of"old" samples (1329). The difference between the "new" and "old" partial sums is taken (1332) to produce a difference signal (1333) which is added (1334) to the filter output (1335) delayed by one sample period (1336). The 3-sample delay (1330) accounts for the distance between the "new" and "old" partial sums as shown in Figure 12, referred to the top and bottom samples which are considered in the main delay chain to be coincidental.
In the example given, the "new" and "old" sample patterns cannot be superimposed, so their partial sums need to be calculated in separate filters, although the implementation given in Figure 13 exploits the fact that delay elements can be shared between those two filters. For some two-dimensional apertures, the "old" sample pattern may simply be a delayed version of the "new" one, so a single filter may be used to calculate both partial sums and a delay introduced between the two.
In certain cases it may be further observed that the required two-dimensional filter aperture has a simple polygonal shape. In such cases, the partial sums may themselves be implemented as one-dimensional rolling-sum filters or simple combinations thereof. An example of such a simple polygonal aperture, in this case a right-angled triangle, is shown in Figure 14. Referring to Figure 15, the "new" samples form a straight vertical line (1501) and the "old" samples a straight diagonal line (1502). The sum of "new" samples may be formed in a vertical rolling-sum filter according to the prior art, while the sum of "old" samples may be formed in a diagonal rolling-sum filter based on delays of one line less two samples.
Referring to Figure 16, the filter input (1601) is passed separately to two partial-sum filters. In a first partial-sum filter, the difference is taken in subtractor (1602) between the input (1601) and the output (1603) of a 4-line delay (1604). The result (1605) is added (1606) to the first partial-sum filter output (1607) delayed in a 1-line delay (1608) to form the partial sum of "new" samples (1609). Likewise, in a second partial-sum filter, the difference is taken in subtractor (1610) between the input (1601) and the output (1611) of a delay of 4 lines less 8 samples (1612).
The result (1613) is added (1614) to the second partial-sum filter output (1615) delayed in a delay of 1 line less 2 samples (1616), and further delayed in a 7-sample delay (1618) to form the partial sum of "old" samples (1617, 1619). This partial sum (1619) is subtracted (1620) from the partial sum of "new" samples (1607) and the result (1621) added (1622) to the final filter output (1623) delayed by one sample period (1624). The 7-sample delay (1618) accounts for the distance between the most recent samples of the "old" and "new" partial sums as shown in Figure 15.
It should be noted that a further simplification may be made to the implementation in Figure 16 by replacing delay lines (1604, 1612)with a cascade ofa delay of4 lines less 8 samples and an 8-sample delay. The 7-sample delay can also be moved to the input of the second partial-sum filter, and combined with the other input delays. These simplifications were avoided in the description for the sake of clarity.
The example of Figures 14 to 16 has an aperture which is the simplest possible polygon, namely a triangle. For more complex shapes, the "new" and "old" sample patterns may require to be decomposed into a number of straight-line segments, each of which may be implemented as a rolling-sum filter. In general, it will be a matter of design skill to choose between an implementation consisting of multiple rolling-sum filters and an implementation simply involving tapped delay lines such as that described in Figures 9, 12 and 13 and the associated text. It will be a further matter of design skill to choose between either of those inventive implementations and the prior art solutions of which examples are given in Figures 10 and 11 and the associated text.
In the examples given, the "new" and "old" sample patterns have been derived by shifting the filter aperture one sample to the right, leading to a final accumulator based on a single-sample delay. Depending on the shape of the aperture, it may be advantageous to consider shifting the aperture down by one line instead, in which case the final accumulator will have a one-line delay, or in a diagonal direction, when the final accumulator will have some other suitable delay line.
The examples given are based on two-dimensional filtering. The invention may be extended to three or more dimensions by a process of induction. For example, we observe that a (three-dimensional) polyhedral aperture shifted by one sample in a certain direction will produce sets of "new" and "old" samples that in general may be decomposed into polygonal apertures suitable for implementation according to the invention so far described or by prior art methods.
The examples given use small apertures for the sake of simplifying block diagrams and explanations. It is recognised that processing resource savings may not in fact be obtained in such small examples because the prior art solutions are also quite simple. However, the savings, and therefore the benefit of the invention, become more substantial as the size of the filter increases.
In the examples, the filter apertures are connected and have no "holes", but the principle of adding and subtracting partial sums applies even if there are holes and even if the aperture has multiple disconnected segments. Any shape may be implemented using the invention, but it is recognised that as the complexity of the aperture shape increases, the resource savings afforded by the invention may diminish.
The principles of the invention may be applied to filters with coefficients that are not all equal to unity. An extension from rolling-sum to rolling-average filters is trivial; the output is simply divided by the number of samples in the aperture.
Other filters may be decomposed into several rolling-sum filters, either as a weighted sum or as a cascade of such filters, and some or all of the constituent rolling-sum filters may be implemented using the principles of the invention.

Claims (1)

  1. <claim-text>CLAIMS1. A method for implementing a multidimensional sampled-signal filter having arbitrary aperture and equal-valued coefficients, characterized in that the output is an accumulated difference of the outputs of two substantially smaller partial filters.</claim-text> <claim-text>2. A method according to Claim I in which the filter aperture is non-separable.</claim-text> <claim-text>3. A method according to Claim 2 in which at least one of the two partial filters includes at least one one-dimensional rolling-sum filter.</claim-text> <claim-text>4. A method for implementing a filter having an at least two dimensional filter aperture and equal-valued coefficients, characterized in that the output is an accumulated difference of the outputs of two partial filters each having a partial filter aperture which is smaller than said filter aperture.</claim-text> <claim-text>5. A method according to Claim 4 in which each partial filter aperture is two dimensional.</claim-text> <claim-text>6. A method according to Claim 4 or Claim 5, where the filter aperture extends over a set of rows extending in one of the dimensions and over a set of columns extending in the other dimension, wherein each partial filter aperture contains no more than one sample from any one of the set of rows of the filter aperture.</claim-text> <claim-text>7. Apparatus for implementing a multidimensional sampled-signal filter having arbitrary aperture and equal-valued coefficients, characterized in that the output is an accumulated difference of the outputs of two substantially smaller partial filters.</claim-text> <claim-text>8. Apparatus according to Claim 7 in which the filter aperture is non-separable.</claim-text> <claim-text>9. Apparatus according to Claim 7 in which at least one of the two partial filters includes at least one one-dimensional rolling-sum filter.</claim-text> <claim-text>10. Apparatus for implementing a filter having an at least two dimensional filter aperture and equal-valued coefficients, comprising first and second partial filters each having a partial filter aperture which is smaller than said filter aperture; a subtractor providing the difference between the outputs of the first and second partial filters and an accumulated for accumulating said difference.</claim-text> <claim-text>11. Apparatus according to Claim 10 in which each partial filter aperture is two dimensional.</claim-text> <claim-text>12. Apparatus according to Claim 10 or Claim 11, where the filter aperture extends over a set of rows extending in one of the dimensions and over a set of columns extending in the other dimension, wherein each partial filter aperture contains no more than one sample from any one of the set of rows of the filter aperture.</claim-text>
GB1113569.6A 2011-08-05 2011-08-05 Multidimensional sampled-signal filter Expired - Fee Related GB2493396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
GB1113569.6A GB2493396B (en) 2011-08-05 2011-08-05 Multidimensional sampled-signal filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
GB1113569.6A GB2493396B (en) 2011-08-05 2011-08-05 Multidimensional sampled-signal filter

Publications (3)

Publication Number Publication Date
GB201113569D0 GB201113569D0 (en) 2011-09-21
GB2493396A true GB2493396A (en) 2013-02-06
GB2493396B GB2493396B (en) 2018-08-08

Family

ID=44735528

Family Applications (1)

Application Number Title Priority Date Filing Date
GB1113569.6A Expired - Fee Related GB2493396B (en) 2011-08-05 2011-08-05 Multidimensional sampled-signal filter

Country Status (1)

Country Link
GB (1) GB2493396B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9532053B2 (en) 2012-04-04 2016-12-27 Snell Limited Method and apparatus for analysing an array of pixel-to-pixel dissimilarity values by combining outputs of partial filters in a non-linear operation

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5479926A (en) * 1995-03-10 1996-01-02 Acuson Corporation Imaging system display processor
US6249608B1 (en) * 1996-12-25 2001-06-19 Hitachi, Ltd. Template matching image processor utilizing sub image pixel sums and sum of squares thresholding
US6484191B1 (en) * 1999-07-02 2002-11-19 Aloka Co., Ltd. Apparatus and method for the real-time calculation of local variance in images
US7149364B2 (en) * 2003-01-31 2006-12-12 Fujitsu Limited Mean filter device and filtering method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5479926A (en) * 1995-03-10 1996-01-02 Acuson Corporation Imaging system display processor
US6249608B1 (en) * 1996-12-25 2001-06-19 Hitachi, Ltd. Template matching image processor utilizing sub image pixel sums and sum of squares thresholding
US6484191B1 (en) * 1999-07-02 2002-11-19 Aloka Co., Ltd. Apparatus and method for the real-time calculation of local variance in images
US7149364B2 (en) * 2003-01-31 2006-12-12 Fujitsu Limited Mean filter device and filtering method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9532053B2 (en) 2012-04-04 2016-12-27 Snell Limited Method and apparatus for analysing an array of pixel-to-pixel dissimilarity values by combining outputs of partial filters in a non-linear operation

Also Published As

Publication number Publication date
GB201113569D0 (en) 2011-09-21
GB2493396B (en) 2018-08-08

Similar Documents

Publication Publication Date Title
Zhang et al. A pipeline VLSI architecture for fast computation of the 2-D discrete wavelet transform
EP0126148A1 (en) Image processing method using a block overlap transformation procedure.
KR100970525B1 (en) Image processing apparatus
CN102098509B (en) Reconfigurable interpolation filter based on Farrow structure
Vinod et al. An improved common subexpression elimination method for reducing logic operators in FIR filter implementations without increasing logic depth
GB2493396A (en) A two-dimensional rolling-sum FIR filter with a non-rectangular aperture
KR100298327B1 (en) Method and Apparatus for high speed Convolution
EP1918874A3 (en) Filter circuit, image processing circuit, and filtering method
EP2418773A1 (en) Glitch-free switchable FIR-filter
JPWO2006134688A1 (en) Interpolation processing circuit
US20050147315A1 (en) Mean filter device and filtering method
Bailey et al. Advanced bayer demosaicing on FPGAs
JP2507154B2 (en) Filter device
US6751640B1 (en) Method and apparatus for multiply-accumulate two-dimensional separable symmetric filtering
JPH0783235B2 (en) Signal processor
JP5120079B2 (en) Two-dimensional digital filter system, two-dimensional digital filtering method and program
Mankar et al. FPGA implementation of retimed low power and high throughput DCT core using NEDA
JP3209420B2 (en) Convolution processing method and apparatus
KR970008103B1 (en) 2-dimensional digital filter
Kaufman et al. Hardware realization of a 2D IIR semisystolic filter with application to real-time homomorphic filtering
Schauland et al. Realization of a recursive 3-D cone filter for video processing applications
Sundar et al. Filtering Noise from Electrocardiogram using FIR filter with CSD Coefficients
Seybold et al. Improving wavelet denoising based on an in-depth analysis of the camera color processing
Fortener An integer-based unsharp mask algorithm for infrared imagery
Sivakumar et al. Efficient Implementation Of FPGA Based Distributed Arithmetic Architecture For Fir Filter

Legal Events

Date Code Title Description
PCNP Patent ceased through non-payment of renewal fee

Effective date: 20190805