Question: Please help me with matlab Procedure Write a C program to apply a moving average to an input image. Your input image will be the
Please help me with matlab
Procedure
Write a C program to apply a moving average to an input image. Your input image will be the familiar Beachgreen.dat. Call the output file BeachgreenMA.dat. The program should be able to read the input image from the ASCII file, visit each pixel, except for the pixels specified below, define a 7 7 region around the pixel, and compute the arithmetic mean (i.e. the average) of the pixels value and the values of the 48 pixels surrounding it. The program should place the result of this computation at the corresponding pixel location in the output image. The program should save the output into an ASCII file of exactly the same format and size as the input file. [Show C code]
In order to be able to define a 7 7 region around a pixel, the pixel should not be located in the top 3 rows of the image, nor in the bottom 3 rows, nor in the 3 leftmost and the 3 rightmost columns of the image. Therefore the nested loops in the program should be defined according to this restriction.
Comment on your results.
Modify your program to make it applicable to any size input image.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
