Images captured using digital cameras usually have randomly distributed speckles on an otherwise smooth area (see the green background in the left image of Figure 6). These speckles are just random fluctuations in brightness and are referred to as image noise [1]. Noise makes images appear grainy and hence is undesirable.
Figure 6: Comparison of an image with (left) and without (right) noise
Noise is caused by various factors, including, imperfections in the camera electronics, malfunctioning pixels, and errors in the analog-to-digital converter (see Image Sensor). The only way to reduce noise in a photo after it has been taken is by using image processing. A common way to digitally reduce the noise is to "smooth" the fluctuations out. However, smoothing causes the image to appear less sharp. Luckily, there are noise-reduction techniques that do not lower image sharpness so much. Let us look at a simple method called median filtering [2].
Figure 7: Median Filtering
Figure 7 illustrates the idea of median filtering on a black and white image. For each pixel in the output image, we choose a small window around the same pixel in the input image. The pixel values in this window are sorted in increasing order. The output pixel is then assigned the middle value (also known as the median) of the sorted sequence. This process is repeated for each and every pixel to generate a complete output image. For a color image, the same operation is applied to each color (R, G and B) separately.
Figure 8: Noise reduction
The amount of noise reduced using median filtering depends on the window size. The larger the window, the greater the reduction in noise. However, as the window size grows, we lose more detail from the input image. For very large windows, the output image begins to appear "washed out." You can vary the window size using the slider in Figure 8 to see how the output image changes.