Digital Image Processing

Slides:



Advertisements
Similar presentations
Image Enhancement in the Frequency Domain (2)
Advertisements

Spatial Filtering (Chapter 3)
Frequency Domain Filtering (Chapter 4)
1 Image Processing Ch4: Filtering in frequency domain Prepared by: Tahani Khatib AOU.
Digital Image Processing
Image Enhancement in the Frequency Domain Part III
Chap 4 Image Enhancement in the Frequency Domain.
Digital Image Processing
Chapter 4 Image Enhancement in the Frequency Domain.
CHAPTER 4 Image Enhancement in Frequency Domain
Chap 4-2. Frequency domain processing Jen-Chang Liu, 2006.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
Image Enhancement in the Frequency Domain Spring 2005, Jen-Chang Liu.
Image Enhancement in the Frequency Domain Part I Image Enhancement in the Frequency Domain Part I Dr. Samir H. Abdul-Jauwad Electrical Engineering Department.
Some Properties of the 2-D Fourier Transform Translation Distributivity and Scaling Rotation Periodicity and Conjugate Symmetry Separability Convolution.
Image Enhancement.
Image Enhancement in the Frequency Domain Part II Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Chapter 4 Image Enhancement in the Frequency Domain.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
Filters in the Frequency Domain.  Image Smoothing Using Frequency Domain Filters: ◦ Ideal Lowpass Filters ◦ Butterworth Lowpass Filters ◦ Gaussian Lowpass.
Presentation Image Filters
Digital Image Processing Chapter # 4 Image Enhancement in Frequency Domain Digital Image Processing Chapter # 4 Image Enhancement in Frequency Domain.
Image Processing © 2002 R. C. Gonzalez & R. E. Woods Lecture 4 Image Enhancement in the Frequency Domain Lecture 4 Image Enhancement.
Chapter 7: The Fourier Transform 7.1 Introduction
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Digital Image Processing Chapter 4 Image Enhancement in the Frequency Domain Part I.
Digital Image Processing CSC331 Image Enhancement 1.
ENG4BF3 Medical Image Processing Image Enhancement in Frequency Domain.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain 22 June 2005 Digital Image Processing Chapter 4: Image Enhancement in the.
7- 1 Chapter 7: Fourier Analysis Fourier analysis = Series + Transform ◎ Fourier Series -- A periodic (T) function f(x) can be written as the sum of sines.
University of Ioannina - Department of Computer Science Filtering in the Frequency Domain (Application) Digital Image Processing Christophoros Nikou
1 CMPB 345: IMAGE PROCESSING DISCRETE TRANSFORM 2.
Fourier Transform.
Computer Graphics & Image Processing Chapter # 4 Image Enhancement in Frequency Domain 2/26/20161.
Digital Image Processing Lecture 9: Filtering in Frequency Domain Prof. Charlene Tsai.
Frequency Domain Filtering. Frequency Domain Methods Spatial Domain Frequency Domain.
Fourier transform.
Amity School of Engineering & Technology 1 Amity School of Engineering & Technology DIGITAL IMAGE PROCESSING & PATTERN RECOGNITION Credit Units: 4 Mukesh.
Digital Image Processing Lecture 8: Image Enhancement in Frequency Domain II Naveed Ejaz.
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Image Enhancement in the Spatial Domain.
Fourier Transform (Chapter 4) CS474/674 – Prof. Bebis.
Digital Image Processing Lecture 8: Fourier Transform Prof. Charlene Tsai.
Digital Image Processing Chapter - 4
Digital Image Processing , 2008
Medical Image Analysis
Miguel Tavares Coimbra
IMAGE ENHANCEMENT IN THE FREQUENCY DOMAIN
IMAGE PROCESSING FREQUENCY DOMAIN PROCESSING
The content of lecture This lecture will cover: Fourier Transform
Fundamentals of Spatial Filtering:
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Spatial & Frequency Domain
Image Enhancement in the
Digital Image Processing
Fourier Transform.
Histogram Histogram is a graph that shows frequency of anything. Histograms usually have bars that represent frequency of occuring of data. Histogram has.
Digital Image Processing
Image Enhancement in the Frequency Domain Part I
ENG4BF3 Medical Image Processing
Frequency Domain Analysis
4. Image Enhancement in Frequency Domain
Digital Image Processing
Digital Image Processing
Tania Stathaki 811b LTI Discrete-Time Systems in Transform Domain Ideal Filters Zero Phase Transfer Functions Linear Phase Transfer.
Filtering in the Frequency Domain
Lecture 4 Image Enhancement in Frequency Domain
Image Enhancement in the Spatial Domain
Fundamentals of Spatial Filtering
Presentation transcript:

Digital Image Processing Chapter 4 Image Enhancement in the Frequency Domain

Preview Outline of the origins of the Fourier transform and its impact on countless branches of mathematics, science and engineering Application of the Fourier transform and the frequency domain for image processing Smoothing and sharpening filtering techniques in the frequency domain Implementation of the Fourier transform in context of image processing

Background Any function that periodically repeats itself can be expressed as a sum of sines and/or cosines of different frequencies, each multiplied by a different coefficient. The function that is not periodic (but whose area under the curve is finite) is represented as integral of sines and/or cosines multiplied by weighing function. Important Property A function that is represented in Fourier series or transform could be reconstructed through an inverse process with no loss of information

Background As shown in Fig. 4.1, function at the bottom is the sum of the four functions above it.

Introduction to the Fourier Transform and the frequency domain The One-dimensional Fourier Transform and its Inverse Fourier Transform F(u) of a single variable, continuous function, f(x) and its inverse transform, are given by Fourier Transform F(u) of a single variable, discrete function, f(x) and its inverse transform are given by x=0,1,2..M-1 u=0,1,2..M-1

Introduction to the Fourier Transform and the frequency domain The One-dimensional DFT and its Inverse Fourier Transform F(u) of a single variable, discrete function, f(x) and its inverse transform are given by u=0,1,2..M-1 x=0,1,2..M-1 The 1/M multiplier is placed in front of the Fourier transform and sometimes in front of the inverse transform. There are M^2 summations and multiplications in the Fourier Transform. The DFT and its inverse always exist

Introduction to the Fourier Transform and the frequency domain The One-dimensional Fourier Transform and its Inverse Concept of Frequency Domain emerges from Euler’s formula Substituting the Euler’s formula into DFT for u=0,1,2,…,M-1. The domain (values of u) over which the values of F(u) range is appropriately called the frequency domain, because u determines the frequency of the components of the transform.

Introduction to the Fourier Transform and the frequency domain The One-dimensional Fourier Transform and its Inverse Fourier transform can be expressed in polar coordinates as follows The magnitude or spectrum of the Fourier transform is Phase angle or phase spectrum of the Fourier transform is Power spectrum (spectral density) is defined as Height of the spectrum doubled as the area under the curve in x domain doubled Number of zeros in the spectrum in the same interval doubled as the length of the function doubled

Introduction to the Fourier Transform and the frequency domain Fourier spectra of two simple 1-D functions Discrete function with K= 8 and A=1 is shown The spectrum of this discrete function is centered at u=0 Amplitude of the spectrum is represented by AK/M Discrete function f(x) represents x=0,1..M-1 samples taken from the continuous counterpart of the sample Example Samples are taken at equal intervals and f(x) is represented by where is the first sample and is the interval between two samples Fourier Spectrum of the function is represented by for u=0,1,2..M-1. Sequence for the values of u is 0, u,2u ,…, (M-1)u. Relation between & is given by

Introduction to the Fourier Transform and the frequency domain The Two-dimensional Fourier Transform and its Inverse Fourier Transform F(u,v) of two variables, continuous function, f(x,y) and its inverse transform, are given by

Introduction to the Fourier Transform and the frequency domain The Two-dimensional Fourier Transform and its Inverse Fourier Transform F(u,v) of two variables, discrete function, f(x,y) and its inverse transform are given by u=0,1,2..M-1 v= 0,1,2..N-1 x=0,1,2..M-1 y= 0,1,2..N-1 Location of are used on the DFT or in IDFT or it may be splitted into multiplying the transform and its inverse Relationships between samples in the spatial and frequency domains

Introduction to the Fourier Transform and the frequency domain The Two-dimensional Fourier Transform and its Inverse The magnitude or spectrum of the Fourier transform is Phase angle or phase spectrum of the Fourier transform is Power spectrum (spectral density) is defined as

Introduction to the Fourier Transform and the frequency domain The Two-dimensional Fourier Transform and its Inverse It is common to multiply the input image function by (-1) x+y prior to computing Fourier transform where denotes the Fourier transform Details from this equation Origin of the Fourier transform of is at u=M/2 and v=N/2 Multiplying by shifts the origin of F(u,v) to frequency coordinates M/2 & N/2, which is the center of MxN area occupied by the 2-D image Guaranteeing of the shifted coordinates are achieved by choosing M an N as even numbers F(0,0) is the average gray level of value of the image f(x,y) and is given by If f(x,y) is real then its Fourier transform is conjugate symmetric i.e. F(u,v)=F*(-u,-v) & |F(u,v)| = |F*(-u,-v) |

Introduction to the Fourier Transform and the frequency domain A white rectangle of size 20x40 pixels superimposed on a black back ground of size 512x512 pixels Image was multiplied by to center the Fourier spectrum is shown in the bottom figure The separation of spectrum zeros in the u-direction is exactly twice the separation of zeros in the v-direction Example This separation corresponds to the 1-to-2 size ratio of the rectangle in the image Spectrum was processed prior to displaying by using Log transformation to increase gray level detail A value of c=0.5 is used to decrease overall intensity

Introduction to the Fourier Transform and the frequency domain Filtering in the Frequency domain Basic properties of frequency domain Each term of the Fourier transform of the image F(u,v) contain all elements of f(x,y),modified by the exponential terms There is no specific association between the specific components of image and its Fourier transform There is relationship between the frequency components of Fourier transform and its spatial characteristics Low frequencies correspond to slow varying components of an image, for example, smooth gray level variation in the wall. High frequencies correspond to faster varying components, i.e. edges of corner of wall or objects where there are abrupt changes in gray levels

Introduction to the Fourier Transform and the frequency domain Example of Filtering in the Frequency Domain Image shows integrated circuit magnified approximately 2500 times Image contains strong edges and the two white oxide protrusions due to thermal failure Fourier spectrum shows prominent components along that correspond to the edges There is slight shift in the vertical axis of the spectrum which is edge of oxide protrusion Off-axis angle of the frequency component correspond to the inclination off horizontal of long white element All the zeros in the vertical frequency component correspond to the vertical span of oxide protrusion

Introduction to the Fourier Transform and the frequency domain Basics of filtering Filtering consists of following steps Multiply the input image by to center the transform as indicated by Compute F(u,v) , the DFT of the image Multiply F(u,v) by a filter function H (u,v) ,filter transfer function Compute the inverse DFT of the result Obtain the real part of the result and multiply with Results Fourier transform of the output image is given by G(u,v)=H(u,v)F(u,v) H(u,v) suppresses certain frequency and leaves others unchanged

Introduction to the Fourier Transform and the frequency domain Basic filters and their properties Notch filter F(0,0) is set to zero and leaves unchanged all other frequency components Processed image could be obtained by taking inverse transform of F(u,v)H(u,v) Image is centered before filtering operation Is a constant function with a hole at the origin Example Overall drop in gray value result from forcing the average value to zero Original image

Introduction to the Fourier Transform and the frequency domain Basic filters and their properties Lowpass filter Low frequencies are responsible for general gray level appearance over smooth areas Image after low pass filtering will have less sharper details than the original image High frequencies are attenuated Highpass filter Attenuating low frequencies and passing high frequencies Highpass-filtered image having less gray level variation im smooth areas

Introduction to the Fourier Transform and the frequency domain Correspondence between filtering in frequency & spatial domains Convolution theorem If f(x,y),h(x,y) be the two functions in spatial domain then their discrete convolution is given by Convolution is a process of move a mask pixel by pixel in an image and complete a predefined quantity at each pixel F(u,v) and H(u,v) are Fourier transform of f(x,y),h(x,y). Their convolution in the spatial domain can be obtained by taking inverse FT of the product F(u,v)H(u,v) in frequency domain and vice versa

Introduction to the Fourier Transform and the frequency domain Correspondence between filtering in frequency & spatial domains Impulse function Multiplying a function with impulse( the convolution of a function with an impulse) will give the value of the function at the point of impulse. For the impulse function located at origin will give the value of the function at origin If the impulse is a unit impulse (A=1), located at the origin, then Fourier transform of unit impulse at origin is a real constant Convolution of impulse function with filter function is given by

Introduction to the Fourier Transform and the frequency domain Correspondence between filtering in frequency & spatial domains Results f(x,y) * h(x, y)  F(u,v) H(u,v) (x,y) * h(x, y)  [(x,y)] H(u,v) h(x, y)  H(u,v) Filters in the spatial and frequency domain constitute a Fourier transform pair Smaller filters are used in spatial domain

Introduction to the Fourier Transform and the frequency domain Correspondence between filtering in frequency & spatial domains Gaussian filter (Filtering using Gaussian functions) Gaussian function shapes are specific and their Fourier transform shapes are real Gaussian filter function H(u) in frequency domain and h(x) in spatial domain are given by Gaussian curves are intuitive and constitute a Fourier transform pair and are real Functions behave reciprocally with respect one and another If H(u) is a broad profile then h(x) is a narrow profile and vice versa

Introduction to the Fourier Transform and the frequency domain Correspondence between filtering in frequency & spatial domains Gaussian filter (Filtering using Gaussian functions) Narrower the LPF in frequency domain will attenuate more the low frequency components result in increased blurring in spatial domain which means wider filter masks A glaring similarity is that all values are positive in both the domains A mask with all positive coefficients can be implemented in spatial domain and is shown Shape of h(x) helps as a guide to specify the coefficient of smaller filter in the spatial domain

Introduction to the Fourier Transform and the frequency domain Correspondence between filtering in frequency & spatial domains Gaussian filter (Filtering using Gaussian functions) More complex filters can be constructed using basic Guassian function. For instance, a high pass filter can be constructed by the difference of Gaussians There is reciprocity in width Spatial filter has both negative and positive values and once turn negative, they never turn positive again

Introduction to the Fourier Transform and the frequency domain Correspondence between filtering in frequency & spatial domains Why do we use frequency domain ? Frequency domain may be viewed as laboratory in which we take the advantage of the correspondence between frequency content and image appearance Some enhancement tasks are trivial in frequency domain than in the spatial domain A specific filter via experimentation is selected in frequency domain What can be done in the spatial domain? Implementation of the selected filter is done in spatial domain A small mask is specified that attempt to capture the full essence of filter in frequency domain

Smoothing Frequency-Domain Filters High frequencies correspond to sharp transition in gray levels of image. Hence smoothing(blurring) is achieved in frequency domain by attenuating a specified range of high-frequency components. Basic model G(u,v)=H(u,v) F(u,v) F(u,v) is the Fourier transform of the image to be smoothed Objective To select H(u,v) that yields G(u,v) by attenuating high frequency components of F(u,v)

Smoothing Frequency-Domain Filters Ideal Low Pass Filter(ILPF) 2-D ILPF transfer function D0 is a specified nonnegative quantity D(u,v) is the distance from point (u,v) to the origin of frequency rectangle If image is of size MxN then its transform is also of size MxN and the center of this transform is at (u,v)=(M/2,N/2) Distance from any point (u,v) to the center(origin) of the Fourier transform is given by

Smoothing Frequency-Domain Filters Ideal Low Pass Filter(ILPF) All frequencies inside the circle of radius D are passed with no attenuation and all frequencies outside the circle are completely attenuated A cross section extending as function of distance from the origin along a radial line is shown For ILPF, the point of transition between H(u,v)=1 & H(u,v)=0 is called the cut off frequency(D0)

Smoothing Frequency-Domain Filters Ideal Low Pass Filter(ILPF) Sharp cut off frequency of ILPF cannot be implemented with electronic components but can be shown in computer Lowpass filters introduced in this section are compared by studying their behavior as a function of the same cut off frequencies One way to establish standard cut off loci is to compute circles that enclose specified amounts of total power PT where If the transform is centered , a circle of radius r will enclose  percent of power This summation is taken inside the circle or in its boundary.

Smoothing Frequency-Domain Filters Ideal Low Pass Filter(ILPF) Circles superimposed on the spectrum have radii 5,15,30,80 &230 pixels Circles enclose  = 92.0,94.6,98,99.5% of image power, respectively Spectrum falls off rapidly, with 92% of the total power being enclosed by a relatively small circle of radius 5

Smoothing Frequency-Domain Filters Example of Ideal Low Pass Filter(ILPF) For  =5 image appears blurred. Sharp details removed by the filter are contained in the 8% power As the filter radii increases,less and less power removed results in less blurring effect Ringing is evident in the image even 2% of power is removed

Smoothing Frequency-Domain Filters Ideal Low Pass Filter(ILPF) Explanation for blurring and ringing properties of ILPF Fourier transformation of the original image and the blurred image g(x,y) are related in the frequency domain by the equation G(u,v)= H(u,v) F(u,v) Blurring as a convolution process in the spatial domain is due to the nature of h(x,y) Spatial filter function h(x,y) was obtained in the standard way H(u,v) is multiplied by (-1)u+v for centering ILPF of H(u,v) Inverse DFT of H(u,v) Real part of Inverse DPF was multiplied by (-1)x+y

Smoothing Frequency-Domain Filters Example of ILPF Figure shows the ILPF of =5 in frequency domain and its equivalent in spatial domain In spatial domain ringing effect is clearly visible. Center component is responsible for blurring effect, and concentric circular components are responsible for ringing characteristics Filtered image may have negative values and hence scaling is required Five impulses in the spatial domain simulate five pixels on a black back ground These bright points may be viewed as approximation to impulses whose strength depends on intensity of the points Convolution of h(x,y) with f(x,y) is locating h(x,y) at the location of each impulses

Smoothing Frequency-Domain Filters Butter Worth Low Pass filter(BLPF) Transfer function of BLPF of order n and cut off frequency at a distance D0 from the origin is defined as It does not have sharp discontinuity as ILPF between passed frequency and filtered frequency It is customary to define cut off frequencies locus at points for which H(u,v) is down to a certain fraction of its maximum value In above equation of H(u,v) is down by 0.5. I.e. 50% of the maximum value when D(u,v)=D0

Smoothing Frequency-Domain Filters Example of BLPF No ringing effect is visible in any of the image processed with n=2

Smoothing Frequency-Domain Filters BLPF Ringing increases as order increases BLPF of order 20 exhibits the characteristics of ILPF

Smoothing Frequency-Domain Filters Gaussian Low Pass Filter(GLPF) 2-D GLPF is given by  is the measure of the spread of the Gaussian curve and is set to D0 cut off frequency When D(u,v)=D0 the filter is down to 0.667 of its maximum value

Smoothing Frequency-Domain Filters Example of GLPF There is smooth transition in blurring as a function of increasing cut off frequency GLPF does not achieve same smoothing as that of BLPF of order 2 for the same value of cut off frequency The inverse Fourier transform of the Gaussian filter also is Gaussian The spatial Gaussian filter has no ringing - an important characteristics

Smoothing Frequency-Domain Filters Examples of Lowpass Filtering Lowpass filtering applies to the field of machine recognition Original text shows distorted and broken Broken characters are bridged by blurring it Repaired image obtained using GLPF with D=80 is shown

Smoothing Frequency-Domain Filters Examples of Lowpass Filtering Application of GLPF in the image to get a smoother image Objective is to smooth sharpness of fine skin lines and small blemishes Resulting figure shows considerable reduction in fine skin lines around the eyes

Smoothing Frequency-Domain Filters Examples of Lowpass Filtering In this application LPF is used to reduce the effects of scanning and also to extract prominent features GLPF blur out much of details as possible while leaving large features recognizable This type of filtering is used for preprocessing and compare with the image in image bank

Sharpening Frequency-Domain Filters Image sharpening is obtained in frequency domain by a high pass filtering process It attenuates low frequency components without disturbing high frequency information in the Fourier transform Relationship of lowpass filter and its corresponding highpass filter

Sharpening Frequency-Domain Filters Ideal High Pass Filter(ILPF) 2-D HLPF transfer function Set to zero all frequencies inside a circle of radius D0 while passing all other frequencies outside the circle Be not physically realizable with electronic components but can be implemented in a computer IHPF has the same ringing properties as ILPF Perspective plot,image representation, cross section of a typical IHPF Spatial representation and gray level profile

Sharpening Frequency-Domain Filters Example of Ideal High Pass Filter(IHPF) Ringing in Fig. 4.24(a) is severe and produce thickened distorted object boundaries Edges of top three circles do not show well because they are not as strong as other edges in the image and their gray levels is much closer to back ground gray level Edges of squares increase as D0 is increased For D0 =80 the edges are much cleaner and less distorted Small objects are filtered properly

Sharpening Frequency-Domain Filters Butterworth High Pass Filters (BHPF) Transfer function is given by Perspective plot, image representation, cross section of a typical BHPF

Sharpening Frequency-Domain Filters Example of Butterworth High Pass Filters (BHPF) Boundaries are less distorted than those of IHPF Transition into the higher values of cut off frequency is much smoother with BHPF The performance of IHPF and BHPF in terms of filtering the smaller objects is comparable

Sharpening Frequency-Domain Filters Gaussian High Pass Filter(GHPF) 2-D GHPF is given by Results obtained with GHPF are smoother than other two filters Even smaller objects and thin bars are cleaner with Gaussian filter Perspective plot, image representation, cross section of a typical GHPF

Sharpening Frequency-Domain Filters Gaussian High Pass Filter(GHPF)

Sharpening Frequency-Domain Filters Laplacian in the Frequency Domain It can be implemented by using the filter H(u,v)= - (u2+v2) which is derived from an important result The image transform is centered by performing H(u,v) is centered as Laplacian filtered image in spatial domain is obtained by computing inverse Fourier transform of H(u,v)F(u,v)

Sharpening Frequency-Domain Filters Laplacian in the Frequency Domain Function is centered at M/2 ,N/2 and its value at the top of dome is zero Shown Laplacian in spatial domain obtained by Multiplying H(u,v) by Taking the inverse Fourier transform of above Multiplying real part by Horizontal profile through the center of the mask has the same basic shape as the profile

Sharpening Frequency-Domain Filters Laplacian in the Frequency Domain Enhanced image g(x,y) is obtained by subtracting the laplacian from the original image Laplacian is subtracted from the original image because of negative sign in its equation Enhanced image is obtained by inverse FT operation For proper result with this filter implementation it is important to scale the filter because the squared filter variable can be in order of magnitude greater than 1

Sharpening Frequency-Domain Filters Example of Laplacian in the Frequency Domain In shown image(c) most negative value is scaled to zero and maximum positive value is scaled to maximum displayable gray level

Sharpening Frequency-Domain Filters Unsharp Masking, High Boost Filtering & High Frequency Emphasis Filtering Concepts All HPF images except that of Laplacian have their average background intensity reduced near to black This is because HPF eliminates zero frequency components of their Fourier transform Solution to this problem is to add portion of image to the filtered result Unsharp Masking Consists of generating sharp image by subtracting from an image a blurred version of itself Obtaining HPF image by subtracting LPF version of the image Given by Unsharp masking can be implemented directly in the frequency domain by using the composite filter

Sharpening Frequency-Domain Filters High Boost Filtering A generalization of unsharp masking with A>=1 High-boost filtering increases the contribution made by the original image to the overall filtered result and equation may be written as where When A=1 high boost filtering reduces to high pass filtering When A increases greater than 1,contribution made by image becomes more dominant Can be implemented with composite filter With Process of high boost filtering This filter function is multiplied by the (centered) transform of the input image Take the inverse transform of the product Multiply the real part of this result by (-1)x+y gives the high boost filtered image in the spatial domain

Sharpening Frequency-Domain Filters Example of High Boost Filtering Image obtained by using equation Image shown for A=2 Inner details in the image appears darker Image is sharper Image obtained for A=2.7 is shown This image is sharper and is improved result

Sharpening Frequency-Domain Filters High Frequency Emphasis Filtering A high pass filter function is multiplied with a constant and an offset is added This will avoid eliminating zero frequency component by the filter Transfer function is given by where a>=0 and b>a Typical values a=0.25 to 0.5 b=1.5 to 2.0 High frequency emphasis reduces to high boost filtering when a=(A-1) and b=1 When b>1 high frequencies are emphasized

Sharpening Frequency-Domain Filters Example of High Frequency Emphasis Filtering Result of performing histogram equalization on the high frequency emphasis filtered image Information is more detail in this method Bones are clearly visible

Homomorphic Filtering Image f(x,y) can be expressed as product of illumination and reflectance components f(x,y)=i(x,y)r(x,y) Fourier transform cannot be applied directly to f(x,y) as the product of two function is not separable Applying log to this function f(x,y) makes it separable z(x,y)=ln f(x,y)=ln i(x,y) +ln r(x,y) {z(x,y)}= {ln i(x,y)} + {r(x,y)} or Z(u,v)=Fi(u,v) + Fr(x,y)

Homomorphic Filtering Processing Z(u,v) by means of filter function H(u,v), S(u,v) = H(u,v) Z(u,v) = H(u,v) Fi (u,v) + H(u,v) Fr (u,v) In the spatial domain, s(x,y) = {S(u,v)} = {H(u,v) Fi (u,v)} + { H(u,v) Fr (u,v)} Let i’(x,y) = {H(u,v) Fi (u,v)} and r’(x,y) = { H(u,v) Fr (u,v)} s(x,y) = i’(x,y) + r’(x,y) Enhanced image g(x,y) is obtained by taking the exponential of s(x,y) where i0(x,y) r0 (x,y) are the illumination and reflectance components of the output image

Homomorphic Filtering Illumination components Characterized by slow spatial variation Associated with low frequency of Fourier transform of the logarithm of an image Reflection components Associated with high frequencies of the Fourier transform of image Vary abruptly,particularly at the junction of dissimilar objects A good deal of control can be obtained over the illumination and reflectance components with homomorphic filtering Control requires specification of H(u,v) that affects low and high frequency components

Homomorphic Filtering Cross section Choice of parameters <1 contributes low frequency components >1 contributes high frequency components Tends to decrease the contribution made by low frequency component (illumination) Amplify the contribution made by high frequency components (reflection)

Homomorphic Filtering Example Net result of homomorphic filtering is simultaneous dynamic range compression and contrast enhancement Applying for =0.5 & = 2.0 in filter function Reduction of dynamic range in the brightness and increase in contrast brought the details of objects inside the shelter

Implementation More on Periodicity – Need for Padding Two functions that are to be convolved in time domain is shown in the next slide Steps of convolution Mirror one of the functions about the origin Shown h(-m) in the next slide Slide the mirrored function on the other function Shown h(-m) on f(m) This done by adding a constant x to h(-m) and h(x-m) is formed Following slide shows the result of convolution of the two functions

Implementation More on Periodicity – Need for Padding

Implementation More on Periodicity – Need for Padding In frequency domain the convolution is determined by multiplying both the functions The failure to handle periodic issues in convolution in frequency domain is addressed by padding both the function with zeroes to make them equal length Result of performing convolution with extended function is shown

Implementation More on Periodicity – Need for Padding Extended or padded 2-D periodic functions f(x,y) = f(x,y) 0<=x<=A-1 & 0<=y<=B-1 f(x,y) = 0 A<=x<=P & B<=y<=Q h(x,y) = f(x,y) 0<=x<=C-1 & 0<=y<=D-1 h(x,y) = 0 C<=x<=P & D<=y<=Q Issue of padding is central to filtering Unless proper padding is used the result of padding is erroneous Illustration of the need for function padding is shown Result would be correctly filtered image of size PxQ Image has twice the size of original in both directions Has four times as many pixels

Implementation More on Periodicity – Need for Padding Padded spatial representation of the ideal low pass filter is shown Area in black represents the padded zeroes Result of filtering with padding is shown Image is usually cropped to its original size since there is little valuable information past the image boundaries

Implementation Convolution and correlation theorems Convolution of two functions is given by Correlation of two functions is given by

Implementation Convolution and correlation theorems Correlation function has two changes to that of convolution function Complex conjugate of f() The function h is not mirrored about the origin Everything else in the implementation of convolution is identical to correlation ,including padding Principle use of correlation is matching where as convolution is the tie between frequency domain and spatial domain If f(x,y) is the image containing objects or regions and h(x,y) be the object that has to be matched then Correlation is maximum at the region h(x,y) matches f(x,y)

Implementation Convolution and correlation theorems Shown image of size 256x256 and template of size 38x42 Padded image and template of size 298x298 Correlation function displayed as an image Horizontal profile line through the highest value,showing the point at which best match took place

Implementation Summary Of Properties of the 2D Transforms Development of FFT has made the DFT as an essential tool in signal processing Directly computing 1-D Fourier transform for M points requires on the order of M*2 applications/additions FFT accomplishes the same task on the order of M log2 M operations For example if M=1024 then using FFT it is required approximately 10*4 operations Focus is on FFT of one variable and 2-D Fourier transform is obtained by successive passes of a 1-D transform algorithm

Implementation Computation advantage of FFT over 1-D DFT is shown Advantage increases rapidly as a function of n Computation advantage of FFT over 1-D DFT

Implementation FFT algorithm also called successive doubling where and M=2n n is a positive integer M can also be expressed as M=2K where k is a positive integer then F(u) can be expressed as sum of even and odd series

Implementation

Implementation

Implementation

Implementation