We know that images can be treated as 2d matrix. But we can also treat it as a function, where we give the location of a pixel (x,y) and get the intensity of that pixel.
Now what we can do for denoising is Moving average. Imagine we have a imgae below: