lobo-F

University of New Mexico

ivPCL
Research
Affiliates
Publications
Classes
Alumni
Lab Visitors
XUP-UNM Platform
Salt and Pepper

This page is intended to provide the viewer with an interesting look at a common image processing problem, namely, the presence of noise in an image.  Noise in an image are small, unwanted random pixels in areas where the surrounding majority of pixels are a different value, i.e. a white pixel in a black field or a black pixel in a white field.  For these examples, I will use the term "salt and pepper"  to describe the noise inthe images.  Strickly speaking, "salt and pepper" noise referes to single pixel noise statistics.  In this work, we extended this definition for circuilar regions of pixels. 

Original Image with Noise

As can be seen in the above image, it is polluted with salt and pepper noise.  Therefore, to attempt to restore it to its original form, we can use the aforementioned operations of DILATE, ERODE, OPEN, and CLOSE.  The results of these attempts are as follows:

DILATED Image

ERODED Image

As can be seen in the first image, dilation was successful in removing the pepper noise, however, it amplified the salt noise, and further distorted the existing image.  As can be seen in the second image, erosion was successful in eliminating the salt noise, but amplified the pepper noise, and further damaged the original image.  Therefore, these two functions are not logical choices for restoring the original image.

CLOSED Image

OPENED Image

As can be seen in the first image, closing was successful in removing the pepper noise, yet was unsuccessful in removing the salt noise.  However, this was an improvement over dilation because it did little damage to the original image, while still removing the pepper noise and did not amplify the salt noise.  As can be seen in the second image, opening was successful in removing the salt noise, yet was unsuccessful in removing the pepper noise.  Again, this is an improvement over erosion, because it did little damage to the original image, and did not amplify the pepper noise.  However, there seems to be a missing element in the use of these functions.  This element is the INVERSE function.

The best way to explain the inverse function is pictorially.  The underlying concept is to swap black and white in a binary image.  Therefore, the following images are a useful example:

Original Image 

INVERSE Image

A better algorithm to rid the noisy image of the salt and pepper is to incorporate the INVERSE function in the process.  The following example demonstrates this algorithm and yields a successful result:

Original Noisy Image

To begin the process of restoring the image, we will remove the salt noise using the OPEN function.  The result of this operation using a cross element is the following:

Stage One of Restoration

As can be seen from the image, the salt noise has been removed, yet the pepper remains.  The next step is to invert the image in order to turn the pepper noise into salt noise.  The result of this operation is as follows:

Stage Two of Restoration

As can be seen from the image, the pepper noise has become salt noise, and therefore, we can apply the OPEN function again to remove the salt noise from the image.  The result of this operation is as follows:

Stage Three of Restoration

As can be seen from the image, the noise has been virtually eliminated from the image, but we are left with an inverted image.  Therefore, the logical step is to reinvert the image back to its original form.  The result of this operation is as follows:

Final Restored Image

A quick comparison between the original noisy image and the final restored image confirms that virtually all noise has been eliminated, while little damage was inflicted upon the structure of the image.  The OPEN and CLOSE functions are powerful filters, but when combined with the INVERSE function, they yield even better results.  It should be noted that the above sequence of images could also have been created using the CLOSE function to eliminate the pepper noise in the non-inverse and inverse images.  The only slight difference would have been a small change in the image structure.

[ivPCL] [Research] [Affiliates] [Publications] [Classes] [Alumni] [Lab Visitors] [XUP-UNM Platform]

Site created and maintained by Craig Kief at www.taurustechnicalsolutions.com