 Today we will discuss image enhancement using frequency domain learning outcome at the end of this session students will be able to apply image enhancement algorithms in frequency domain contents in this session we will discuss some basics of image enhancement in frequency domain. Then we will see the ideal low pass filter which is used for smoothing an image and ideal high pass filter which is used for sharpening of an image. Let us see first the frequency domain concept which consists of DFT that is discrete Fourier transform and how the discrete Fourier transform of an input image will look like. So, the DFT of a two dimensional image can be visualized by showing the spectrum of image component frequencies. For example, this is a input image in spatial domain having coordinates x and y and if you convert this input image which is in spatial domain in frequency domain by using this discrete Fourier transform. We get the image after some modifications in the transform that is just we are using shifting operation of a discrete Fourier transform property. So, here this is a U coordinate, this is a V coordinate and origin of the coordinate is at the center where here in spatial domain the origin of the coordinate is here top left whereas origin of the coordinate in frequency domain is taken at the center for easy implementation. Let us see how we can implement this DFT for image enhancement. Let us see how we can use this DFT for image processing and for image enhancement in this particular class. So, to filter an image in the frequency domain we should follow these three steps and these three steps are given in this diagram. So, first step is what we have to compute the discrete Fourier transform of a input image named as f of x y. After pre-processing it is applied to this block that means here what we have to do is we have to find out the discrete Fourier transform of this input image f of x y and we get the output in the form of frequency domain named as capital F of u v where u v are the variables in the frequency domain and x y are the variables in the spatial domain. After that what we do is we multiply our DFT of a input image with the filter function h of u v which is also specified in the frequency domain. So, this input f of u v is multiplied with h of u v where h of u v is a filter function and we get this multiplication. Keep in mind in spatial domain filtering operation is done by using convolution operation, but in frequency domain this is converted into a simple multiplication operation. Then finally we compute the inverse discrete Fourier transform of this result so that we can get the information that is image back into our spatial domain which is named as g of x y which is an enhanced image after some post processing. So, let us see how we can implement different filters for enhancing an image using frequency domain. So, first we are studying ideal low pass filter which is used for smoothing an image. So, what it does is it simply cuts of all frequency components that are this specified distance d 0 from the origin of the transform. So, if you look at this diagram there are three. So, actually these three diagrams are just same concept, but represented in three different ways. So, this is represented in 3D view, this is represented in image view and this is represented in coordinate view. So, here if you look at this is a white circle at the center means value 1 and here all these pixels are black means value is 0. If I multiply this filter function with our input image what will happen is wherever 1 is there only these portion of the input image will maintain and that corresponds to low frequency values only low frequency values are maintained and high frequency values are cut off. That is why it is called low pass filter. Same thing is represented in coordinate system that is this is a distance d 0 that is from the center of or we can say radius of this circle. So, up to d 0 the value of the filter function is 1 and after d 0 the value of the filter function is 0. So, this on x axis we have distance of some pixel from the center that is called d of u v and this is a filter function h of u v and in 3D view the same is explained here. For example, this is u coordinate y coordinate in frequency domain and at the center we see the highest values that means this is a h of u v and up to distance d 0 and after that distance the value is flat that is 0. Now, one more important is changing the distance changes the behavior of the filter that means if I change this d 0 to some another value say d 1 then the effect of that will dominantly we will see in the enhanced image. So, let us see what is how to represent the ideal low pass filter in the form of transfer function. So, the transfer function of ideal low pass filter is given as h of u v is the distance of particular point is less than or equal to that radius d 0 and h of u v is equal to 0 if the distance of the particular point or pixel is greater than this d 0 where d of u v is given as that means distance of that particular point d of u v is given as u minus m by 2 square plus v minus n by 2 square raise to one half that is simple Pythagoras theorem is used to find out the distance of pixel from the center where m and n are the size of the input image in rows and columns. So, m rows are there and n columns are there in a input image. Let us see the effect of ideal low pass filter we are applying this ideal low pass filter on this input image. Here this image and some high part of this lady is here explored more. So, here we see these blemishes we can find out. So, ideal low pass filter used to remove blemishes in a photograph given in the this figure. So, here after applying this ideal low pass filter if you observe here this is blemishes are reduced if further the same ideal low pass filter is applied we see that the blemishes are vanished off. So, this is what one of the application of ideal low pass filter. Now, let us have a question what will be ideal high pass filter transfer function you pause the video and answer the question. So, the answer is given this slide that is ideal high pass filter naturally the transfer function of the ideal high pass filter is reverse of that. That means, here instead of white circle here it is a black circle and outside it is white that means opposite of the earlier one. So, H of u v is equal to 0 if d of u v is less than or equal to d 0 and it is 1 if d of u v is greater than 0. So, in way the ideal high pass filter is also represented in three different ways this is a three dimensional representation this is a image representation this is a coordinate representation and if you look at here the value of H of u v up to this d 0 point is 0 whereas, value of H of u v if the input pixel value is greater than d 0 it is 1. So, let us see the effect of this ideal high pass filter this is a input image and we are applying this ideal high pass filter with different that is d 0 is equal to 15 here, d 0 is equal to 30 here and d 0 is equal to 80 here. If I go on increasing the image gets more and more sharpened just you look at if the image is that means distance is 15 we see that this image is not too sharp, but if I increase this to 30 the image is sharpened and here for 80 it is more sharpened references for preparing these slides this digital image processing by Raphael C. Gonzalez and Richard Woods by Tata McGraw education the book which is I used for. Thank you, thank you very much.