The field of two-dimensional filters and their design methods has known a large development due to its importance in image processing (Lim, 1990; Lu & Antoniou, 1992). There are methods based on numerical optimization and also analytical methods relying on 1D prototypes. A commonly-used design technique for 2D filters is to start from a specified 1D prototype filter and transform its transfer function using various frequency mappings in order to obtain a 2D filter with a desired frequency response. These are essentially spectral transformations from s to z plane, followed by z to mappings, approached in early papers (Chakrabarti & Mitra, 1977; Hirano & Aggarwal, 1978; Harn & Shenoi, 1986; Nie & Unbehauen, 1989). Generally these transformations conserve stability, so from 1D prototypes various stable recursive 2D filters can be obtained. The most common types are directional, fan-shaped, diamond-shaped and circular filters. Diamond filters are commonly used as anti-aliasing filters in the conversion between signals sampled on the rectangular sampling grid and the quincunx sampling grid. Various design methods for diamond-shaped filters were studied in (Tosic, 1997; Lim & Low, 1997; Low & Lim, 1998; Ito, 2010; Matei, 2010).
There are several classes of filters with orientation-selective frequency response, useful in tasks like edge detection, motion analysis, texture segmentation etc. Some relevant papers on directional filters and their applications are (Danielsson, 1980; Paplinski, 1998; Austvoll, 2000). An important class of orientation-selective filters are steerable filters, synthesized as a linear combination of a set of basis filters (Freeman & Adelson, 1991) and steerable wedge filters (Simoncelli & Farid, 1996). A directional filter bank (DFB) for image decomposition in the frequency domain was proposed in (Bamberger, 1992). In (Qunshan & Swamy, 1994) various 2D recursive filters are approached. Fan-shaped, also known as wedge-shaped filters find interesting applications. Design methods for IIR and FIR fan filters are presented in some early papers (Kayran & King, 1983; Ansari, 1987). An efficient design method for recursive fan filters is presented in (Zhu & Zhenya, 1990). An implementation of recursive fan filters using all-pass sections is given in (Zhu & Nakamura, 1996). In (Mollova, 1997), an analytical least-squares technique for FIR filters, in particular fan-type, is proposed. Design methods for efficient 2D FIR filters were treated in papers like (Zhu et al., 1999; Zhu et al., 2006). Zero-phase filters were studied as well (Psarakis, 1990). Different types of 2D filters derived from 1D prototypes through spectral transformations were treated in (Matei, 2011a).
We propose in this chapter some new design procedures for particular classes of 2D filters; the described methods are mainly analytical but also include numerical approximations. Various types of 2D filters will be approached, both recursive (IIR) and non-recursive (FIR). The design methods will focus however on recursive filters, since they are the most efficient.
The proposed design methods start from either digital or analog 1D prototypes with a desired characteristic. In this chapter we will mainly use analog prototypes, since the design turns out to be simpler and the 2D filters result of lower complexity. This analog prototype filter is described by a transfer function in the complex variable s, which can be factorized as a product of elementary functions of first or second order. The prototype transfer function results from an usual approximation (Butterworth, Chebyshev, elliptic) and the shape of the frequency response corresponds to the desired characteristic of the 2D filter.
The next design stage consists in finding the specific complex frequency transformation from the axis s to the complex plane , of the general form , . This mapping will be determined for each type of 2D filter separately, starting from the geometrical specification of its shape in the frequency plane. Once found this particular mapping, the 2D filter function results directly by applying this transformation to each factor function of the prototype. Thus, the 2D filter transfer function results directly factorized, which is a major advantage in its implementation. The proposed design method applies the bilinear transform as an intermediate step in determining the 1D to 2D frequency mapping. All the proposed design techniques are mainly analytical but also involve numerical optimization, in particular rational approximations (e.g. Chebyshev-Padé). Some of the designed 2D filters result with complex coefficients. This should not be a serious shortcoming, since such IIR filters are also used (Nikolova et al., 2011).
In this chapter we will approach two main classes of 2D filters. The first one comprises three types of orientation-selective filters, as follows: square-shaped (diamond-type) IIR filters, with arbitrary orientation in the frequency plane; fan-type IIR filters with specified orientation and aperture angles; and very selective IIR multi-directional filters (in particular two-directional and three-directional), which are useful in detecting and extracting simultaneously lines with different orientations from an image.
The other class discussed here refers to FIR filters. From this category we will approach zero-phase filters with circular frequency response. Zero-phase filters, with real transfer functions, are often used in image processing since they do not introduce any phase distortions. All these types of 2D filters are analyzed in detail in the following sections.
Stability of the two-dimensional recursive filters is also an important issue and is much more complicated than for 1D filters. For 2D filters, in general, it is quite difficult to take stability constraints into account during approximation stage (O’Connor & Huang, 1978). Therefore, various techniques were developed to separate stability from approximation. If the designed filter becomes unstable, some stabilization procedures are needed (Jury et al., 1977). Various stability conditions for 2D filters have been found (Mastorakis, 2000).
The medical image processing field has known a rapid development due to imaging value in assisting and assessing clinical diagnosis (Semmlow, 2004; Berry, 2007; Dougherty, 2011). In particular, the currently used vascular imaging technique is x-ray angiography, mainly in diagnosing cardio-vascular pathologies. A frequent application of cardiac imaging is the localization of narrowed or blocked coronary arteries. Fluorescein angiography is the best technique to view the retinal circulation and is useful for diagnosing retinal or optic nerve condition and assessing disorders like diabetic retinopathy, macular degeneration, retinal vein occlusions etc. There are many papers approaching various methods and techniques aiming at improving angiogram images. In papers like (Frangi et al., 1998) the multiscale analysis is used, with the purpose of vessel enhancement and detection. Usual approaches include Hessian-based filtering, based on the multiscale local structure of an image and directional features of vessels (Truc et al., 2007). In cardio-vascular imaging, an essential pre-processing task is the enhancement of coronary arterial tree, commonly using gradient or other local operators. In (Khan et al., 2004) a decimation-free directional filter bank is used. An adaptive vessel detection scheme is proposed in (Wu et al., 2006) based on Gabor filter response. Filtering is an elementary operation in low level computer vision and a pre-processing stage in many biomedical image processing applications. Some edge-preserving filtering techniques for biomedical image smoothing have been proposed (Rydell et al., 2008; Wong et al., 2004). At the end of this chapter some simulation results are given for biomedical image filtering using some of the proposed 2D filters, namely the directional narrow fan-filter with specified orientation and the zero-phase circular filter.
2. Analog and digital 1D prototype filters used in 2D filter design
This section presents the types of analog and digital 1D recursive prototype filters which will be further used to derive the desired 2D filter characteristics. An analog IIR prototype filter of order N has a transfer function in variable s of the general form:
This general transfer function can be factorized into simpler rational functions of first and second order. Such a second-order rational function (biquad) can be written:
where generally the second-order polynomials at numerator and denominator have complex-conjugated roots, and k is a constant. For typical approximations – Chebyshev or elliptic – usually , therefore the numerator has imaginary zeros. For odd-order filters, the denominator contains at least a first-order factor (). An elliptic approximation with very low ripple can be used for an almost maximally-flat low-order filter. Next we consider two such low-pass (LP) prototypes with imposed specifications. The first is an elliptic LP analog filter of order , cutoff frequency , peak-to-peak ripple dB, stop-band attenuation dB. Its transfer function can be factorized into three biquad functions like (2): where and:
The frequency response magnitude of this LP filter for is shown in Fig. 1(a).
The second prototype is an elliptic LP analog filter with parameters: , , db,db. Its transfer function is written as a product of two biquad functions like (2): , where and
The frequency response magnitude of this LP filter for is shown in Fig.1 (b). The simplest analog LP filter has a transfer function , where the value gives the selectivity (Fig.1(c)). If the filter characteristic is shifted to a given frequency , the transfer function becomes:
In Fig.1 (d) the shifted filter response magnitude for is shown. Another useful analog prototype is the selective second-order (resonant) filter with central frequency :
The transfer function magnitude for such a filter with and is shown in Fig. 1 (e). This will be further used as a prototype for two-directional filters.
A useful zero-phase prototype can be obtained from the general function (1) by preserving only the magnitude characteristics of the 1D filter; this prototype will be further used to design 2D zero-phase FIR filters of different types, specifically circular filters, with real-valued transfer functions. In order to obtain a zero-phase filter, we consider the magnitude characteristics of , defined by the absolute value . We look for a series expansion of the magnitude that has to be an approximation as accurate as possible on the frequency domain . The most convenient for our purpose is the Chebyshev series expansion, because it yields an efficient approximation of a given function, which is uniform along the desired interval. The Chebyshev series in powers of the frequency variable for a given function on a specified interval can be easily found using a symbolic computation software like MAPLE. However, we will finally need a trigonometric expansion of , namely in , rather than a polynomial expansion in powers of . Therefore, prior to Chebyshev series calculation, we apply the change of variable:
and so we get the polynomial expansion in variable x:
where the number of terms N is chosen large enough to ensure the desired precision. The next step is to substitute back in the polynomial expression (11), therefore we obtain the factorized function in , with :
Next let us consider a recursive digital filter of order N with the transfer function:
This general transfer function with can be factorized into first and second order rational functions. For an odd order filter, has at least one first-order factor:
The transfer function also contains second-order (biquad) functions, where in general the numerator and denominator polynomials have complex-conjugated roots:
We will further use the term template, common in the field of cellular neural networks, for the coefficient matrices of the numerator and denominator of a 2D transfer function .
3. Diamond-type recursive filters
In this section a design method is proposed for 2D square-shaped (diamond-type) IIR filters. The design relies on an analog 1D maximally-flat low-pass prototype filter. To this filter a frequency transformation is applied, which yields a 2D filter with the desired square shape in the frequency plane. The proposed method combines the analytical approach with numerical approximations.
3.1. Specification of diamond-type filters in the frequency plane
The standard diamond filter has the shape in the frequency plane as shown in Fig.2 (a). It is a square with a side length of , while its axis is tilted by an angle of radians about the two frequency axes. Next we will consider the orientation angle about the (vertical) axis. In this chapter a more general case is approached, i.e. a 2D diamond-type filter with a square shape in the frequency plane, but with arbitrary axis orientation angle, as shown in Fig. 2(e). Next we refer to them as diamond-type filters, since they are more general than the diamond filter from Fig. 2 (a).
The diamond-type filter in Fig.2 (e) is derived as the intersection of two oriented low-pass filters whose axes are perpendicular to each other, for which the shape in the frequency plane is given in Fig.2 (c), (d). Correspondingly, the diamond-type filter transfer function results as a product of two partial transfer functions:
The frequency characteristic of is ideally identical to the frequency characteristic of rotated by an angle of . Since this rotation of axes implies the frequency variable change: , , the transfer function can be derived from as . A more general filter belonging to this class is a rhomboidal filter, as shown in Fig.2 (f). In this case the two oriented LP filters may have different bandwidths and their axes are no longer perpendicular to each other.
3.2. Design method for diamond-type filters
The issue of this section is to find the transfer function of the desired 2D filter using a complex frequency transformation . From a prototype (which varies on one axis only), a 2D oriented filter is obtained by rotating the axes of the plane by an angle . The rotation is defined by the following linear transformation, where are the original frequency variables and the rotated ones:
The spatial orientation is specified by an angle with respect to axis, defined by the 1D to 2D frequency mapping . By substitution, we obtain the oriented filter transfer function . In the complex plane the above frequency transformation becomes:
The oriented filter has the frequency response magnitude section along the line , identical with prototype , and constant along the perpendicular line (filter longitudinal axis) . The usual method to obtain a discrete filter from an analog prototype is the bilinear transform. If the sample interval takes the value , the bilinear transform for and in the complex plane has the form:
This method is straightforward, still the resulted 2D filter will present linearity distortions in its shape, which increase towards the limits of the frequency plane as compared to the ideal frequency response. This is mainly due to the so-called frequency warping effect of the bilinear transform, expressed by the continuous to discrete frequency mapping:
where is a frequency of the discrete filter and is the corresponding frequency of the analog filter. This error can be corrected by applying a pre-warping. Taking in (20), we substitute the mappings:
In order to include the nonlinear mappings (21) into the frequency transformation, a rational approximation is needed. One of the most efficient is Chebyshev-Padé, which gives uniform approximation over a specified range. We get the accurate approximation for :
Substituting the nonlinear mappings (21) with approximate expression (22) into (18) we get the 1D to 2D mapping which includes the pre-warping along both frequency axes:
Applying the bilinear transform (19) along the two axes we obtain the mapping in matrix form, where and :
Here and the matrices and of size are given by:
Substituting the mapping (24) into the expression (2) of the biquad transfer function with , we get the 2D transfer function in the matrix form:
where and are the vectors:
and the templates , are given by the expressions:
For instance, corresponding to the third biquad function given by (5), the following templates result according to the expressions (28):
The characteristics of a diamond-type filter with orientation angle and based on the prototype filter of order 6 given by the factors (3)-(5) is shown in Fig.3 (b), (c). As can be noticed, the filter characteristic corrected by pre-warping has a good linearity, however it still twists towards the margins of the frequency plane. These marginal linearity distortions can be corrected using an additional LP filter. For instance, we can choose as prototype an 1D elliptic digital filter of order , pass-band ripple dB, stop-band attenuation dB and cutoff frequency , which has the coefficients given by the vectors:
The 2D low-pass filter is separable and results by applying successively the 1D filter along the two frequency axes; the matrices of the correction filter result as: , , where the symbol denotes outer product of vectors. The correction filter has the following transfer function, where , :
The resulted 2D square-shaped correction filter characteristic is shown in Fig.3 (a) and is almost maximally-flat, as required. The corrected version of the diamond-type filter from Fig. 3 (b), (c) has the magnitude and the contour plot shown in Fig. 3 (d), (e). It can be easily noticed that the initial distortions have been eliminated. Another two diamond-type filters with orientation angles and are shown in Fig. 4 (a)-(d).
4. Fan-type recursive filters
In this section an analytical design method in the frequency domain for 2D fan-type filters is proposed, starting from an 1D analog prototype filter, with a transfer function decomposed as a product of elementary functions. Since we envisage designing efficient 2D filters, of minimum order, recursive filters are used as prototypes, and the 2D fan-type filters will result recursive as well.
In Fig.5 (a) a general fan-type filter is shown, with an aperture angle , oriented along an axis and its longitudinal axis forming an angle with frequency axis . A particular case is the two-quadrant fan filter, shown in Fig.5 (b). Fig.5 (c) shows a DFB with 8-band frequency partition (Bamberger, 1992), an angularly-oriented image decomposition which splits the frequency plane into fan-shaped sub-bands (channels).
The 1D analog filter discussed in section 2 is used as prototype. The general fan-type filter can be derived from a LP prototype using the frequency mapping (Matei & Matei, 2012):
In (31), is the aperture coefficient, where is the aperture angle of the fan-type filter. This frequency mapping in the complex variables , is:
Applying the same steps as in Section 3.2 in order to obtain a discrete form of the above frequency mapping, using relations (21), (22) and (32) we obtain the 1D to 2D mapping which includes pre-warping along both axes of the frequency plane:
We now apply the bilinear transform (19) along the two axes and obtain the mapping in matrix form, where and :
and the matrices and are given by:
Substituting the mapping (34) into the biquad expression (2) with , we get the 2D transfer function in matrix form , similar to (26), where the vectors , are given by (27). The templates and are given by:
The 2D transfer function for each biquad is complex. The characteristics of a fan-type filter designed with this method and based on the prototype filter of order 4 given by (6)-(7) is shown in Fig.6 (a), for the indicated parameters. As with the diamond-type filter analyzed in the previous section, the fan-type filter characteristic features marginal linearity distortions which can be corrected using a LP filter, similar with the correction filter used in Section 3.2 and having the frequency characteristic shown in Fig. 3 (a).
Two corrected fan-type filters with specified parameters have the magnitudes and contour plots shown in Fig.6 (b), (c). The initial distortions have been eliminated. With the same correction filter, we obtain the two-quadrant fan filter, shown in Fig. 7, by setting the aperture angle and orientation angle .
5. Very selective multidirectional IIR Filters
In this section a design method based on spectral transformations is proposed for another class of 2D IIR filters, namely multi-directional filters. The design starts from an analog prototype with specified parameters. Applying an appropriate frequency transformation to the 1D transfer function, the desired 2D filter is directly obtained in a factorized form, like the filters designed in the previous sections. For two-directional filters, an example is given of extracting lines with two different orientations from a test image. The spectral transformation used in the case of multi-directional filters is similar to the one presented in the previous section, derived for fan-type filters and given by (34), (35). In this section the design of two-directional and three-directional filters with specified orientation is detailed. The method can be easily generalized to arbitrary multi-directional filters.
5.1. Two-directional fan-type filters
A two-directional 2D filter is orientation-selective along two directions in the frequency plane. It is based on a selective resonant IIR prototype as given in section 2. Applying the same frequency transformation derived for fan-type filters and given by (33) to the prototype filter (9) we get the 2D two-directional transfer function in matrix form , similar to (26), but the matrices , now have the form:
The denominator matrix has complex elements. In Fig.9 (a), the contour plot of the frequency response magnitude is shown for a two-directional filter with aperture and orientation . As with the previous types of filters, the marginal linearity distortions can be corrected using an additional LP square-shaped filter.
The templates and of the corrected filter result by convolution: and . In Fig.9 (b), (c) the frequency response magnitudes and contour plots are displayed for the corrected two-directional filter with specified aperture and orientation. The initial distortions have been eliminated.
The second two-directional filter in Fig.9 (d), (e) is a particular case, being oriented along the two frequency axes (, ), therefore can be used to detect simultaneously horizontal and vertical lines from an image, as shown in the next section.
5.2. Three-directional fan-type filters
In order to design a three-directional filter like the one depicted in Fig. 8 (b), we must start from an analog three-band selective filter, like the one with frequency response shown in Fig. 8 (c). For a three directional filter, the middle peak frequency can always be taken , and the other two on each side at specified values. The prototype transfer function in variable s will be in this case the sum of three elementary functions:
The frequency response of a filter of this kind with parameter values , and is shown in Fig. 8 (c). Substituting the mapping (34) into the expression (8) of the elementary function , we get the 2D transfer function in matrix form: , where , and the templates ,are given by:
Each of the three elementary terms in (38) corresponds to a pair of templates and given by (39). If the three elementary filters are given by the pairs of templates (, ), (, ) and (, ), the templates of size of the entire three-directional filter will result by summing up the convolutions of elementary templates:
The numerator of from (38) has the general form:
where , and .
We see that is real and , are generally complex. The coefficients , are real only when , i.e. for symmetric frequency values around the origin. Finally, for any specified set of values , , the denominator factorizes as , where and are complex roots. Therefore the factorized prototype transfer function is:
At the denominator, we denoted , . Applying to each factor the frequency transformation given by (34), after some algebraic manipulations, we finally obtain the templates of the three-directional filter as discrete convolutions:
This implies the fact that the transfer function of the 2D three-directional filter with templates and of size results directly in a factorized form, which is an important advantage in implementation. As a general remark on the method, using an analog prototype instead of a digital one, as is currently done, simplifies the design in this case, as the frequency mapping results simpler and leads to a 2D filter of lower complexity. The designed filters result with complex coefficients, however such IIR filters can also be implemented (Nikolova et al., 2011).
6. Directional IIR filters designed in polar coordinates
We approach here a particular class of 2D filters, namely filters whose frequency response is symmetric about the origin and has at the same time an angular periodicity. The contour plots of their frequency response, resulted as sections with planes parallel with the frequency plane, can be defined as closed curves which can be described in terms of a variable radius which is a periodic function of the current angle formed with one of the axes.
It can be described in polar coordinates by , where is the angle formed by the radius op with -axis, as shown in Fig.8(a) for a four-lobe filter. Therefore is a periodic function of the angle in the range .
6.1. Spectral transformation for filters designed in polar coordinates
The main issue approached here is to find the transfer function of the desired 2D filter using appropriate frequency transformations of the form . The elementary transfer functions (14) and (15) have the complex frequency responses:
The proposed design method for these 2D filters is based on the frequency transformation:
which maps the real frequency axis onto the complex plane , defined by the real frequency mapping:
In (48) is initially determined in the angle variable as and can be referred to as a radial compressing function. In the frequency plane we have:
If the radial function can be expressed in the variable , using (49) we obtain by substitution the function . The function will result as a polynomial or a ratio of polynomials in . For instance, the four-lobe filter with the contour plot given in Fig.11 (a) corresponds to a function:
plotted in Fig.11 (b) on the range . More generally, the 2D filter can be rotated in the frequency plane with a specified angle about one of the frequency axes, e.g. . For instance, in a four-lobe filter, two opposite lobes are oriented along a direction at an angle , and the other two at , as shown in Fig.12 (b). It can be shown that the cosine of the current angle with initial phase can be expressed as:
For filters with an even number of lobes, the radial function is expressed in even powers of or . The frequency transformation (48) can be also expressed as:
In order to obtain a rational expression for the frequency response of the 2D filter from an elementary 1D prototype of the form (45) or (46) by applying the frequency mapping (52), we need to derive rational expressions for the functions and . Using the Chebyshev-Padé method in a symbolic computation software, the following second-order rational approximations were found:
which are sufficiently accurate on the range . Since these functions are developed on the range , their approximations result neither odd nor even. However, using the above approximations will lead to relatively complex 2D filters, described by templates of size at least . For the type of filters approached, namely selective two-directional (four-lobe) filters, the approximations for and need not necessarily hold throughout the range , but only on a smaller range near the origin, corresponding to filter pass-band. Using now the Padé method we get the first-order approximations:
with , , , , , which hold only on a
narrower range around zero of the interval . Using (55) instead of (53), (54) will result in much more efficient 2D filters, which fully satisfy the imposed specifications.
We will use here a Chebyshev low-pass second-order filter of the general form (15). For this type of filter we have the coefficient symmetry . According to (46) we can write:
The numerator results real because the imaginary part is cancelled. Substituting the expressions (55) into this complex frequency response we get the rational approximation:
which can be also written as:
The function (58) has even parity, since it is expressed as a rational function in .
6.2. Two-directional filter design
We approach now the design of a particular filter type designed in polar coordinates, namely two-directional (selective four-lobe) filters along the two plane axes or with a specified orientation angle. Let us consider the radial function given by:
where is a periodic function; let . We use it to design a 2D filter with four narrow lobes in the plane . Using trigonometric identities, (59) becomes:
and is plotted for in Fig.12(a). This is a periodic function with period and has the shape of a multi-band (“comb”) filter. In order to control the amplitude of this function, we introduce another parameter k, such that the radial function takes the form . We get using (49):
and the function of the form:
Finally we derive a transfer function of the 2D filter in the complex plane . This can be achieved if we find a discrete counterpart of the function , denoted . A possible method is to express the function in the complex plane and then find the appropriate mapping to using the bilinear transform or the Euler approximation. Even if generally the bilinear transform is more often used, being a more accurate mapping, especially if a frequency pre-warping is applied to compensate for distortions, for the particular type of 2D filter approached here the Euler formula leads to more efficient filters and with better characteristics, at the same filter order. We will use the backward Euler method, which approximates the spatial derivative by , replacing s by . On the two directions of the plane we have: , . The operators , and correspond to second-order partial derivatives: , , . For the mixed operator , using repeatedly the Euler formula, we get the expression (Matei, 2011 a): . Substituting the above relations into (62) we obtain a frequency mapping similar to (47), with the templates:
The template results as a convolution of two matrices. The last step in the design of this 2D filter is to apply the frequency transformation (61) to the frequency response (58) and we find the filter templates B and A as linear combinations of and :
where , , , , are the coefficients of prototype (15). Finally the 2D filter transfer function in and has the following expression, with and given by (27):
Let us design a two-directional filter following this procedure. As 1D prototype let us consider a type-2 low-pass Chebyshev digital filter with the parameter values: order, stop-band attenuation db and passband-edge frequency (1.0 is half the sampling frequency). The transfer function in z is:
For a good directional selectivity we also choose and . The 2D filter frequency response magnitude is displayed in Fig.12 (c) and shows a very good linearity along the two directions and practically no distortions in the stop band. The constant level contour in the plane is given in Fig.12 (d). Calculating the singular values of filter templates for the above parameters we find the vectors , for the templates A, B:
Taking into account the fact that the first singular value of the templates A and B is much larger than the other four, the filter designed above can be approximated by a separable filter.
The singular value decomposition of a matrix M is written as where U and V are unitary matrices and S is a diagonal matrix containing the singular values. Thus we can
write for the filter templates A and B:
If and are the first columns of the matrices , , then A can be approximated by a matrix , where is the largest singular value of A, and are the corresponding columns of and , stands for outer product, T for transposition. Similarly for B we find . For the specified filter parameters we obtain and for template B the column vectors and result identical: .
For the template A we get and the vectors ,have complex elements. The frequency response of the resulted filter is given in Fig.12 (e). As can be noticed, the effect of the above approximation is an “overshoot” at zero frequency. This should not affect the filter functionality in detecting lines parallel with the two axes. Moreover, since the marginal elements of the vectors , , , have negligible values, by discarding them we obtain the vectors:
We finally obtain a very selective two-directional 2D filter implemented with two minimum size () templates. The template B is real while A is complex. The frequency response magnitude of this filter is shown in Fig.12 (f) and is practically similar to the one in Fig.12 (e). Similarly we can design a two-directional (four-lobe) filter with a specified orientation angle. Using the previously described method and based on the Euler approximation, the expression (10) of corresponds to a frequency transformation in the complex variables and , written in matrix form as:
and is identical to from (63). The templates of the mapping (47) are given by:
The final filter templates result according to relations (64) and (65).
Regarding the proposed method, the frequency responses of this class of 2D filters can be viewed as derived through a radial distortion from a generic maximally-flat circular filter. Indeed, referring to (48), the circular filter is the trivial case for which and the mapping (48) reduces to , as expected. This method allows one to design 2D filters with a non-convex shape in the frequency plane. The proposed design method does not involve global numerical optimization techniques, but only a few numerical approximations. The method is more general and can be applied as well to design fan filters, diamond filters, multi-directional filters etc. (Matei, 2011 a).
7. Zero-phase FIR circular filters
Filters with circular symmetry are very useful in image processing. We propose an efficient design technique for 2D circularly-symmetric filters, based on the previous 1D filters, considered as prototypes. Given a 1D prototype , the corresponding 2D circular filter function results using the frequency mapping :
The currently-used approximation of the circular function is given by:
which corresponds to the array:
Let us consider as prototype a LP analog elliptic filter of order , pass-band peak-to-peak ripple dB, stop-band attenuation dB and passband-edge frequency . Its transfer function in variable s is:
Using MAPLE or another symbolic computation program and following the design steps described in section 2, we obtain a a polynomial approximation of the magnitude through Chebyshev expansion, which has the following factorized form, with :
In order to obtain a filter with circular symmetry from the factorized 1D prototype function, we replace in (12) with the circular cosine function (74). For instance, corresponding to (12), the filter template A results in general as the discrete convolution:
where () are templates and () are templates, given by: and , where is a zero template and a zero template with the central element equal to one; is a template
obtained by bordering C with zeros. The above expressions correspond to the factors in (12).
The frequency response of the 2D circular filter results in a factorized form by substituting in (77). Even if the filter results of high order, with very large templates, next we show that using the Singular Value Decomposition (SVD), the resulted 2D filter can be approximated with a negligible error. For the filter template B we can write . The vector of singular values of size has 14 non-zero elements:
Let us denote the vector above as , with in our case. The exact filter matrix B can be written as: , where and are made up of the first 14 columns of the unitary matrices and . If we consider the first largest M values of the vector , the matrix B can be approximated as:
Here is the approximation of matrix B taking into account the first M singular values (in our case ), while , are the k-th columns of the matrices and ; stands for outer product and the superscript T for transposition.
Fig.14 shows the frequency response magnitudes of the designed circular filter approximated by taking into account the first largest 8 singular values and 5 singular values. It can be noticed that even retaining only the first 5 singular values, the 2D filter preserves its circular shape without large distortions. In this case the filter template B is approximated by from (79), for . Therefore, the template B can be written as a sum of only 5 separable matrices according to (79). This is an important aspect in the filter implementation.
8. Applications and simulation results
An example of image filtering with a two-directional filter is given. We use the filter shown in Fig.3(e), (f). This type of filter can be used in simultaneously detecting perpendicular lines from an image. The binary test image in Fig.15 (a) contains straight lines with different orientations and lengths, and a few curves. It is known that the spectrum of a straight line is oriented in the plane at an angle of with respect to the line direction. Depending on filter selectivity, only the lines with the spectrum oriented more or less along the filter pass-bands will remain in the filtered image. In the output image in Fig.15 (b), the lines roughly oriented horizontally and vertically are preserved, while the others are filtered out or appear very blurred, due to directional low-pass filtering. The joints of detected lines appear as darker pixels and can be detected, if after filtering a proper threshold is applied.
Let us apply the designed fan-type filters, which can be regarded as components of a DFB, in filtering a typical retinal vascular image. Clinicians usually search in angiograms relevant features like number and position of vessels (arteries, capillaries). An angular-oriented filter bank may be used in analyzing angiography images by detecting vessels with a given orientation. Let us consider the retinal fluorescein angiogram from Fig.16(a), featuring some pathological elements which indicate a diabetic retinopathy. This image is filtered using 5 oriented wedge filters with narrow aperture (), designed using the method described in section 4. Fig.16 (b)-(f) show the directionally filtered angiography images.
As can be easily noticed, the vessels for which the frequency spectrum overlaps more or less with the filter characteristic remain visible, while the others are blurred, an effect of the directional low-pass filtering (Matei & Matei, 2012). The directional resolution depends on the filter angular selectivity given by .
The designed zero-phase circularly-symmetric FIR filters may be useful as well in pre-processing tasks on biomedical images, having a blurring effect on the image which depends on its selectivity given by the circular filter bandwidth. The effect is somewhat similar to the Gaussian smoothing, which is used as a pre-processing stage in computer vision tasks to enhance image structures at different scales. Applying the presented design procedure, a circularly-symmetric filter bank can be derived, with components having desired bandwidths. Let us consider another retinal fluorescein angiogram, displayed in Fig.17(a). In the simulation result shown in Fig.17 (b) and (c), the two circular filters introduce gradual blurring which is visible on the fine image details, like small vessels and capillaries. In the image in Fig.17 (c) all the finer details have been almost completely smoothed out.
The design methods presented in this chapter combine the analytical approach based on 1D prototype filters and frequency transformations with numerical optimization techniques. For the classes of 2D filters designed here, we have used mainly analog filters as prototypes, which turn out to make simpler the expressions of the derived frequency mappings, and therefore the complexity of the designed 2D filters is lower in the analyzed cases. The prototypes used here were both maximally-flat or very selective, either low-pass or band-pass. For each type of 2D filter, a particular spectral transformation is derived. An important advantage is that these spectral transformations include some parameters which depend on the 2D filter specifications, like bandwidth, orientation, aperture etc. Once found the specific frequency mapping, the 2D filter results from its factorized prototype function by a simple substitution in each factor. The designed filters are versatile in the sense that the prototype parameters (bandwidth, selectivity) can be adjusted and the 2D filter will inherit these properties.
An advantage of the analytical approach over the completely numerical optimization techniques is the possibility to control the 2D filter parameters by adjusting the prototype. Another novelty is the proposed analytical design method in polar coordinates, which can yield selective two-directional and even multi-directional filters, and also fan and diamond filters. In polar coordinates more general filters with a specified rotation angle can be synthesized.
The design methods approached here are rather simple, efficient and flexible, since by starting from different specifications, the matrices of a new 2D filter result directly by applying the determined frequency mapping, and there is no need to resume every time the whole design procedure.
Stability of the designed filters is also an important problem and will be studied in detail in future work on this topic. In principle the spectral transformations used preserve the stability of the 1D prototype. The derived 2D filter could become unstable only if the numerical approximations introduce large errors. In this case the precision of approximation has to be increased by considering higher order terms, which would increase in turn the filter complexity; however, this is the price paid for obtaining efficient and stable 2D filters. Further research will focus on an efficient implementation of the designed filters and also on their applications in real-life image processing.