Bilateral filtering concept. The starter code MK2 GrayScaleDenoising using .riiter supplied with the assignment loads a 300 x 300 noisy binary image and attempts to denose the image using your implementation of the Bilateral filher Please ensure that your implementation of the bilateral filter adheres to the following conventions Inpatse user supplied image, p, Ouputs: result of Bilateral filtering, result of Gaussian filtering Failure to adhere to these conventions will result in deduction of points. Your task is to complete the implementation of bilateral filher (in gray bilateral tilter) and compare the results for different values of a, and o implementing Gaussian fitering using the code for Bilateral filtering: Recall that the Bilatoral her kernel is the product of a Gaussian spotial fither kemel G and a Gaussian intemsity kemel G Conseqeently,you can identify the Gaussian filtered image by simply computing a second image wherein the intensity kernel Go, is disregarded. Comparing the output of the Bilateral and the standard Gausian spatial filter is useful as it gives you a sense of the effectiveness of the edge-preserving character of the Bilateral fiher. WARNING: You may not invoke the MATLAB function imbilattilt in your implementation of gray bilateral.filter. You may not use the MATLAB functions imfilter&Epsecialt implement Gaussian filtering. & Questions . Completed MATLAB code for HWK2 Grayscalebenoising using BLrilter.ad gray_bilateralfilter 2. Description of key steps in MATLAB implementation with references to relevant line numbers (10 points) Be as detailed as possible in your explanation 3. How are pixels near the image boundary being handled? 4. What value of o, did you choose and why? 5. What value of o, did you choose and why? 6. Screenshots of the original image and the denoised result using Bilateral and Gaussian filtering (7 points) (3 points) (1 point) (2 points) Label each clearly. Failure to do so will result in deduction of sca'e eno's" g-using-b Lrnter.m gray-bilateral-filterm 1 + function HVK2-GrayScaleDenoising-using-BLFilter() clc, close all % Grayscale inage Bilateral filtering in-noisy = in2double (inread("NoisyGrayInage.png, )): % Identify a patch that has uniform intensity % Use the intensity variance of this patch to identify signa-r signa-s = ?2: % You need to supply this value sigma-r-??: % You need to supply this value tin.blf, in. ript) - eray.bilateral filter (in noisy, signa t, signa.s); % Display the noisy inage, the result of bilateral filtering % Use MATLAB's inshow() to display the image % Use MATLAB's subplot() function if necessary . DAmatlabybinigray,bilateral-filterm HWK2 GrayScaleDenoising using.BLFilter.m gray bilateral filter.mx+ function (outpIng, outpIeelpf) raybilateralfilter (inIg, simax, sizna.d % WARNING: Do not attempt to execute this function as it will throw an % error disp( Kissing implenentation' -end Bilateral filtering concept. The starter code MK2 GrayScaleDenoising using .riiter supplied with the assignment loads a 300 x 300 noisy binary image and attempts to denose the image using your implementation of the Bilateral filher Please ensure that your implementation of the bilateral filter adheres to the following conventions Inpatse user supplied image, p, Ouputs: result of Bilateral filtering, result of Gaussian filtering Failure to adhere to these conventions will result in deduction of points. Your task is to complete the implementation of bilateral filher (in gray bilateral tilter) and compare the results for different values of a, and o implementing Gaussian fitering using the code for Bilateral filtering: Recall that the Bilatoral her kernel is the product of a Gaussian spotial fither kemel G and a Gaussian intemsity kemel G Conseqeently,you can identify the Gaussian filtered image by simply computing a second image wherein the intensity kernel Go, is disregarded. Comparing the output of the Bilateral and the standard Gausian spatial filter is useful as it gives you a sense of the effectiveness of the edge-preserving character of the Bilateral fiher. WARNING: You may not invoke the MATLAB function imbilattilt in your implementation of gray bilateral.filter. You may not use the MATLAB functions imfilter&Epsecialt implement Gaussian filtering. & Questions . Completed MATLAB code for HWK2 Grayscalebenoising using BLrilter.ad gray_bilateralfilter 2. Description of key steps in MATLAB implementation with references to relevant line numbers (10 points) Be as detailed as possible in your explanation 3. How are pixels near the image boundary being handled? 4. What value of o, did you choose and why? 5. What value of o, did you choose and why? 6. Screenshots of the original image and the denoised result using Bilateral and Gaussian filtering (7 points) (3 points) (1 point) (2 points) Label each clearly. Failure to do so will result in deduction of sca'e eno's" g-using-b Lrnter.m gray-bilateral-filterm 1 + function HVK2-GrayScaleDenoising-using-BLFilter() clc, close all % Grayscale inage Bilateral filtering in-noisy = in2double (inread("NoisyGrayInage.png, )): % Identify a patch that has uniform intensity % Use the intensity variance of this patch to identify signa-r signa-s = ?2: % You need to supply this value sigma-r-??: % You need to supply this value tin.blf, in. ript) - eray.bilateral filter (in noisy, signa t, signa.s); % Display the noisy inage, the result of bilateral filtering % Use MATLAB's inshow() to display the image % Use MATLAB's subplot() function if necessary . DAmatlabybinigray,bilateral-filterm HWK2 GrayScaleDenoising using.BLFilter.m gray bilateral filter.mx+ function (outpIng, outpIeelpf) raybilateralfilter (inIg, simax, sizna.d % WARNING: Do not attempt to execute this function as it will throw an % error disp( Kissing implenentation' -end