Description

Applying FIR and IIR Digital Filters over Video Image Processing S. Aparna Ph.D. Scholar, JNTU, Hyderabad, India. M. Ekambaram Naidu Principal, Arjun college of Engineering and Technology, Hyderabad, India.

All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.

Related Documents

Share

Transcript

Applying FIR and IIR Digital Filters over Video Image Processing S. Aparna Ph.D. Scholar, JNTU, Hyderabad, India. M. Ekambaram Naidu Principal, Arjun college of Engineering and Technology, Hyderabad, India. Abstract Digital Video is a stream of still images called frames, which are moved such that it gives an illusion of dynamics of the objects present in the image. Video image processing is basically processing of frames and updating frames with a minimum frame rate of 16 per second to give an illusion of motion picture. The objective of the research is all about the development of high throughput image processing algorithms which ensure speed and precision. Use of such algorithms would ensure real time processing of digital video. In this paper, processing video images using FIR and IIR digital filters are discussed and using FIR digital filter has more advantages than IIR filter. Keywords: Video Image Processing, Two Dimensional Digital Filters VIDEO IMAGE PROCESSING A Snap Shot Description Video can be binary, gray scaled or coloured. The frame rate, is the number of still pictures per unit of time of video, ranges from six or eight frames per second (frame/s) for old mechanical cameras to 120 or more frames per second for new professional cameras. PAL (Europe, Asia, Australia, etc.) and SECAM (France, Russia, parts of Africa etc.) standards specify 25 frame/s, while NTSC (USA, Canada, Japan, etc.) specifies frame/s. Film is shot at the slower frame rate of 23frame/s, which complicates slightly the process of transferring a cinematic motion picture to video. The minimum frame rate to achieve the illusion of a moving image is about fifteen frames per second. Video frame processing is done by treating each frame as an image and processing them sequentially. In order to perform image processing operations on a video, we have to first grab a frame, process it and then dispatch. The frames can be grabbed by using a computer either by software or hardware means. Programming to grab frames requires special libraries like DirectShow to be included in the program. There are dedicated hardware frame grabbers which have the ability to grab many frames in sequential or parallel manner. Generally hardware frame grabbers are faster. Traditionally, the frames are processed using either spatial domain or spectral domain image processing algorithms. They are pretty much slower due to the fact that the computational complexity associated with them is quite high. On the other hand, the logical techniques to be researched and used in the processing of frames would guarantee speed and precision. TWO DIMENSIONAL SIGNAL ANALYSIS As a digital image is a group of pixels in grid having irradiance which is a function of rows and columns, we can treat the digital image as 2-D signal whose irradiance or luminance values is a function of pixel position on a plane. In order to process an image, it is Necessary to understand 2-D signals and the way they are processed. A scalar 2-D signal s(n 1, n 2) is mathematically a complex bi-sequence, or a mapping of the 2-D integers into the complex plane. Our convention is that the signal, s, is defined for all finite values of its integer arguments n 1, n 2 using zero padding as necessary. Occasionally we will deal with finite-extent signals, but will clearly say so. We will adopt the simplified term sequence over the more correct bisequence. Two-dimensional discrete space systems A 2-D system is defined as a general mathematical operator T that maps each input signal x(n 1,n 2) into a unique output signal y(n 1, n 2). The signals are assumed to be defined over the entire 2-D discrete space Z 2 = (-, + )x(-, + ), unless otherwise indicated. There is only one restriction on the general system operator T; it must provide a unique mapping, i.e., for each input sequence x, there is one and only one output sequence y. Of course, two input sequences may agree only over some area of the plane, but differ elsewhere; then there can be different outputs corresponding to these two inputs, since these two inputs are not everywhere. In mathematics, an operator such as T is just the generalization of the concept of function, where the input and output space are now sequences instead of numbers. The operator T may have an inverse or not. We say that T is invertible if to each output sequence y there corresponds only one input sequence x, i.e., that the output determines the input. We denote the inverse operator, if it exists, by T -1. Two-dimensional convolution Shift-invariant linear systems can be represented by convolution. Shift invariance of a 2-D system is given by: T[x(n-m)]=y(n-m) for shift vector m If a system is linear shift-invariant (LSI), then we can write, using the shift representation y(n 1,n 2)=L[ x(k 1,k 2) (n 1-k 1,n 2-k 2)] k1, k2 where L is a linear operator. 7624 y(n 1,n 2)= k1, k2 and x(k 1,k 2)L[( (n 1-k 1,n 2-k 2)] 2 y(n 1,n 2)= x(k 1,k 2)h(n 1-k 1,n 2-k 2) k1, k2 where the sequence h is called the impulse response, defined as h(n 1,n 2)=L[ ((n 1,n 2))] It then follows for a 2-D LSI (Linear Shift Invariant) system, we have y(n 1,n 2) =(x*h)(n 1,n 2) The Fourier Transform It is a remarkable fact that any stable sequence x(n 1,n 2) can be obtained by approximately combining complex exponentials of the form X(ω 1,ω 2) e j xx(ω 1,ω 2). The function X(ω 1,ω 2), which represents the amplitude associated with the complex exponential can be obtained from x(n 1,n 2). The relationships between x(n 1,n 2) and X(ω 1,ω 2) are given by Discrete-space Fourier Transform pair: (2) The equation (1) shows how the amplitude X(ω 1,ω 2) associated with exponential can be determined from x(n 1,n 2). The function X(ω1,ω2) is called the discretespace Fourier transform, or Fourier transform for short, of x(n 1,n 2). The equation (2) shows how complex exponentials are specifically combined to form x(n 1,n 2). The sequence x(n 1,n 2) is called inverse discrete space Fourier transform or inverse Fourier transform of X(ω 1,ω 2). The consistency of equations (1) and (2) can be easily shown by combining them. From equation (1), it can be seen that X(ω 1,ω 2) is in general complex, even though x(n 1,n 2) may be real. It is often convenient to express X(ω 1,ω 2) in terms of its magnitude and phase θ x(ω 1,ω 2) or in terms of its real part X R(ω 1,ω 2) and imaginary part X I(ω 1,ω 2) as -- (3) From this equation, it can be seen that X(ω 1,ω 2) is a function of continuous variable ω 1 and ω 2, although x(n 1,n 2) is a function of discrete variable n 1 and n 2.. In addition, X(ω 1,ω 2) is always periodic with a period of 2π 2π; that is, X(ω 1,ω 2) = X(ω π,ω 2) = X(ω 1,ω π) for all ω 1 and ω 2. We can also show that the Fourier transform converges uniformly for stable sequences. The Fourier transforms form of x(n 1,n 2) is said to converge uniformly when X(ω 1,ω 2) is finite and (1) Figure 1: First quadrant support sequence obtained by linear mapping of variable A sequence x(n 1,n 2) is said to be an eigen-function of a system T if T[x(n 1,n 2)] = kx(n 1,n 2) for some scalar k. Suppose we use a complex exponential as an input x(n1,n2) to an LSI (Linear Shift Invariant) system with impulse response h(n 1,n 2). The output of the system y(n 1,n 2) can be obtained as From the above equation, is an eigen-function of any LSI system for which H(ω 1,ω 2) is well defined and H(ω 1,ω 2) is the Fourier transform of h(n 1,n 2). The function H(ω 1,ω 2) is called the frequency response of the LSI system. The fact that is an eigen-function of an LSI system and that H(ω 1,ω 2) is the scaling factor by which is multiplied when it is an input to LSI system simplifies system analysis for a sinusoidal input. For example, the output of an LSI system with frequency response H(ω 1,ω 2) when the input is can be obtained as follows: --- (4) for all ω 1 and ω 2. When the Fourier transform of x(n 1,n 2) is said to converge uniformly, X(ω 1,ω 2) is an analytic function and is infinitely differentiable with respect to ω 1 and ω The Discrete Fourier Transform The discrete Fourier transform (DFT) is a frequency domain representation of finite extent sequences. The Discrete Fourier Transform pair is given by equations 5 and 6. From equations 5 and 6, an N1xN2 point sequence x(n 1,n 2) is represented in the frequency domain by an N 1 X N 2 point sequence X(k 1,k 2). The sequence X(k 1,k 2) is called the DFT of x(n 1,n 2) and x(n 1,n 2) is called the inverse DFT (IDFT) of X(k 1,k 2). Figure 3: A Two Dimensional DC (Direct Current) signal DFT magnitude of the DC signal (5) (6) The DFT pair above is defined only for a finite-extent first quadrant support sequence. This is not serious restriction in practice, since a finite-extent sequence can always be shifted to have first quadrant support, and this shift can easily be taken into account in many application problems. For a finite extent first quadrant support sequence x(n 1,n 2) that is zero outside and, the DFT, X(k 1,k 2) is very simply related to the discrete space Fourier transform X(ω 1,ω 2). From equation (5), it is clear that. This equation states that the DFT coefficients of x(n 1,n 2) are samples of X(ω 1,ω 2) at equally spaced points on the Cartesian grid, beginning at ω 1 = ω 2 = 0. Since X(k 1,k 2) completely specifies x(n 1,n 2), which in turn completely specifies X(ω 1,ω 2). X(ω 1,ω 2) has considerable redundant information, that is, N 1 x N 2 samples of X(ω 1,ω 2) completely specify X(ω 1,ω 2). Figure 4: A two-dimensional exponential function DFT magnitude plot of the exponential function in frequency domain Fast Fourier Transform of 2-D sequences In order to efficiently and quickly compute the DFT, we make use of the FFT. It is very useful when it comes to time taken by digital signal processor to process DFT effectively. Now we will be discussing an efficient way to compute the 2-D DFT. We will refer to this method as the Fast Fourier Transform (FFT) by row-column decomposition. This method is simple, uses 1-D FFT algorithms, and offers considerable computational savings over direct computation. It is also the most popular 2-D FFT algorithm. To appreciate the computational efficiency of the row-column decomposition method, we will first consider computing DFT directly. Consider a complex N 1 x N 2 point sequence x(n 1,n 2) that is zero outside. Since we are using complex data, we use the terms multiplication and addition in this section to refer to complex multiplications and complex additions, unless specified otherwise. DFT of x(n 1,n 2), X(k 1,k 2) is related by Figure 2: A square image DFT magnitude plot in frequency domain From the above equation, directly computing X(k 1,k 2) for each (k 1,k 2) requires N 1N 2 1 additions and N 1N 2 multiplications. Since there are N 1N 2 different values of (k 1,k 2), the total number of arithmetic operations required in computing X(k 1,k 2) from x(k 1,k 2) is N 12 N 2 2 multiplication and N 1N 2(N 1N 2-1) addition. To develop the row-column decomposition method, we write the previous equation as follows: 7626 We first compute f(k 1,n 2) from x(n 1,n 2) and then X(k 1,k 2) from f(k 1,n 2). Consider a fixed n 2, say n 2=0. Then represents a row of x(n 1,n 2), and the 1-D N 1- point DFT of with respect to the variable n 1. Therefore, f(k 1,0) can be computed from x(n 1,n 2) by computing one 1-D N 1-point DFT. Since there are N 2 different values of n 2 in f(k 1,n 2) that are of interest to us, f(k 1,n 2) can be computed from x(n 1,n 2) by computing N 2 1-D N 1-point DFTs. Figure 5: Computation of f(k 1,n 2) from x(n 1,n 2) by computing N 2N 1-point 1-D DFTs Figure 6: Computation of X(k 1,k 2) from f(k 1,n 2) by computing N 2N 1-point 1-D DFTs To further reduce the number of arithmetic operations, we can of course use any of a variety of 1-D FFT algorithms to compute 1-D DFTs. When N = 2 M, a 1-D N-point FFT algorithm based on the Cooley-Tukey approach requires multiplications and additions. To compute N 2 1-D N 1-point DFTs and N 1 1-D N 2-point DFTs using 1-D FFT algorithms when and we need a total of multiplications and additions. This is a very significant computational saving over the direct computation of the 1-D DFTs. If we represent the total number of points N 1N 2 as N, then the number of computations then the number of computations involved can be expressed as multiplications and additions. These are exactly the same expressions as those from a 1-D N-point DFT computations using an FFT algorithm such as a decimationin-time algorithm. To illustrate the computational savings involved, table shows the relative number of computations for the three methods considered. With reference to table 1, when N 1 = N 2 =512, row-column decomposition alone reduces the number of multiplications and additions by a factor of 250 as compared to direct DFT computation. A reduction by an additional factor of approximately 110 for multiplications and 55 for additions is obtained by using 1-D FFT algorithms. The total reduction in the number of computations by row-column decomposition and 1-D FFT algorithms is a factor of approximately 28,000 for multiplications and 13,000 for additions for N 1 = N 2 = 512 as compared to the direct DFT computation. Table 1: Computation of number of arithmetic operations for different DFT computations Once f(k 1,n 2) is computed, we can then compute X(k 1,k 2) from f(k 1,n 2) by To compute X(k 1,k 2) from f(k 1,n 2), consider a fixed k 1, say k 1=0. Then represents one column of f(k 1,n 2), and is nothing but the 1-D N 2-point DFT of with respect to the variable n 2. Therefore X(0,k 2) can be computed from f(k 1,n 2) by computing one 1-D N 2-point DFT. Since there are N 1 different values of k 1 in X(k 1,k 2) that are of interest to us, X(k 1,k 2) can be computed from f(k 1,n 2) by computing N 1 1-D N 2-point DFTs. From the above discussion, X(k 1,k 2) can be computed from x(n 1,n 2) with a total of N2 1-D N1-point DFTs for the row operations and N1 1-D N2 points DFTs for the column operations. Suppose we compute the 1-D DFTs directly. Since direct computations of one 1-D N-point DFT requires N 2 multiplications and about N 2 additions, the total number of arithmetic operations involved in computing X(k 1,k 2) is N 1N 2(N 1 + N 2) multiplications and N 1N 2(N 1 + N 2) additions. This is a significant computational saving over N N 2 multiplications and N N 2 additions required for the direct computations of X(k 1,k 2). In the derivation of the row-column decomposition approach, we got X(k 1,k 2) from f(k 1,n 2). This led to a procedure in which row operations were performed before the column operations. An alternative way can be If the above equation is used in computing X(k 1,k 2), then the column operation are performed before the row operations. The number of computations involved in this case remains the same as in the previous case, where the row operations were performed first. In the row-column decomposition approach, we compute a 2-D DFT by computing many 1-D DFTs. Other approaches to compute a 2-D DFT by computing many 1-D DFTs have also been developed. In one approach, a 2-D DFT 7627 is transformed to many 1-D DFTs using a transform called Polynomial transform. For an N X N point DFT, this approach requires computation of N+1 1-D DFTs. This is approximately half of what is required in the row-column decomposition approach. Since the polynomial transform does not require any multiplications, the number of multiplications required in this approach is approximately half of that required in the row-column decomposition approach. The number of additions required remains approximately the same, however, due to the polynomial transform. The advantage of this approach compared to the row-column decomposition approach becomes more significant as we increase the number of dimensions. For an m-dimensional DFT of size N m points, the approach requires (N m -1)/(N-1) 1- D DFTs. The row-column decomposition approach requires mn m-1 1-D DFTs. The number of multiplications is reduced in this approach by a factor of approximately m, while the number of additions remains about the same. Other approaches that require computation of (N m -1)/(N-1) 1-D DFTs to compute an N m -point m-dimensional DFT have also been developed. In all these methods developed so far, the number of multiplications is reduced, but the number of additions remains approximately the same or significantly increases in comparison with the row-column decomposition method. TWO-DIMENSIONAL DIGITAL FILTERS Three steps are generally followed in using digital filters. In the first step, we specify the characteristics required of the filter. Filter specifications depends, of course, on the intended applications. For example, if we wish to restore a signal that has been degraded by background noise, the filter characteristics required depends on the spectral characteristics of the signal and the background noise. The second step is filter design. In this step, we determine h(n 1,n 2) the impulse response of the filter or its system function H(z 1,z 2) (Ztransforms) that will meet the design specification. The third step is filter implementation, in which we realize a discrete system with the given h(n 1,n 2) or H(z 1,z 2). Digital filters can be classified into two groups. In the first group, h(n 1,n 2) is a finite-extent sequence, so the filters in this group are called finite impulse response (FIR). In the second group, h(n 1,n 2) is of infinite extent, so the filters in this group are called infinite response filter (IIR) filters. Comparison of FIR and IIR filters FIR filters have many advantages over IIR filters. Stability is not an issue in FIR filter design or implementation. For IIR filters, however, testing filter stability and stabilizing an unstable filter without significantly affecting the magnitude response are very big tasks. Zero phase is simple to achieve for FIR filters. Designing zero-phase IIR filters is possible, but is more involved than designing zero phase FIR filters. In addition, design methods are simpler for FIR than for IIR filters. The main advantage of an IIR filter over an FIR filter is smaller number of arithmetic operations required for implementation in direct form. To meet the same magnitude specification, an FIR filter required significantly more arithmetic operations per output sample than an IIR filter. If an FIR filter is implemented by exploiting the computational efficiency of FFT algorithms, however, the IIR filter s advantage is likely to disappear. IIR filters are useful, therefore, mainly in those applications where low cost implementation is very important. Because of their overwhelming general advantage over IIR filters, FIR filters are much more common in practice. However, design and implementation of 2-D FIR and IIR filters are active areas of research. The impact that this research will have on the practical application of 2-D FIR and IIR filters remains to be seen. Significant differences between the 1-D and 2-D cases also exist in the design and implementation of digital filters. In 1-D, there are practical methods to design optimal FIR and IIR filters. In 2-D, practical methods that can be reliably used to design optimal FIR or IIR filters have not yet been developed. In 1-D, checking the stability of an IIR filter and stabilizing an unstable filter without affecting the magnitude response are quite simple. In contrast, checking the stability and stabilizing an unstable filter without significantly affecting the magnitude response is a big task in 2-D. In 1-D, the cascade and parallel forms are general implementation methods for rational system functions. In 2-D, the cascade and parallel forms cannot generally be used for the realization of rational system functions. Design and implementation are more complex for 2-D than for 1-D digital filters. Image proce

Search

Similar documents

Related Search

Digital Filters and Optimization TechniquesTwo Dimensional Digital FiltersDigital Signal and Image ProcessingNew Media and the Digital Public SphereArts and Culture: Digital ArtsInteractive and Midia DigitalDigital FiltersDigital Signal and Image Processing,fpgaDigital Image Processing and Image ClassificaMicrowave and Photonic Metamaterials, Filters

We Need Your Support

Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks

SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...Sign Now!

We are very appreciated for your Prompt Action!

x