Question: Write a function using imfilter with a 3 x 3 averaging mask and zero-padding, to iterate averaging an image n times. The prototype for your

Write a function using imfilter with a 3 x 3 averaging mask and zero-padding, to iterate averaging an image n times. The prototype for your function is g(n)=my Avg (f,n) where f is the input image, and g(n) is f with an averaging filter applied n times. Here n is assumed to be a non-negative integer. Using myAvg(f,n) write a script that shows, in a single figure window, the original image (f=imread('cameraman.tif') ), g(10), g(100) and g(1000). Label each image, pair each image with its histogram and print the average intensity for each g in the figure. Look carefully at each image. Explain: (a) What is happening at the edges of the images and why? (b) What is happening to the average intensity and why? (c) Is your answer to the previous question consistent with the fact that myAverage does not change local average intensity? (d) Is there an 'equilibrium image fo such that myAvg (fo,n) approaches fo, for large n? (e) Would your answer to the previous question change if you had not used zero padding for imfilter? If so, how would it change? Write a function using imfilter with a 3 x 3 averaging mask and zero-padding, to iterate averaging an image n times. The prototype for your function is g(n)=my Avg (f,n) where f is the input image, and g(n) is f with an averaging filter applied n times. Here n is assumed to be a non-negative integer. Using myAvg(f,n) write a script that shows, in a single figure window, the original image (f=imread('cameraman.tif') ), g(10), g(100) and g(1000). Label each image, pair each image with its histogram and print the average intensity for each g in the figure. Look carefully at each image. Explain: (a) What is happening at the edges of the images and why? (b) What is happening to the average intensity and why? (c) Is your answer to the previous question consistent with the fact that myAverage does not change local average intensity? (d) Is there an 'equilibrium image fo such that myAvg (fo,n) approaches fo, for large n? (e) Would your answer to the previous question change if you had not used zero padding for imfilter? If so, how would it change
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
