EDGE PRESERVATION OF ENHANCED FUZZY MEDIAN MEAN FILTER USING DECISION BASED MEDIAN FILTER
The Component Median Filter for Noise Removal in Digital Images
-
Upload
seventhsensegroup -
Category
Documents
-
view
215 -
download
0
Transcript of The Component Median Filter for Noise Removal in Digital Images
7/27/2019 The Component Median Filter for Noise Removal in Digital Images
http://slidepdf.com/reader/full/the-component-median-filter-for-noise-removal-in-digital-images 1/7
International Journal of Engineering Trends and Technology (IJETT) - Volume4Issue5- May 2013
ISSN: 2231-5381 http://www.ijettjournal.org Page 1830
The Component Median Filter for Noise Removal in
Digital ImagesHarish 1 and M.R.Gowtham2
1Department of Electronics and Communication Engineering,Priyadarshini College of Engineering, NELLORE – 524 004, A. P., INDIA
2 Department of Electronics and Communication Engineering,Priyadarshini College of Engineering, NELLORE – 524 004, A. P., INDIA
Abstract
The objective of the project is to develop a
Component filtering algorithm to reconstruct noise affected images. The purpose of the algorithm is to
remove noise from a signal that might occur through transmission of an image. This algorithm
can be applied to one dimensional as well as two
dimensional signals. In the component Median Filter each scalar component is treated independently. A filter mask is placed over a point
in the signal. For each component of each point
under the mask, a single median component is determined. These components are then combined
to form to a new point, which is then used to
represent the point in the signal studied. When
working with color images, however, this filter regularly out performs the simple Median filter.
When noise affects a point in a gray scale image,
this result is called “salt and pepper” noise. In color
images, this property of “salt and pepper” noise is typical of noise models where only one scalar value
of point is affected. For this noise model, the
Component Median Filter is more accurate than theSimple Median Filter.
Keywords — Image Enhancement, Component
Median Filter, Mean Square Error, Root MeanSquare Error, Peak to Signal Noise Ratio, Noise.
1. INTRODUCTION
In image processing it is usually necessary to performhigh degree of noise reduction in an image before
performing higher-level processing steps, such asedge detection. In software, a smoothing filter is used to remove noise from an image. Each pixel isrepresented by three scalar values representing thered, green and blue chromatic intensities. At each
pixel studied, a smoothing filter takes into accountthe surrounding pixels to design a move accurateversion of this pixel. By taking neighboring pixels
into considerations, extreme ‘noisy’ pixels can bereplaced. However, outlier pixels may represent incorrupted fine details, which may be lost due to the
smoothing process.
The median filter [2] is a non-linear digitalfiltering technique, often used to remove noise fromimages or other signals. The idea is to examine asample of the input and decide if it is representativeof the signal. This is performed using a windowconsisting of an odd number of samples. The valuesin the window are sorted into numerical order; themedian value, the sample in the center of thewindow, is selected as the output. The oldest sampleis discarded, a new sample acquired, and thecalculation repeats. The Component Median Filter defined in (1) also relies on the statistical median
concept.
CMF(x1…,xN)=(1….)(1…)(1…)
(1)
When transferring an image, sometimes transmission problems cause a signal to spike, resulting in one of the three point scalars transmitting an incorrect value.This type of transmission error is called “salt and
pepper” noise due to the bright and dark spots thatappear on the image as a result of the noise. The ratio
of incorrectly transmitted points to the total number of points is referred to as the noise composition of theimage. The goal of a noise removal filter is to take acorrupted image as input and produce an estimationof the original with no foreknowledge of the noisecomposition of the image.
7/27/2019 The Component Median Filter for Noise Removal in Digital Images
http://slidepdf.com/reader/full/the-component-median-filter-for-noise-removal-in-digital-images 2/7
International Journal of Engineering Trends and Technology (IJETT) - Volume4Issue5- May 2013
ISSN: 2231-5381 http://www.ijettjournal.org Page 1831
2. NOISE REMOVAL IN DIGITAL
IMAGES
The input to the filter is 3*3 sized mask noisyimages. In the next step it is applied to a respectivefilter. By simulation we get the output of the filter isnoise eliminated image.
Fig.1: Block Diagram
2.1 Noise Types
In common use the word noise meansunwanted sound or noise pollution. In electronicsnoise can refer to the electronic signal correspondingto acoustic noise (in an audio system) or theelectronic signal corresponding to the (visual) noisecommonly seen as 'snow' on a degraded television or video image. In signal processing or computing it can
be considered data without meaning; that is, data thatis not being used to transmit a signal, but is simply
produced as an unwanted by-product of other activities. In Information Theory, however, noise isstill considered to be information. In a broader sense,film grain or even advertisements in web pages can
be considered noise.
Noise can block, distort, or change themeaning of a message in both human and electroniccommunication. In many of these areas, the specialcase of thermal noise arises, which sets afundamental lower limit to what can be measured or signaled and is related to basic physical processes atthe molecular level described by well known simpleformulae.
2.1.1 Types of noise
1) Salt & Pepper: As the name suggests, thisnoise looks like salt and pepper. It gives theeffect of "On and off" pixels.
2) Gaussian: This is Gaussian White Noise. Itrequires mean and variance as the additionalinputs.
3) Poisson: Poisson noise is not an artificialnoise. It is a type of noise which is added
from the data instead of adding artificialnoise to the data.
4) Speckle: It is a type of multiplicative noise.
It is added to the image using the equationJ=I+n*I, where n is uniformly distributed random noise with mean 0 and variance V.
Noise can generally be grouped in two classes:1) independent noise, and 2) Noise which is dependent on the image data.
Image independent noise can often be described byan additive noise model, where the recorded image
f(i,j) is the sum of the true image s(i,j) and the noisen(i,j):
(
,
) =
(
,
) +
(
,
)
(2)
The noise n(i,j) is often zero-mean and described byits variance . The impact of the noise on the image isoften described by the signal to noise ratio (SNR),which is given by
= = − 1(3)
Where and are the variances of the true image
and the recorded image, respectively.
In many cases, additive noise is evenly
distributed over the frequency domain (i.e. whitenoise), whereas an image contains mostly lowfrequency information. Hence, the noise is dominantfor high frequencies and its effects can be reduced using some kind of low pass filter. This can be doneeither with a frequency filter or with a spatial filter.(Often a spatial filter is preferable, as it iscomputationally less expensive than a frequencyfilter.)
In the second case of data dependent noise,(e.g. arising when monochromatic radiation isscattered from a surface whose roughness is of theorder of a wavelength, causing wave interference
which results in image speckle), it can be possible tomodel noise with a multiplicative, or non-linear,model. These models are mathematically morecomplicated, hence, if possible, the noise is assumed to be data independent.
2.2 Salt and Pepper Noise
Another common form of noise is data drop-outnoise (commonly referred to as intensity spikes,speckle or salt and pepper noise). Here, the noise iscaused by errors in the data transmission. The
7/27/2019 The Component Median Filter for Noise Removal in Digital Images
http://slidepdf.com/reader/full/the-component-median-filter-for-noise-removal-in-digital-images 3/7
International Journal of Engineering Trends and Technology (IJETT) - Volume4Issue5- May 2013
ISSN: 2231-5381 http://www.ijettjournal.org Page 1832
corrupted pixels are either set to the maximum value(which looks like snow in the image) or have single
bits flipped over. In some cases, single pixels are set
alternatively to zero or to the maximum value, givingthe image a `salt and pepper' like appearance.Unaffected pixels always remain unchanged. Thenoise is usually quantified by the percentage of pixelswhich are corrupted.
3. IMAGE ENHANCEMENT IN THE
SPATIAL DOMAIN
The principal objective of enhancement is to processan image so that the result is more suitable than theoriginal image for a specific application.
Image enhancement approaches fall into two broad categories: spatial domain methods[1] and frequency domain methods. The term spatial domainrefers to the image plane itself, and approaches in thiscategory are based on direct manipulation of pixels inan image. Frequency domain processing techniquesare based on modifying the Fourier transform of animage. Enhancement techniques based on variouscombinations of methods from these two categoriesare not unusual. Visual evaluation of image quality isa highly subjective process, thus making thedefinition of a “good image” an elusive standard bywhich to compare algorithm performance.
The term spatial domain refers to theaggregate of pixels composing an image. Spatialdomain methods are procedures that operate directlyon these pixels. Spatial domain processes will bedenoted by the expression
g (x,y)=T[f (x,y)] (4)
Where f (x,y) is the input image, g (x,y) isthe processed image, and T is an operator on f,defined over some neighborhood of (x,y). In addition,T can operate on a set of input images, such as
performing the pixel-by- pixel sum of K images for
noise reduction.
The principle approach in defining aneighborhood about a point (x,y) is to use a square or rectangular sub image area centered at (x,y). Thecenter of the sub image is moved from pixel to pixelstarting, say, at the top left corner. The operator T isapplied at each location (x,y) to yield the output, g, atthat location. The process utilizes only the pixels inthe area of the image spanned by the neighborhood.Although other neighborhood shapes, such asapproximations to a circle, sometimes are used,
square and rectangular arrays are by far the most predominant because of their ease of implementation.
The simplest form of T is when theneighborhood is of size of 1X1 (that is, a single pixel). In this case, g depends only on the value of f at (x,y), and T becomes a gray level ( also called anintensity or mapping) transformation function of theform
s = T(r) (5)
Where, for simplicity in notation, r and s arevariables denoting, respectively, the gray level of f (x,y) and g (x,y) at any point (x,y). For example, if T(r) has the form shown in Fig.(a), the effect of thistransformation would be to produce an image of higher contrast than the original by darkening the
levels below m and brightening the levels above m inthe original image. In this technique, known ascontrast stretching, the values of r below m arecompressed by the transformation function into anarrow range of s, toward black. The opposite effecttakes place for values of r above m. In the limitingcase shown in Fig.(b), T (r) produces a two-level(binary) image. A mapping of this form is called athresholding function. Some fairly simple, yet
powerful, processing approaches can be formulated with gray-level transformations. Becauseenhancement at any point in an image depends onlyon the gray level at that point, techniques in this
category often are referred to as point processing.
Larger neighborhoods allow considerable moreflexibility. The general approach is to use a functionof the values of f in a predefined neighborhood of (x,y) to determine the values of g at (x, y). One of the
principle approaches in this formulation is based onthe use of so-called masks (also referred to as filters,kernels, templates, or windows). Basically, a mask isa small (say, 3X3) 2-D array, in which the values of mask coefficients determine the nature of the process,such as image sharpening. Enhancement techniques
based on this type of approach often are referred to asmask processing or filtering.
3.1 Local enhancement
The two histogram processing methods discussed inthe previous two sections are global in the sense that
pixels are modified by a transformation function based on the gray-level distribution over an entireimage. Although this global approach is suitable for overall enhancement, it is often necessary to enhancedetails small over small areas. The number of pixelsin these areas may have negligible influence on thecomputation of a global transformation, so the use of
7/27/2019 The Component Median Filter for Noise Removal in Digital Images
http://slidepdf.com/reader/full/the-component-median-filter-for-noise-removal-in-digital-images 4/7
International Journal of Engineering Trends and Technology (IJETT) - Volume4Issue5- May 2013
ISSN: 2231-5381 http://www.ijettjournal.org Page 1833
this type of transformation does not necessarilyguarantee the desired local enhancement. Thesolution is to devise transformation functions based
on the gray-level distribution or other properties inthe neighborhood of every pixel in the image. Wediscuss local histogram processing here for the sakeof clarity and continuity.
The histogram processing techniques previouslydescribed are easily adaptable to local enhancement.The procedure is to define a square or rectangular neighborhood and move the centre of this area from
pixel to pixel. At each location, the histogram of the points in the neighborhood is computed and either ahistogram equalization or histogram specificationtransformation function is obtained. This function isfinally used to map the gray level of the pixel
centered in the neighborhood. The centre of theneighborhood region is then moved to an adjacent
pixel location and the procedure is repeated. Sinceonly one new row or column of the neighborhood changes during a pixel-to-pixel translation of theregion, updating the histogram obtained in the
previous location with the new data introduced ateach motion step is possible. This approach hasobvious advantages over repeatedly computing thehistogram over all pixels in the neighborhood regioneach time the region is moved pixel location. Another approach often used to reduce computation is toutilize non-overlapping regions, but this method
usually produces an undesirable checkerboard effect.
3.2 Enhancement Using Arithmetic/Logic
Operations
Arithmetic/Logic operations involving images are performed on a pixel-by-pixel basis between two or more images (this excludes the logic operation NOT,which is performed on a single image). As anexample, subtraction of two images results in a newimage whose pixel at coordinates (x, y) is thedifference between the pixels in that same location inthe two images being subtracted. Depending on the
hardware and/or software being used, the actualmechanics of implementing arithmetic/logicoperations can be done sequentially, one pixel at atime, or in parallel, where all operations are
performed simultaneously.
Logic operations similarly operate on a pixel-by-pixel basis. We need only be concerned withthe ability to implement the AND, OR and NOTlogic operators because these three operators arefunctionally complete. In other words, any other logicoperator can be implemented by using only thesethree basic functions. When dealing with logic
operations on gray-scale images, pixel values are processed as strings of binary numbers. For example, performing the NOT operation on a black, 8-bit pixel
(a string of eight 0’s) produces a white pixel (a stringof eight 1’s). Intermediate values are processed thesame way, changing all1’s to 0’s and vice versa.Thus, the NOT logic operator performs the samefunction as the negative transformation. The AND or OR operations are used for masking; that is, for selecting sub images in an image. In the AND and OR image masks, light represents a binary 1 and dark represents a binary 0. Masking sometimes is referred to as region of interest (ROI) processing. In terms of enhancement, masking is used primarily to isolate anarea for processing. This is done to highlight that areaand differentiate it from the rest of the image. Logicoperations also are used frequently in conjunctionwith morphological operations.
Of the four arithmetic operations, subtraction and addition (in that order) are the most useful for imageenhancement. We consider division of two imagessimply as multiplication of one image by thereciprocal of the other. Aside from the obviousoperation of multiplying an image by a constant toincrease its average gray level, image multiplicationfinds use in enhancement primarily as a maskingoperation that is more general than the logical masksdiscussed in the previous paragraph. In other words,multiplication of one image by another can be used to
implement gray-level, rather than binary, masks.
4. COMPONENT MEDIAN FILTER
The Component Median Filter [3] also relies on thestatistical median concept. In the Simple MedianFilter, each point in the signal is converted to a singlemagnitude. In the Component Median Filter eachscalar component is treated independently. A filter mask is placed over a point in the signal. For eachcomponent of each point under the mask, a singlemedian component is determined.
These components are then combined toform a new point, which is then used to represent the
point in the signal studied. When working with color images, however, this filter regularly outperforms theSimple Median Filter. When noise affects a point in agrayscale image, the result is called “salt and pepper”noise. In color images, this property of “salt and
pepper” noise is typical of noise models where onlyone scalar value of a point is affected. For this noisemodel, the Component Median Filter is moreaccurate than the Simple Median Filter. Thedisadvantage of this filter is that it will create a new
7/27/2019 The Component Median Filter for Noise Removal in Digital Images
http://slidepdf.com/reader/full/the-component-median-filter-for-noise-removal-in-digital-images 5/7
International Journal of Engineering Trends and Technology (IJETT) - Volume4Issue5- May 2013
ISSN: 2231-5381 http://www.ijettjournal.org Page 1834
signal point that did not exist in the original signal,which may be undesirable in some applications.
(,…..,) = ∑ (6)
4.1 Algorithm of Component Median Filter
Step 1: Select a noisy image.Step 2: If the noisy image is color, separate each
plane using MATLAB commands.Step 2(a): Each scalar component is treated independently.Step 3: Generate zero arrays around an image based on image mask size using pad array command.
Step 4: select 3 * 3 masks from an image and themask should be odd sized Step 5: Then sort the pixel values within the mask inascending order.Step 6: For each component of each point under themask a single median component is determined.Step 7: These components are then combined to forma new point which is then used to represent the pointin the signal studied.Step 8: Restore the output image and calculate theMean Square Error and Peak Signal to Noise Ratiovalue.
5. ESTIMATION OF QUALITY OFRECONSTRUCTED IMAGES.
5.1 Mean Square Error (MSE)
In statistics and signal processing, a Meansquare error (MSE) estimator describes the approachwhich minimizes the mean square error (MSE),which is a common measure of estimator quality.
Let X is an unknown random variable, and let Y be a known random variable (the measurement).
An estimator is any function of the
measurement Y, and its MSE is given by
= − (7) Where the expectation is taken over both X
and Y.
The MSE estimator is then defined as theestimator achieving minimal MSE. In many cases, itis not possible to determine a closed form for theMMSE estimator. In these cases, one possibility is toseek the technique minimizing the MSE within a
particular class, such as the class of linear estimators.
The linear MSE estimator is the estimator achievingminimum MSE among all estimators of the form AY+ b. If the measurement Y is a random vector, A is a
matrix and b is a vector. (Such an estimator would more correctly be termed an affine MSE estimator, but the term linear estimator is widely used.
5.2 Root Mean Square Error (RMSE)
In mathematics, the root mean square (abbreviated RMS or rms), also known as the quadratic mean, is astatistical measure of the magnitude of a varyingquantity. It is especially useful when variations are
positive and negative, e.g., sinusoidal. RMS is used in various fields, including electrical engineering; oneof the more prominent uses of RMS is in the field of
signal amplifiers.
It can be calculated for a series of discretevalues or for a continuously varying function. Thename comes from the fact that it is the square root of the mean of the squares of the values. It is a specialcase of the generalized mean with the exponent p = 2.
The RMS value of a set of values (or acontinuous-time waveform) is the square root of thearithmetic mean (average) of the squares of theoriginal values (or the square of the function thatdefines the continuous waveform).
In the case of a set of n values,{,,…,}the RMS value is given by:
= ++………+ (8) The corresponding formula for a continuous function
(or waveform) f(t) defined over the interval ≤ ≤ is
=
∫[
(
)]
(9)
And the RMS for a function over all time is
= lim→ ∫ [ ()] (10) The RMS over all time of a periodic function is
equal to the RMS of one period of the function. TheRMS value of a continuous function or signal can beapproximated by taking the RMS of a series of equally spaced samples.
7/27/2019 The Component Median Filter for Noise Removal in Digital Images
http://slidepdf.com/reader/full/the-component-median-filter-for-noise-removal-in-digital-images 6/7
International Journal of Engineering Trends and Technology (IJETT) - Volume4Issue5- May 2013
ISSN: 2231-5381 http://www.ijettjournal.org Page 1835
5.3 Peak to Signal Noise Ratio (PSNR)
The phrase peak signal-to-noise ratio, often
abbreviated PSNR, is an engineering term for theratio between the maximum possible power of asignal and the (or codec type) and same content.
It is most easily defined via the mean squareerror (MSE) which for two m×n monochrome imagesI and K where one of the images is considered anoisy approximation of the other is defined as:
=∑ ∑ [(, ) −(, )] (11)
The PSNR is defined as:
=10.log
=20.log √ (12) Here, MAXI is the maximum possible pixel
value of the image. When the pixels are represented using 8 bits per sample, this is 255. More generally,when samples are represented using linear PCM withB bits per sample, MAXI is 2B−1. For color images
with three RGB values per pixel, the definition of PSNR is the same except the MSE is the sum over allsquared value differences divided by image size and
by three.
Typical values for the PSNR in lossy imageand video compression are between 30 and 50 dB,where higher is better. Acceptable values for wirelesstransmission quality loss are considered to be about20 dB to 25 dB. When the two images are identicalthe MSE will be equal to zero, resulting in an infinitePSNR.
6. SIMULATION AND RESULTS
The original image is generally is to be corrupted
by adding the noise to it in order to get the noisyimage. Filtering technique is applied to the noisyimage to obtain the noise eliminated image.
6.1 Images
Fig.2: Original image.
Fig.3: Noise corrupted image.
Fig.4: Noise removed image.
6.2 Results
The results are obtained by calculating the MeanSquare Error performance, Peak Signal to NoiseRatio performance and Peak Signal to Noise Ratio
performance. These values are to be obtained for Gaussian noise, salt and pepper noise, Speckle noise.Gaussian noise corrupted images have better PSNR.
7/27/2019 The Component Median Filter for Noise Removal in Digital Images
http://slidepdf.com/reader/full/the-component-median-filter-for-noise-removal-in-digital-images 7/7
International Journal of Engineering Trends and Technology (IJETT) - Volume4Issue5- May 2013
ISSN: 2231-5381 http://www.ijettjournal.org Page 1836
Fig.5: Mean Square Error performance.
Fig.6: Peak Signal to Noise Ratio performance.
Fig.7: Root Mean Square Error to Noise Ratio performance
7. Conclusion
We have introduced Component Median
Filter for removing impulse noise from images and shown how they compare to four well-knowntechniques for noise removal. In the comparison of noise removal filters, it was concluded thatComponent Median Filter performed the best overallnoise compositions tested. By using the quantitativeanalysis we proved that most of the in noise digitalimages is removed with component median filter.
8. References
[1] R.Nathan,” Spatial Frequency Filtering,” inPicture Processing and Psychopictrotics,B.S
.Lipkin and A.Roswnfeld,Eds., AcademicPress, New York.
[2] G.A.Mastin ,” Adaptive Filters for DigitalImage Noise Smoothing : An Evaluation,“Computer Vision, Graphics , and ImageProcessing.
[3] T.A.Nodes and N.C.Gallagher , Jr.,” MedianFilters : Some Manipulations and Their Properties,”IEEE Trans. Acoustics, Speech,and Signal Processing.
[4] “Digital image processing” by Rafael C.Gonzalez and Richard E.Woods.
[5] “Digital image restoration” by Andrews and
Hunt.[6] “Digital image processing” by B.Chandaand D.Dutta Majumder.