25.01.2014 Views

a morphological approach to remove salt and pepper noise in images

a morphological approach to remove salt and pepper noise in images

a morphological approach to remove salt and pepper noise in images

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Arav<strong>in</strong>th Ch<strong>in</strong>napalanichamy et al ,Int.J.Computer Technology & Applications,Vol 3 (6), 1875-1880<br />

ISSN:2229-6093<br />

<br />

If f(x, y) =0, first all H values equal <strong>to</strong> zero are<br />

changed <strong>to</strong> 1 <strong>and</strong> then all the other values are<br />

changed <strong>to</strong> 0. The order <strong>in</strong> which the values are<br />

changed is important <strong>in</strong> this case.<br />

If f(x, y) =255, then all the H values equal <strong>to</strong> 255<br />

are changed <strong>to</strong> 1 <strong>and</strong> all the other values are<br />

changed <strong>to</strong> 0.<br />

3. All the above conditions <strong>and</strong> change of values are done<br />

only <strong>to</strong> facilitate f<strong>in</strong>d<strong>in</strong>g the connectivity between<br />

pixels. The 4- connectivity between foreground pixels<br />

(value 1) <strong>in</strong> matrix H is found (i.e.) no of adjacent<br />

pixels (N) connected <strong>to</strong> the centre pixel is counted.<br />

4. If this number (N) is greater than a particular value,<br />

say A, then the process<strong>in</strong>g pixel is said <strong>to</strong> be <strong>noise</strong> free.<br />

If it is less than A, then it is <strong>noise</strong>. The value A<br />

depends on the mask size. For a mask of size( 2k+1 x<br />

2k+1 ), the m<strong>in</strong>imum no of pixels that should be<br />

connected <strong>to</strong>gether so that the centre pixel is <strong>noise</strong> free<br />

is (k+1)*(2k+1)<br />

f(x, y) = <strong>noise</strong>free, N > A<br />

<strong>noise</strong>, N ≤ A<br />

were N is te maximum no of adjacent pixels connected<br />

<strong>to</strong> centre pixel based on 4 − connectivity <strong>and</strong> A =<br />

k + 1 ∗ (2k + 1)<br />

the median of those values are calculated <strong>and</strong> that median<br />

value replaces f(x, y). The steps of phase 2 is shown <strong>in</strong> Fig.2<br />

1. For a mask of size (2k+1 x 2k+1), the follow<strong>in</strong>g values<br />

are extracted.<br />

f ′ = f(x + s, y + t)<br />

were s, t = 0 <strong>to</strong> 1<br />

2. The values other than 0 <strong>and</strong> 255 are found <strong>in</strong> f’. Then<br />

the median of those values is calculated which <strong>in</strong> turn is<br />

the estimated correct value.<br />

f x, y = med(f ′ f ′ ≠ 0 255<br />

3. If all the values of f’ are either 0 or 255, then the upper<br />

limit of s<strong>and</strong> t is <strong>in</strong>cremented by 1. If still the function<br />

f’ has no values other than 0 <strong>and</strong> 255, then the limit is<br />

aga<strong>in</strong> <strong>in</strong>cremented by 1 <strong>and</strong> this <strong>in</strong>crement happens till<br />

K.<br />

f ′ = f(x + s, y + t)<br />

were s, t = 0 <strong>to</strong> p, p = 0,1, … k<br />

And f x, y = med(f ′ f ′ ≠ 0 255 .<br />

4. PHASE 2- NOISE REMOVAL USING<br />

MEDIAN FILTER OF VARYING MASK<br />

SIZE<br />

Once the pixel has been identified as <strong>noise</strong>, then it is<br />

replaced with an estimated value of the correct <strong>in</strong>tensity level.<br />

From the G matrix, certa<strong>in</strong> elements are extracted <strong>and</strong> then<br />

5. EXPERIMENTAL RESULTS<br />

Simulations are done on various st<strong>and</strong>ard <strong>images</strong> at<br />

different <strong>noise</strong> levels. The performance of this scheme is<br />

measured by us<strong>in</strong>g the parameter PSNR <strong>and</strong> compared with<br />

the PSNR values of other methods <strong>and</strong> is shown that our<br />

method is superior <strong>to</strong> other methods.<br />

The st<strong>and</strong>ard <strong>images</strong> chosen for test<strong>in</strong>g are Lena, Boat <strong>and</strong><br />

gold hill. All the <strong>images</strong> are 8 bit gray scale <strong>images</strong> with size<br />

512x512. The mask size is chosen accord<strong>in</strong>gly <strong>to</strong> the <strong>noise</strong><br />

density level. For <strong>in</strong>stance, while test<strong>in</strong>g with Lena image<br />

corrupted by impulse <strong>noise</strong> level of 70%, the mask size<br />

chosen is 5x5. This implies that the value of K is 2. Further<br />

while identify<strong>in</strong>g a noisy pixel <strong>in</strong> sub stage 2, the value of A is<br />

set as 15. While process<strong>in</strong>g a particular pixel of the image, if<br />

IJCTA | Nov-Dec 2012<br />

Available onl<strong>in</strong>e@www.ijcta.com<br />

1878

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!