Analytical Design of Two-Dimensional Filters and Applications in Biomedical Image Processing

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 (z1, z2) 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).


Introduction
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 (z 1 , z 2 ) 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 leastsquares 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 (z 1 , z 2 ), of the general form F : ℂ → ℂ 2 , s → F (z 1 , z 2 ).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 H (z 1 , z 2 ) 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 zerophase 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.

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 complexconjugated roots, and k is a constant.For typical approximations -Chebyshev or ellipticusually b 1 = 0, therefore the numerator has imaginary zeros.For odd-order filters, the denominator contains at least a first-order factor (s + α).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 N = 6, cutoff frequency ω c = 0.4π, peak-to-peak ripple R p = 0.04dB, stop-band attenua- tion R s = 38dB.Its transfer function can be factorized into three biquad functions like (2): (s) where k = 2.375 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: N = 4, ω c = 0.4π, R p = 0.05 db,R s = 36db.Its transfer function is written as a product of two biquad functions like (2): The frequency response magnitude of this LP filter for ω ∈ − π, π is shown in Fig. 1 (b).The simplest analog LP filter has a transfer function H j (s) = α / (s + α), where the value α gives the selectivity (Fig. 1(c)).If the filter characteristic is shifted to a given frequency ω 01 ∈ − π, π , the transfer function becomes: In Fig. 1 (d) the shifted filter response magnitude for ω 01 = 0.416π is shown.Another useful analog prototype is the selective second-order (resonant) filter with central frequency ω 0 : ( ) The transfer function magnitude for such a filter with α = 0.1 and ω 0 = 1.3 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 H P ( jω), defined by the absolute value | H P ( jω We look for a series expansion of the magnitude | H P ( jω) | 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 | H P ( jω) | , namely in cos(nω), rather than a polynomial expansion in powers of ω.
Therefore, prior to Chebyshev series calculation, we apply the change of variable: arccos( ) cos( ) 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 x = cosω in the polynomial expression (11), therefore we obtain the factorized function in cosω, with n + 2m = N : Next let us consider a recursive digital filter of order N with the transfer function: This general transfer function with M = N can be factorized into first and second order rational functions.For an odd order filter, H P (z) 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 H (z 1 , z 2 ).

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.

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 π 2, while its axis is tilted by an angle of φ = π / 4 radians about the two frequency axes.Next we will consider the orientation angle φ about the ω 2 − (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 H 2 (z 1 , z 2 ) is ideally identical to the frequency characteristic of rotated by an angle of φ = π / 2. Since this rotation of axes implies the frequency variable change: ).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.

Design method for diamond-type filters
The issue of this section is to find the transfer function H 2D (z 1 , z 2 ) of the desired 2D filter using a complex frequency transformation s → F (z 1 , z 2 ).From a prototype H P (s) = H P ( jω) (which varies on one axis only), a 2D oriented filter is obtained by rotating the axes of the plane (ω 1 , ω 2 ) by an angle φ.The rotation is defined by the following linear transformation, where ω 1 , ω 2 are the original frequency variables and ω ¯1, ω ¯2 the rotated ones: The spatial orientation is specified by an angle φ with respect to ω 1 − axis, defined by the 1D to 2D frequency mapping ω → ω 1 cosφ + ω 2 sinφ.By substitution, we obtain the oriented filter transfer function H φ (ω 1 , ω 2 ) = H P (ω 1 cosφ + ω 2 sinφ).In the complex plane (s 1 , s 2 ) the above frequency transformation becomes: The oriented filter H φ (ω 1 , ω 2 ) has the frequency response magnitude section along the line ω 1 cosφ + ω 2 sinφ = 0, identical with prototype H P (ω), and constant along the perpendicular line (filter longitudinal axis) ω 1 sinφ − ω 2 cosφ = 0.The usual method to obtain a discrete filter from an analog prototype is the bilinear transform.If the sample interval takes the value T = 1, the bilinear transform for s 1 and s 2 in the complex plane (s 1 , s 2 ) 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: ( ) Digital Filters and Signal Processing where ω is a frequency of the discrete filter and ω a is the corresponding frequency of the analog filter.This error can be corrected by applying a pre-warping.Taking T = 1 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 s → F φ (z 1 , z 2 ) in matrix form, where Here k = 1.5233 and the matrices M φ and N φ of size 3 × 3 are given by: Substituting the mapping (24) into the expression (2) of the biquad transfer function H b (s) with b 1 = 0, we get the 2D transfer function H B (z 1 , z 2 ) in the matrix form: ( , ) where z 1 and z 2 are the vectors: and the 5 × 5 templates B 1 , A 1 are given by the expressions: For instance, corresponding to the third biquad function H b3 (s) given by ( 5), the following 5 × 5 templates result according to the expressions (28):  The characteristics of a diamond-type filter with orientation angle φ = π / 4 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 N = 3, pass-band ripple R p = 0.1dB, stop-band attenuation R s = 40 dB and cutoff frequency ω c = 0.6, 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 4 × 4 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

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   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), a = 1 / tg(θ / 2) is the aperture coefficient, where θ is the aperture angle of the fan-type filter.This frequency mapping in the complex variables s 1 = jω 1 , s 2 = jω 2 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 T T s F z z j a P z z Q z z j a and the 3 × 3 matrices P φ and Q φ are given by: Substituting the mapping (34) into the biquad expression (2) with b 1 = 0, we get the 2D transfer function in matrix form ), similar to (26), where the vectors z 1 , z 2 are given by (27).The 5 × 5 templates B 2 and A 2 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).

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.

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 s → F φ (z 1 , z 2 ) derived for fan-type filters and given by ( 33) to the prototype filter (9) we get the 2D two-directional transfer function H 2 (z 1 , z 2 ) in matrix form ), similar to (26), but the 5 × 5 matrices B 3 , A 3 now have the form: ( ) 3 0 a a j a j j j j j j j j a a w The denominator matrix A 3 has complex elements.In Fig. 9 (a), the contour plot of the frequency response magnitude is shown for a two-directional filter with aperture θ = π / 6 and orientation φ = π / 5.As with the previous types of filters, the marginal linearity distortions can be corrected using an additional LP square-shaped filter.The second two-directional filter in Fig. 9 (d), (e) is a particular case, being oriented along the two frequency axes (θ = π / 2, φ = π / 4), therefore can be used to detect simultaneously hori- zontal and vertical lines from an image, as shown in the next section.

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.
We see that a 2 is real and a 0 , a 1 are generally complex.The coefficients a 0 , a 1 are real only when ω 02 = − ω 01 , i.e. for symmetric frequency values around the origin.Finally, for any specified set of values α, ω 01 , ω 02 the denominator factorizes as B j (s) = 3α ⋅ ( s + r 1 )( s + r 2 ) , where r 1 and r 2 are complex roots.Therefore the factorized prototype transfer function is: At the denominator, we denoted p 1 = α + j ⋅ ω 01 , p 2 = α + j ⋅ ω 02 .Applying to each factor the frequency transformation s → F φ (z 1 , z 2 ) 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 H 3 (z 1 , z 2 ) of the 2D three-directional filter with templates B 3 and A 3 of size 7 × 7 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).

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 ω 1 -axis, as shown in Fig. 8(a) for a four-lobe filter.Therefore ρ(φ) is a periodic function of the angle φ in the range φ ∈ 0, 2π .

Spectral transformation for filters designed in polar coordinates
The main issue approached here is to find the transfer function of the desired 2D filter H 2D (z 1 , z 2 ) using appropriate frequency transformations of the form ω → F (ω 1 , ω 2 ).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: Digital Filters and Signal Processing which maps the real frequency axis ω onto the complex plane (z 1 , z 2 ), defined by the real frequency mapping: ( ) In ( 48) ρ(ω 1 , ω 2 ) is initially determined in the angle variable φ as ρ(φ) and can be referred to as a radial compressing function.In the frequency plane (ω 1 , ω 2 ) we have: cos ( ) cos sin 0.5sin 2 j j j w j w j w w w w For filters with an even number of lobes, the radial function ρ(φ) is expressed in even powers of cosφ or cos(φ + φ 0 ).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 cos ω and sin ω.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 ω ∈ [0,π .Since these functions are developed on the range [0,π , 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 9 × 9.For the type of filters approached, namely selective two-directional (four-lobe) filters, the approximations for cos ω and sin ω need not necessarily hold throughout the range [0,π , 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:  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 b 2 = b 0 .According to (46) we can write: ( ) )cos ( 1)sin ( ) 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 ω 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 B ˜(φ) is a periodic function; let B ˜(φ) = cos(4φ).We use it to design a 2D filter with four narrow lobes in the plane (ω 1 , ω 2 ).Using trigonometric identities, ( and is plotted for φ ∈ − π, π in Fig. 12(a).This is a periodic function with period Φ = π / 4 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 ρ(φ) = k ⋅ H r (φ).We get using (49): and the function F 2 (s 1 , s 2 ) of the form: Finally we derive a transfer function of the 2D filter H (z 1 , z 2 ) in the complex plane (z 1 , z 2 ).This can be achieved if we find a discrete counterpart of the function ρ(ω 1 , ω 2 ), denoted R(z 1 , z 2 ).
A possible method is to express the function ρ(ω 1 , ω 2 ) in the complex plane (s 1 , s 2 ) and then find the appropriate mapping to (z 1 , z 2 ) using the bilinear transform or the Euler approxima- tion.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 ∂ X / ∂ x by X n − X n − 1 , replacing s by s = 1 − z −1 .On the two directions of the plane we have: 2 and s 1 s 2 correspond to second-order partial derivatives: For the mixed operator s 1 s 2 , 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 A f results as a convolution of two 3 × 3 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 B f and A f : where b 2 , b 1 , b 0 , a 1 , a 0 are the coefficients of prototype (15).Finally the 2D filter transfer function in z 1 and z 2 has the following expression, with z 1 and z 2 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: orderN = 2, stop-band attenuation R s = 40db and passband-edge frequency ω p = 0.5 (1.0 is half the sampling frequen- cy).The transfer function in z is: ( ) 0.012277 0.012525 0.012277 1.850147 0.862316 For a good directional selectivity we also choose p = 30 and k = 10.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 (ω 1 , ω 2 ) is given in Fig. 12 (d).Calculating the singular values of filter templates for the above parameters we find the vectors S A , S B for the templates A, B: 2.09347 0.00225 0.0005 0 0 2.14297 0.01939 0.00387 0 0 Taking into account the fact that the first singular value of the 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 M = U × S × V 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 U A 1 and V Α 1 are the first columns of the matrices U A , V A , then A can be approximated by , where s A1 is the largest singular value of A, U A 1 and V Α 1 are the corresponding columns of U A and V A , ⊗ stands for outer product, T for transposition.
Similarly for B we find B 1 =s B1 ⋅ U B1 ⊗ V B1 T .For the specified filter parameters we obtain s B1 =2.14297 and for template B the column vectors U B1 and V B1 result identical: U B1 = V B1 = -0.004240.3971 -0.82743 0.3971 -0.00424 T .
For the template A we get s A1 =2.09347 and the vectors U A 1 ,V Α 1 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 5 × 1 vectors U A1 , V A1 , U B1 , V B1 have negligible values, by discarding them we obtain the 3 × 1 vectors: U B2 = V B2 = 0.3971 -0.8274 0.3971 T U A2 = -0.3150.6334 -0.315 T + j ⋅ 0.2573 -0.5175 0.2573 T V A2 = 0.4067 -0.818 0.4067 T − j ⋅ 0.0024 -0.0048 0.0024 T We finally obtain a very selective two-directional 2D filter implemented with two minimum size (3 × 3) 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 cos 2 (φ + φ 0 ) corresponds to a frequency transformation in the complex variables z 1 and z 2 , written in matrix form as: and A φ0 is identical to A 1 from (63).The 5 × 5 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 ρ(ω 1 , ω 2 ) = 1 and the mapping (48) reduces to ω 2 → ω 1 2 + ω 1 2 , 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, multidirectional filters etc. (Matei, 2011 a).

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 H P (ω), the corresponding 2D circular filter function H C (ω 1 , ω 2 ) results using the frequency mapping ω → ω 1 2 + ω 2 2 : ( ) ( , ) The currently-used approximation of the circular function cos ω 1 2 + ω 2 2 is given by: ( ) Its transfer function in variable s is: In order to obtain a filter with circular symmetry from the factorized 1D prototype function, we replace in (12) cosω with the circular cosine function (74).For instance, corresponding to (12), the filter template A results in general as the discrete convolution: where A 1i (i = 1 … n) are 3 × 3 templates and A 2 j ( j = 1 … m) are 5 × 5 templates, given by: Digital Filters and Signal Processing Here B M is the approximation of matrix B taking into account the first M singular values (in our case M ≤ 14), while U Bk , V Bk are the k-th columns of the matrices U B1 and V B1 ; ⊗ 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 B M from (79), for M = 5.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.

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 (ω 1 , ω 2 ) at an angle of π / 2 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  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 preprocessing 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

Conclusion
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.
(a) a general fan-type filter is shown, with an aperture angle ≺ BOD = θ, oriented along an axis CC ' and its longitudinal axis forming an angle ≺ AOC = φ with frequency axis Oω 2 .A particular case is the two-quadrant fan filter, shown in Fig.5 (b).Fig.5 (c) shows a DFB with 8band frequency partition(Bamberger, 1992), an angularly-oriented image decomposition which splits the frequency plane into fan-shaped sub-bands (channels).

Figure 5 .
Figure 5. (a) Ideal fan filter with given aperture, oriented at an angle φ; (b) Ideal two-quadrant fan filter (c) 8-band partitions of the frequency plane

Figure 7 .
Figure 7. (a) Frequency response magnitude and (b) contour plot for the 2-quadrant fan filter

Figure 8 .
Figure 8. Ideal shapes of some directional filters in the frequency plane: (a) two-directional filter; (b) three-directional filter; (c) three-band selective filter with ω 01 = 0.59π, ω 02 = − 0.36π 3C and A 3C of the corrected filter result by convolution: B 3C = B 3 * B C and A 3C = A 3 * A C .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.

8
(c).For a three directional filter, the middle peak frequency can always be taken ω 0 = 0, and the other two on each side at specified values.The prototype transfer function H P (s) in variable s will be in this case the sum of three elementary functions:

2 2 and the 3 × 3 templates
B b ,A b are given by: three elementary terms in(38) corresponds to a pair of 3 × 3 templates B b and A b

Figure 13 .
Figure 13.Frequency response magnitude (a) and contour plot (b) of a circular FIR filter Let us denote the vector above as S B1 = s k , with k = 1...14 in our case.The exact filter matrix B can be written as: B = U B1 ×S B1 ×V B1 , where U B1 and V B1 are made up of the first 14 columns of the unitary matrices U B and V B .If we consider the first largest M values of the vector S B1 = s k , the matrix B can be approximated as:

Figure 14 .
Figure 14.Frequency response magnitudes and contour plots for the circular filter resulted by taking into account the first largest: (a), (b) 8 singular values; (c), (d) 5 singular values

Figure 15 .Figure 16 .
Figure 15.(a) Test image; (b) filtered image (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.