MATLAB: How many matrix need to change to make a mean&median filter

mean filter

if i want to make a mean&median filter,thats mean i must change the red,green and blue matrix in the pixel image,is that right? lets say if the image size is 200×200,that's mean i must change every pixel in the image and the computer will take a very long process?
sorry for my bad english

Best Answer

You don't need to change them. You can have a separate output image and leave your input image unchanged. It will create an output image, and for a small image like 200x200 it will be very fast. It took 0.008 seconds for all three color channels on my computer. Seems very fast to me - how fast do you need?