SumitBirla.com

Home » Software » Image Processing II » Basic Image Manipulation (part 1)

Assignment 1: Basic Image Manipulation (part 1)

The purpose of this assigment was to implement basic image manipulation techniques such as median smoothing and Gaussian smoothing.

Source Code:

Gaussian Smoothing examples:


Original Image

3 x 3 Window

7 x 7 Window

Gaussian smoothing works well for smoothing areas of images. It results in an image that has a lower intensity than the original image. For this reason, the image need to be made brighter after the smoothing is done.


Edge Preserving Gaussian Smoothing

By settings a threshold for Gaussian Smoothing, we can avoid the blurring of edges. The resultant pixel values are the furthest away from the original pixel values at the edges. By replacing these by their original values, the edges are preserved.


Original Image

Threshold 80 (3 x 3 window)

Threshold 50 (3 x 3 window)

Median Smoothing:

Median Smoothing helps eliminate impulse noise. The examples below illustrate how effective this technique can be. But it has the side effect of rounding corders and flattening peaks. Notice how the edges have changes in the smoothed images.


Original Image

3 x 3 Window

5 x 5 Window

Performance of Median Smoothing

The time taken to complete median smoothing increases exponentially with the increase in window size since it is not separable. It also involves sorting of pixels. Gaussian smoothing, on the other hand, is separable. So the time taken increases linearly. The test below were performed using 3x3, 5x5, 7x7 and 9x9 window sizes on an Intel 486 based PC running at 66 MHz.

Window SizeMedianGaussian
3 x 33.077 sec4.684 sec
5 x 57.457 sec6.674 sec
7 x 713.225 sec10.863 sec
9 x 922.398 sec12.415 sec