Linear filters like averaging and Gaussian filters can remove grain noise by averaging pixel values in a neighborhood. Median filters are better at removing outliers without reducing sharpness by setting a pixel to the median value in its neighborhood. The document demonstrates applying averaging and median filters in Matlab to remove noise, and using morphological opening to estimate and subtract a background illumination to rectify it.