Kamis, 19 Maret 2009

Median Filtering

There are two ways that can do for improve image quality. The first is Point Processing, and the second is Mask Processing. Point processing work with operation point of each pixel, and Mask Processing work with mask operation.
One of mask processing is median filtering. Filtering is image enhancenent technique in spatial domain, and this method is linear filtering. In median filtering we take a mask , for example 3x3, and from this we get the values of each pixel. From this values we do to sort , so we get a median value to replace one value that is in center position.
Example:

With image in above, we use 3x3 mask filtering. The values of pixels, after sorted is 115, 119, 120, 123, 124, 125, 126, 127, 150. we get a median value is 124, and the value 150 is replaced by 124. This method is apllied to image with salt and pepper image. With various constant noise from 0.1 to 0.5 we can compare 3x3 median filtering and 9x9 median filtering.