Answered step by step
Verified Expert Solution
Question
1 Approved Answer
******************Just answer question 2 and 3 python *********************** 5) Write code to detect the edges of the image using Laplacian 6) From the results of
******************Just answer question 2 and 3 python ***********************
5) Write code to detect the edges of the image using Laplacian 6) From the results of the previous questions, compare between the gradient and Laplacian for edge detection H PROBLEM 1 For an image of your choice, do the following: 1) Transform the image to gray level (in case you started with a color image). 2) Add Gaussian noise. You can use function imnoise or any equivalent function. 3) Create a 5 by 5 Gaussian filter for a given value of o. Feel free to use built-in function fscpecial or any equivalent function. 4) Perform Gaussian filtering in the space domain. You can use the built-in functions such as imfilter, cv2.filter2D (or any equivalent function). PROBLEM 2 We want to perform high pass and low pass filtering to the image in figure 1. 1) Obtain the Fourier transform of the image 2) Obtain the Fourier transform of the low pass filter. Note that the size of the filter must be the same as the size of the image. Feel free to use Gaussian filter, Butterworth or an ideal low pass filter. 3) Obtain the Fourier transform of the high pass filter. Note that the size of the filter must be the same as the size of the image. Feel free to use any of the filters discussed in class including ideal high pass filter. 4) Perform filtering in the frequency domain with the low 5) Perform filtering in the frequency domain with the high pass filter Show and discuss your results. Pick appropriate values for the filters' parameters. Feel free to try: image= ifft2(S); dmin= min (min(abs (imageD) ) ); dmax= max (max (abs (imageD)); imshow({ifftshift (imageD) ), (dmin dmax]) to display the inverse FFT image if you use Matlab Fig. 1. Image for problems 2 and 3 pass filter. PROBLEM 4 The goal of this problem is to study some of the properties of the discrete cosine transform. We want to compare between the upper left corner and the bottom right corner in terms of the information contained in the DCT, and the possibility to compress the image using the DCT and its properties. When you display images, be sure that they the same physical size on paper (not pixel size). This will allow you to compare in terms of the quality. 1) Apply the DCT to an image of your choice. To display the DCT, you can use instruction: imshow (log(abs (ImageDCT)), []) (2) colormap (jet), colorbar where Image DCT is the DCT of your image. We assume that the size of the original image is (11.12). 2) Now we want to reduce the size of Image DCT by keeping only the top left corner as shown in figure 2. We do this twice: ImageDCTTOPLeftl: We keep (14/2, n2/2) ele- ments from the top left of Image DCT. PROBLEM 3 We want to perform edge detection in the space domain for the image shown in figure 1. 1) Write code to detect the edges of the image using the horizontal Sobel mask 2) Write code to detect the edges of the image using vertical Sobel mask 3) Add the images obtained in the previous questions. 4) Discuss the results obtained in the previous questions. 5) Write code to detect the edges of the image using Laplacian 6) From the results of the previous questions, compare between the gradient and Laplacian for edge detection H PROBLEM 1 For an image of your choice, do the following: 1) Transform the image to gray level (in case you started with a color image). 2) Add Gaussian noise. You can use function imnoise or any equivalent function. 3) Create a 5 by 5 Gaussian filter for a given value of o. Feel free to use built-in function fscpecial or any equivalent function. 4) Perform Gaussian filtering in the space domain. You can use the built-in functions such as imfilter, cv2.filter2D (or any equivalent function). PROBLEM 2 We want to perform high pass and low pass filtering to the image in figure 1. 1) Obtain the Fourier transform of the image 2) Obtain the Fourier transform of the low pass filter. Note that the size of the filter must be the same as the size of the image. Feel free to use Gaussian filter, Butterworth or an ideal low pass filter. 3) Obtain the Fourier transform of the high pass filter. Note that the size of the filter must be the same as the size of the image. Feel free to use any of the filters discussed in class including ideal high pass filter. 4) Perform filtering in the frequency domain with the low 5) Perform filtering in the frequency domain with the high pass filter Show and discuss your results. Pick appropriate values for the filters' parameters. Feel free to try: image= ifft2(S); dmin= min (min(abs (imageD) ) ); dmax= max (max (abs (imageD)); imshow({ifftshift (imageD) ), (dmin dmax]) to display the inverse FFT image if you use Matlab Fig. 1. Image for problems 2 and 3 pass filter. PROBLEM 4 The goal of this problem is to study some of the properties of the discrete cosine transform. We want to compare between the upper left corner and the bottom right corner in terms of the information contained in the DCT, and the possibility to compress the image using the DCT and its properties. When you display images, be sure that they the same physical size on paper (not pixel size). This will allow you to compare in terms of the quality. 1) Apply the DCT to an image of your choice. To display the DCT, you can use instruction: imshow (log(abs (ImageDCT)), []) (2) colormap (jet), colorbar where Image DCT is the DCT of your image. We assume that the size of the original image is (11.12). 2) Now we want to reduce the size of Image DCT by keeping only the top left corner as shown in figure 2. We do this twice: ImageDCTTOPLeftl: We keep (14/2, n2/2) ele- ments from the top left of Image DCT. PROBLEM 3 We want to perform edge detection in the space domain for the image shown in figure 1. 1) Write code to detect the edges of the image using the horizontal Sobel mask 2) Write code to detect the edges of the image using vertical Sobel mask 3) Add the images obtained in the previous questions. 4) Discuss the results obtained in the previous questionsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started