# COLORED neural networks, full-color image processing, image

COLORED IMAGE RESTORATION USING

NEIGHBORING PIXEL METHOD

Nazia Hossain

Department of CSE

Military Institute of Science

and Technology, Dhaka, Bangladesh

[email protected]

Amdadul Haque

Department of CSE

Military Institute of Science

and Technology, Dhaka, Bangladesh

[email protected]

Naresh Sing Chauhan

Department of CSE

Military Institute of Science

and Technology, Dhaka, Bangladesh

[email protected]

Abstract—The field of image processing is evolving rapidly.

During the recent years, there has been a significant improvement

in the level of interest in image processing algorithm for

image restoration, image registration, image morphology, neural

networks, full-color image processing, image data compression,

image recognition and knowledge-based image analysis systems.

An image can be corrupted by various kind of motion, noise or

distorted signal during the process of acquisition and to detect

the reason for distorting an image various method of restoration

has been introduced in image processing. To restore a corrupted

image there are number of methods have been introduced in

this eld including neighboring pixel method. Under this context,

an effort has been given to restore a corrupted image with the

neighborhood pixel method using mean value. We calculated the

mean values of neighbor pixel and replaces the mean values

with the target pixel of input image. We investigated the noise

level of RGB and grayscale images and improved the noise level

using neighboring pixel method that enhances the target image

comparing with existing noise reduction filters.

Index Terms—Image processing, Neighboring Pixel, Image

Restoration, Noise Reduction

I. INTRODUCTION

In imaging science and computer vision, image processing

is a technical analysis of the complex aspects of an image,

deploying algorithms in which the input is an image, such as

a photograph or video frame; the output of image processing

may be either an image or a set of characteristics or parameters

related to the image. Worldwide the eld of image processing

is growing rapidly.

An image is a visual representation of something. In information

technology, the term has several usages:

i. An image is a picture that has been created or copied and

stored in electronic form. An image can be described in terms

of vector graphics or raster graphics.

ii. An image is a section of random access memory ( RAM

) that has been copied to another memory or storage location.

A digital image is a representation of a two-dimensional

image as a finite set of digital values, called picture elements

or pixels. Pixel values typically represent gray levels, colors,

heights, opacities etc. Digitization implies that a digital image

is an approximation of a real scene.

Pixel is the basic unit of a digital image which is also known

as picture element. Pixel describes programmable color on a

computer display of each point of an image.In digital imaging,

a pixel, or picture element is a physical point in a raster

image, or the smallest addressable element in an all points

addressable display device.In color image systems, a color is

typically represented by three component intensities such as

red, green, and blue.

An image can be corrupted by various kind of motion, noise

or signal during the process of acquisition. To detect this motion

or noise in the picture various method of restoration has

been introduced in image processing 7. In general, the noise

in the image is defined by the regions which are remarkably

different i.e. darker or shiner comparing with the pixel with

the neighboring pixels. To overcome this problem author rstly,

focused on the causes of blur or corrupted image, among

various method of restoration, emphasizes the neighboring

pixel method, developed an algorithm for the restoration of

an image by using distance transformation and mean method.

Image processing is a method which includes some operations

applying in any image in order to get an enhanced image

or to extract some useful information from it. Image processing

7 refers to the analysis and manipulation of a digitized image,

especially in order to improve its quality.

Digital Image is a two-dimensional function x and y are

spatial coordinates. The amplitude of f(x,y) is called intensity

or gray level at the point (x,y).

Image processing refers to the analysis and manipulation of

a digitized image, especially in order to improve its quality.

The Author emphasizes on solving identification problems

primarily noticed in forensic medicine, or in the creation of

weather maps from satellite images. The bitmapped graphics

format images that have been scanned in or shot with digital

cameras – which is used to deal with the reconstruction or

enhancement of the uncorrupted image from a noisy one.

A good number of filtering schemes such as Wiener filter4,

Bilateral filter 12, Bayseian based iterative method 10 are

developed over time for noise reduction and image restoration.

The Median filter 2 is one the filtering schemes that are

widely used for noise reduction and also have applications in

digital signal processing.

The main objective of this paper is to introduce an approach

for image restoration, whose main aim is to make an image

noise-free. The entire paper is organized in the following sequence.

In section-1, Literature review about image restoration

has been proposed. In section-2, the nearest neighbour method

and mean method including algorithm has been introduced.

In section-3, the result obtained for the implementation of

algorithm in MATLAB has been presented with analysis.

Finally, the paper concludes with conclusion and references.

II. RELATED WORK

Images can be corrupted for various reasons such as motion

blur, noise, and camera misfocus. To improve the quality of a

degraded image, restoration has to be done. Image restoration

is the task of minimizing the degradation in an image i.e. to remove

the noise or motion blur. Image restoration assures good

insights of image when it is subjected to further techniques of

image processing7.

Image restoration refers to remove motion or distortion from

image and get an improved quality of that defected image.

Images are often degraded during the data acquisition process.

The degradation may involve blurring,information loss due to

sampling, quantization effects, and various sources of noise.

Therefore, the purpose of image restoration is to estimate the

original image from the degraded data. Applications of image

restoration5. are needed in various sector like from medical

imaging, astronomical imaging,to forensic science, etc. Often

the benefits of improving image quality to the maximum

possible extent far out weight the cost and complexity of the

restoration algorithms involved 1.

Lee and Jong-Sen6 described Computational techniques

on 2D image arrays that are developed on the basis of

images’ local mean and variance to contrast enhancement and

noise filtering. They rely on nor-recursive algorithms and did

not use any kind of image transform. The proposed method

is obvious in real-time image processing applications with

parallel processing.

An algorithm in MATLAB which is based on the neighborhood

property of a pixel. We focus on a certain iterative

process to carry out restoration. One such method described in

this regard is the Mr. JAGADISH H. PUJAR and Mr.KIRAN

S. KUNNUR proposed an image restoration Nearest Neighbourhood

Method 5.

E.P. Simoncelli, E.H. Adelson11 introduces a method

which is a classical solution to the noise removal problem is

the Wiener filter, which utilizes the second-order statistics of

the Fourier decomposition. Authors developed an extension

of the Wiener solution which is a Bayesian estimator that

performs a “coring” operation, and a simple model of the

subband statistics to develop a semi-blind noise removal

algorithm which relies on a steerable wavelet pyramid.

K. Miyata, N. Tsumura, H Haneishi and Y Miyake 8

proposed a Wiener filtering method that can improve the

total quality of images corrupted by additive noise without

degrading the sharpness caused by the noise reduction process.

They observed covariance matrices of the images are estimated

from the neighboring pixels which are selected around the

current pixel with a color classification technique.

Nowak, Robert D proposed a novel wavelet-domain noise

reduction procedure that is diversified to variations in signal

and to the noise. It is believed that magnetic resonance and

magnitude image data follows a Rician distribution 9. The

Rician noise is troublesome in low Signal to Noise Ratio

(SNR) domain to which it creates random fluctuations but

reduces noise. In that work, authors studied and proposed a

method for Rician noise removal.

Statistical data analysis also helps to remove noise from

target images. Garnett, Roman and Huegerich, Timothy and

Chui, Charles and He, Wenjie introduced image statistic that

identifies noise pixels with impulse noise of random values of

image pixels 3. They quantify intensity differentiation from

neighbor pixels, demonstrated how proposed image statistic

can be introduced to remove additive Gaussian noise and

capable to reduce both Gaussian and impulse noises effectively

from the noisy images.

III. PROPOSED WORK

Digital Image processing stems from various tasks of practical

techniques such as Classification, Feature extraction,

Multi-scale signal analysis, Pattern recognition and Projection

and these tasks are almost impossible to solve efficiently using

analog apparatus methods. To restore noisy image many filters

have been proposed like Guided filter, Gaussian filter, Wiener

filter and Median filters are some of the restoration techniques.

We have deviced a new approach to restore a RGB image using

Neighboring Piexl with mean method.

A noisy RGB image was taken as input and calculated its

noise in MATLAB. Then we have taken the nearest neighbor

pixels, 8 for 3×3 matrix and extracted a submatrix of each

pixel. Calculate the mean of submatrix for each pixel. Then replace

the center pixel with the mean of its neighboring pixels.

Using an iterative process each pixel has been considered and

traversed. After the whole traversal, we have got our desired

output image.Then we again calculate the noise of restored

image and compare it with previous noise.

We developed a prototype using Matlab. The entire process

has been represented in Fig. 1. Sample images are collected

from Wikipedia images.

A. Image Acquisition

There are some fundamental steps of image processing. Image

Acquisition is the first step or process of the fundamental

steps of digital image processing. Image acquisition could be

as simple as being given an image that is already in digital

form. If not we can easily convert it to digital form. Generally,

the image acquisition stage involves preprocessing. In our

method we take a noisy RGB image as input for restoration

and calculated its noise in MATLAB.

element m¯ j is the mean value of the N observations of the

J

th variable:

m¯ j =

1

N

X

N

i=1

mi,j j = 1, …, K (1)

Thus, the sample mean vector contains the average of the

observations for each variable, and is written as:

m¯ =

1

N

X

N

i=1

mi =

?

?????????????

m¯ 1

.

.

.

m¯ j

.

.

.

m¯ K

?

?????????????

(2)

E. Pixel Replacement

Above mentioned, to carry out restoration, we consider

the mean of nearest neighbours of a pixel. In our approach,

we consider a 3×3 matrix, total of eight neighbours of each

pixel.The size of the window can be more than 3×3 too. In the

2D grid of picture, each pixel has a certain correlation with

its nearest pixels. With the aid of this property, we introduce a

method to replace a noisy pixel by a value which happens to

be the mean of all the nearest neighbors in a filtering window

of 3×3. This ensures a good level of noise reduction from

image as shown in the results.

IV. RESULT ANALYSIS

Image Restoration is the operation of taking a corrupted or

noisy image and estimating the clean, original image in which

the input is an image, such as a photograph or video frame;

the output of image processing may be either an image or a

set of characteristics or parameters related to the image. Our

approach was applied on both a noisy RGB image and a noisy

grayscale images and obtained much better result comparing

other noise removal schemes.

Fig. 4: Noisy Image vs Restored Image.

In Fig-4, the input image is a noisy image which has some

degree of noise density in it and the restored image each

corrupt pixel is replaced by the mean value of its neighbours.

We tested on several standard test images and the above result

was obtained for the image which is corrupted by noise. As

a result of this, the above result was obtained for mean of

neighboring pixel i.e. for a given pixel at (i,j), all the eight

neighbours of it are taken into account for restoring a pixel at

(i,j).

Fig. 5: Noise after applying different filters for RGB image

The bar graphs comparison of resulted noise for an RGB

image after applying different image restoration techniques

i.e. Guided filter, Gaussian filter. It can be clearly seen

that the amount of noise reduced by proposed method is

significantly high. In original image, amount of noise calculated

approximately 4×10?3 using available noise estimation

routine. Guided filter, Gaussian filter remove the noise at

approximately 2×10?3

and proposed method reduce the noise

significantly to 1×10?3

, that is, proposed method reduces noise

by 79% of original noise.

Restoration

Method

Image

Format

Original

Noise

Resulted

Noise

Reduction

Rate

Guided filter RGB 3.9×10?3 2.3×10?3 41%

Gaussian filter RGB 3.9×10?3 1.9×10?3 51%

Wiener filter RGB N/A N/A N/A

Median filter RGB N/A N/A N/A

Proposed

Method*

RGB 3.9×10?3 0.8×10?3 79%

TABLE I: Noise level for different Filters using RGB image.

We could not calculate noise level of Wiener filter and

Median filter as mentioned in table by N/A.

Fig. 6: Noise after applying different filters for grayscale image

We experimented different filters like Guided filter, Gaussian

filter, Wiener filter, Median filters for grayscale images as

well and proposed method outperformed the mentioned noise

removal techniques. Initial noise level observed in original

image is approximately 0.03 and mentioned filters the remove

noise level whereas best output obtained by Median filter.

However, the proposed method reduces the noise level to

0.004. The result obtained is shown in both Table-1 and Fig.

6, that is proposed method reduces 85% of the noise from

original image.

Restoration

Method

Image

Format

Original

Noise

Resulted

Noise

Reduction

Rate

Guided filter RGB 0.027 0.017 37%

Gaussian filter RGB 0.027 0.013 51%

Wiener filter RGB 0.027 0.008 70%

Median filter RGB 0.027 0.006 77%

Proposed

Method*

RGB 0.027 0.004 85%

TABLE II: Noise level for different Filters using Grayscale

image.

V. CONCLUSION AND FUTURE WORK

In this work, we mainly focused nearest neighborhood pixel

and mean method. The algorithm combining these methods are

able to restore the image to a significant level. We take a sub

matrix of 3/3 and calculate the mean of the sub matrix. Then

replace the center pixel with the mean of neighboring pixels.

The restored image obtained after performing these steps are

of much better.

However, using proposed method pixels at the boundary

cannot be considered as the center pixels. As a result, after

applying the proposed technique the given image holds noise

or blur at the edges. Therefore, boundaries noise cannot be

reduced as desired an in future that could be focused on.

For the further enhancement of image, various feature

detection method like edge detection methods like sobel edge

detection technique or various filtering can be applied and used

on the basis of efficiency to remove the noise completely at

the edges and boundaries of the pictures.

REFERENCES

1 Mark R Banham and Aggelos K Katsaggelos. “Digital

image restoration”. In: IEEE signal processing magazine

14.2 (1997), pp. 24–41.

2 Tao Chen, Kai-Kuang Ma, and Li-Hui Chen. “Tri-state

median filter for image denoising”. In: IEEE Transactions

on Image processing 8.12 (1999), pp. 1834–1838.

3 Roman Garnett et al. “A universal noise removal algorithm

with an impulse detector”. In: IEEE Transactions

on image processing 14.11 (2005), pp. 1747–1754.

4 Allen D Hillery and Roland T Chin. “Iterative Wiener

filters for image restoration”. In: IEEE Transactions on

Signal Processing 39.8 (1991), pp. 1892–1899.

5 H PUJAR JAGADISH et al. “A novel approach for

image restoration via nearest neighbour method”. In:

Journal of Theoretical and Applied Information Technology

14.2 (2010).

6 Jong-Sen Lee. “Digital image enhancement and noise

filtering by use of local statistics”. In: IEEE transactions

on pattern analysis and machine intelligence 2 (1980),

pp. 165–168.

7 Robert M Lougheed. Neighborhood image processing

stage for implementing filtering operations. US Patent

4,541,116. Sept. 1985.

8 Kimiyoshi Miyata et al. “Restoration of Noisy Images

using Wiener Filters Designed in Color Space”. In: IS

AND TS PICS CONFERENCE. SOCIETY FOR IMAGING

SCIENCE & TECHNOLOGY. 2000, pp. 301–306.

9 Robert D Nowak. “Wavelet-based Rician noise removal

for magnetic resonance imaging”. In: IEEE Transactions

on Image Processing 8.10 (1999), pp. 1408–1419.

10 William Hadley Richardson. “Bayesian-based iterative

method of image restoration”. In: JOSA 62.1 (1972),

pp. 55–59.

11 Eero P Simoncelli and Edward H Adelson. “Noise

removal via Bayesian wavelet coring”. In: Image Processing,

1996. Proceedings., International Conference

on. Vol. 1. IEEE. 1996, pp. 379–382.

12 Buyue Zhang and Jan P Allebach. “Adaptive bilateral

filter for sharpness enhancement and noise removal”.

In: IEEE transactions on Image Processing 17.5 (2008),

pp. 664–678.