I wanted to take one pixel from an image say im(x,y)
then take the neighbouring 5 pixels of position im(x,y)
find the maximum value of the 5 pixels and save it in maxIm(x,y)
please can someone help me write the code – i also want to do it for all the pixels in the image, so that i get maxIm the same size as im
(5 must be 4-neighbourhood pixels, including the center pixel)
Best Answer