TAsk II: Statrix ave rage 1. Write a Mat lab script that reads a greyscale image...
TAsk II: Statrix ave rage 1. Write a Mat lab script that reads a greyscale image from the file 'picture.jpg' into the 2D array (matrix) X. Then display the image. 2. Expand on the previous seript by computing the "local average" of each element of X, and storing it in the corresponding element of a new matrix Y. The local average of a matrix element is the mean value of it and its surrounding 8 neighbours. You should disregard the border of the image (first and last row and column) as they have less than 8 neighbours. Display the new image. 3. Recalculate the local average but instead of ignoring the image border, instead "pad" the image with zeros before performipg the caleulation. Padding is just adding a layer of pixels all around the image with a value of zero. Store the resulting matrix in Z and display the new image.
TAsk II: Statrix ave rage 1. Write a Mat lab script that reads a greyscale image from the file 'picture.jpg' into the 2D array (matrix) X. Then display the image. 2. Expand on the previous seript by computing the "local average" of each element of X, and storing it in the corresponding element of a new matrix Y. The local average of a matrix element is the mean value of it and its surrounding 8 neighbours. You should disregard the border of the image (first and last row and column) as they have less than 8 neighbours. Display the new image. 3. Recalculate the local average but instead of ignoring the image border, instead "pad" the image with zeros before performipg the caleulation. Padding is just adding a layer of pixels all around the image with a value of zero. Store the resulting matrix in Z and display the new image.