{"id":3973,"date":"2015-01-07T05:00:44","date_gmt":"2015-01-07T05:00:44","guid":{"rendered":"http:\/\/clydelettsome.com\/blog\/?p=3973"},"modified":"2019-02-27T20:51:54","modified_gmt":"2019-02-27T20:51:54","slug":"introduction-to-wavelets-and-filter-banks","status":"publish","type":"post","link":"https:\/\/clydelettsome.com\/blog\/2015\/01\/07\/introduction-to-wavelets-and-filter-banks\/","title":{"rendered":"Introduction to Wavelets  and  Filter Banks"},"content":{"rendered":"<p>Although the history of filter banks and wavelets has been brief, they have had a large impact on signal and image processing. Filter banks, which came first, are used for a number of different audio (1D), images (2D), and video (2D frames changed 30 times every second for interlaced video) applications.<\/p>\n<p>Filtering is a <strong>linear time-invariant<\/strong> process. For a process to be linear, the change to the input vs. the change to the output must be linear or the same (example: if y(n) = x(n) then 2y(n) = 2x(n) or 3y(n) = 3x(n)). For a process to be time-invariant, any change related to the time of the input results in an equivalent change in the time of the output (example if y(t) = x(t) then y(t-2) = x(t-2)).<\/p>\n<p>Filtering is a process performed on an input vector or signal <strong>x <\/strong>([\u2026, x(-1), x(0), x(1),\u2026]). It results in an output vector <strong>y <\/strong>([\u2026, y(-1), y(0), y(1),\u2026]), which is the convolution of <strong>x<\/strong> with filter vector <strong>h <\/strong>([h(0), h(1),\u2026]) in the discrete time-domain. Mathematically, this may be expressed by the equation<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-3977 aligncenter\" src=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq11.png\" alt=\"wave-eq1\" width=\"809\" height=\"83\" srcset=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq11.png 809w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq11-500x51.png 500w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq11-300x31.png 300w\" sizes=\"auto, (max-width: 809px) 100vw, 809px\" \/><\/p>\n<p>or<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-3976 aligncenter\" src=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq21.png\" alt=\"wave-eq2\" width=\"813\" height=\"60\" srcset=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq21.png 813w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq21-500x37.png 500w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq21-300x22.png 300w\" sizes=\"auto, (max-width: 813px) 100vw, 813px\" \/><\/p>\n<p>where n is discrete time and the \u201c*\u201d is the called the convolution operator. Discrete time n = t\/T, where t is continuous time and T is the sampling period. Equation 1 and 2 can be represented as a block diagram as shown in Figure 1 where the h(n), also known as the <strong>impulse response<\/strong>, is used as an indicator that the figure represents filtering in the discrete time-domain.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-3978 aligncenter\" src=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig1.png\" alt=\"wave-fig1\" width=\"809\" height=\"124\" srcset=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig1.png 809w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig1-500x77.png 500w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig1-300x46.png 300w\" sizes=\"auto, (max-width: 809px) 100vw, 809px\" \/><\/p>\n<p>In order to look at the filtering process in the frequency-domain, we must perform the Fourier transformation of the vectors, first. Mathematically, that is done by doing the following:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-3979 aligncenter\" src=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq345.png\" alt=\"wave-eq345\" width=\"810\" height=\"297\" srcset=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq345.png 810w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq345-500x183.png 500w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq345-300x110.png 300w\" sizes=\"auto, (max-width: 810px) 100vw, 810px\" \/><\/p>\n<p>This yields the equation<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-3980 aligncenter\" src=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq6.png\" alt=\"wave-eq6\" width=\"810\" height=\"55\" srcset=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq6.png 810w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq6-500x34.png 500w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq6-300x20.png 300w\" sizes=\"auto, (max-width: 810px) 100vw, 810px\" \/><\/p>\n<p>That is the multiplication of the H, the <strong>frequency response<\/strong>, and X is equal to the Y. In reduced notation, Y (\u03c9) = H(\u03c9) X(\u03c9) and may be illustrated in block diagram form as shown in Figure 2.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-3981 aligncenter\" src=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig2.png\" alt=\"wave-fig2\" width=\"811\" height=\"108\" srcset=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig2.png 811w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig2-500x67.png 500w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig2-300x40.png 300w\" sizes=\"auto, (max-width: 811px) 100vw, 811px\" \/><\/p>\n<p>When the frequency response is expressed as the output vs. the input in the z domain where z = e<sup>j<\/sup><sup>\u03c9<\/sup> (or H(\u03c9) = Y(\u03c9) \/ X(\u03c9)), it is referred to as the <strong>transfer function<\/strong>.<\/p>\n<p>Two common filters used for processing signal vectors are lowpass filters (or summing filters labeled h<sub>0<\/sub>) and highpass filters (or difference filters labeled h<sub>1<\/sub>). Lowpass filters allow low frequency signals to pass through while attenuating high frequency signals. The highpass filter does the exact opposite. The simplest lowpass and highpass discrete filters are the Haar filters, developed by Alfred Haar. The lowpass filter is a two sample (or tap) filter vector h<sub>0<\/sub> = [1, 1] while one form of the highpass filter is h<sub>1<\/sub> = [1, -1].<\/p>\n<p>Using the vector in Figure 3 as the input signal to both a lowpass and highpass Haar filter, the results in Figure 4a and 4b are obtained.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-3985 aligncenter\" src=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig34.png\" alt=\"wave-fig34\" width=\"811\" height=\"519\" srcset=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig34.png 811w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig34-500x320.png 500w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig34-300x192.png 300w\" sizes=\"auto, (max-width: 811px) 100vw, 811px\" \/><\/p>\n<p>It is important to note that there is only one area that contains high frequency data in Figure 3, and it occurs between time samples 15 and 16. It is the quick transition from 0 to 1. Low frequency data has no change from one sample to the succeeding sample. This means all other areas in Figure 3 contain low frequencies. Given the characteristics of Haar filters and the input vector, it is possible to explain the results seen in Figure 4. There is some attenuation in Figure 4a only at time sample 16 because the low pass filter eliminated some of the high frequency data. As show in Figure 4b, the high frequency filter encountered only one occurrence of high frequency data at time sample 16.<\/p>\n<p><strong>Filter banks<\/strong> are a set of filters used in conjunction to perform a single signal processing task. They are typically chosen to separate the frequency spectrum into small subbands for a number of applications such as analysis, compression, data hiding, and image enhancing. By that definition, using Haar filters to separate the spectrum of frequencies in Figure 3 into two subbands, a lowpass subband and a highpass subband, makes them collectively a filter bank.<\/p>\n<p><strong>Wavelets<\/strong> are really filter banks in the continuous domain. This means Equation 1 becomes Equation 7 in a continuous domain.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-3986 aligncenter\" src=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq7.png\" alt=\"wave-eq7\" width=\"811\" height=\"78\" srcset=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq7.png 811w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq7-500x48.png 500w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq7-300x29.png 300w\" sizes=\"auto, (max-width: 811px) 100vw, 811px\" \/><\/p>\n<p>or<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-3987 aligncenter\" src=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq8.png\" alt=\"wave-eq8\" width=\"810\" height=\"70\" srcset=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq8.png 810w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq8-500x43.png 500w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-eq8-300x26.png 300w\" sizes=\"auto, (max-width: 810px) 100vw, 810px\" \/><\/p>\n<p>To those working in the continuous domain, a process with characteristics similar to a lowpass filter is called a scaling function and is labeled as \u03d5(t), while a process with characteristics similar to a highpass filter is called a wavelet function and is labeled as \u03c9(t). These functions were called wavelets because they resembled waves. Figure 5 shows an example of what those working in this area saw that made them call the function a wavelet.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-3989 aligncenter\" src=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig5.png\" alt=\"wave-fig5\" width=\"810\" height=\"282\" srcset=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig5.png 810w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig5-500x174.png 500w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2015\/01\/wave-fig5-300x104.png 300w\" sizes=\"auto, (max-width: 810px) 100vw, 810px\" \/><\/p>\n<p>Because I will there has been such a large shift towards digital technology the remainder of this paper will only address this topic in the discrete time-domain rather than in the continuous or analog domain.<\/p>\n<p><a title=\"Read more free\" href=\"https:\/\/clydelettsome.com\/blog\/product\/ceus-for-pes-introduction-to-wavelets-and-filter-banks\/\">Read More for Free&gt;&gt;<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Although the history of filter banks and wavelets has been brief, they have had a large impact on signal and image processing. Filter banks, which came first, are used for a number of different audio (1D), images (2D), and video (2D frames changed 30 times every second for interlaced video) applications. Filtering is a linear &hellip; <\/p>\n<div class=\"more-link-wrapper\"><a href=\"https:\/\/clydelettsome.com\/blog\/2015\/01\/07\/introduction-to-wavelets-and-filter-banks\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Introduction to Wavelets  and  Filter Banks&#8221;<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[449,433],"tags":[441,435,440,439,438,437,436],"class_list":{"0":"post-3973","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-documents","7":"category-tutorials","8":"tag-continuous-domain","9":"tag-filter-banks","10":"tag-frequency","11":"tag-haar","12":"tag-highpass","13":"tag-lowpass","14":"tag-wavelets","15":"h-entry","16":"hentry"},"_links":{"self":[{"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/posts\/3973","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/comments?post=3973"}],"version-history":[{"count":6,"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/posts\/3973\/revisions"}],"predecessor-version":[{"id":4669,"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/posts\/3973\/revisions\/4669"}],"wp:attachment":[{"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/media?parent=3973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/categories?post=3973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/tags?post=3973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}