color image enhancement filtering techniques for ... › 4114 › 5e5c9e6ea76... · image...

6
COLOR IMAGE ENHANCEMENT FILTERING TECHNIQUES FOR AGRICULTURAL DOMAIN USING MATLAB M.A.Shaikh a , S.B.Sayyad b a Department of Electronics-Science, New Arts, Comm. & Science College, Ahmednagar, (M.S) India. [email protected] b Department of Physics, Milliya Arts, Science & Management Science College, Beed, (M.S) India. [email protected] ABSTRACT: Image enhancement is used in a verity of application for extracting the information from selected images. Image enhancement techniques provide a multitude of choices for improving the visual quality of images. Color image enhancement technique has been effective vision system for agriculture domain. It is a method for modifying images to reduce the effects of noise, blurring and distortion of the agricultural image and improve the quality of poor images. The simulation model has been developed using MATLAB to study the effect by applying filtering techniques. Adding noises like gaussian, salt and pepper in the agricultural images using successive filtering process. The histogram equalization provides level of intensity and shows image histogram. The processed image is better than the noise added image for a specific application. This simulation study is a useful and flexible approach for studying the effects of filters on agriculture domain images. KEY WORDS: Color Image Enhancement, Filter Techniques, Histogram Modelling, MATLAB. 1. INTRODUCTION Image Enhancement alters the visual impact that the image has on the interpreter in a fashion that improves the information content. Image Enhancement is the process of processing an image so that the result is more suitable than the original for a specific application [1]. Digital Image Processing refers as processing of any two-dimensional pictures by a digital computer. Digital Image Processing has broad area spectrum of applications, such as medical image processing, image transmission for business applications, optical camera images, microwave remote sensing, inspection of industrial parts and many more areas [2]. Color Image Enhancement is one of the most visually appealing areas of digital image processing. This technique has been effective vision system for agriculture domain. Color Image Enhancement is the modification of an image to alter impact on the viewer. In image enhancement the goal is to accentuate certain image features for subsequent analysis or for image display [3]. The Color Image Enhancement Filtering techniques are classified as linear filter & non-linear filter. In present work wiener filtering is used as a linear filter and median filtering as a non-linear filter [4]. Image Enhancement basically includes noise reduction from the image. Noises like Gaussian, salt and pepper adding into the agricultural images then using successive filtering process. The processed filter image can analysed with noise added image by the histogram equalization, provides level of intensity and shows image histogram. In the proposed work the simulation model has been developed using MATLAB Version 8.03 (R2014a) software to study the effect by applying above filtering techniques, comparing which filtering technique is better for noise removal and for improving the quality of image. The main objective of proposed work is the above filtering technique is use for removal of noise from agricultural image. 2. FILTER TECHNIQUE Image acquired by optical, electro-optical or electronic means is likely to be degraded by the sensing environment. The degradations may be in the form of sensor noise, blur due to ISRS Proceeding Papers of Sort Interactive Session ISPRS TC VIII International Symposium on “Operational Remote Sensing Applications: Opportunities, Progress and Challenges”, Hyderabad, India, December 9 – 12, 2014 No.224/ISRS Proceedings 2014/ISPRSTCVIII Mid-Symposium, Hyderabad, India

Upload: others

Post on 31-May-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: COLOR IMAGE ENHANCEMENT FILTERING TECHNIQUES FOR ... › 4114 › 5e5c9e6ea76... · Image enhancement is used in a verity of application for extracting the information from selected

COLOR IMAGE ENHANCEMENT FILTERING TECHNIQUES FOR AGRICULTURAL

DOMAIN USING MATLAB

M.A.Shaikh a, S.B.Sayyad b

a Department of Electronics-Science, New Arts, Comm. & Science College, Ahmednagar, (M.S) India.

[email protected] b Department of Physics, Milliya Arts, Science & Management Science College, Beed, (M.S) India.

[email protected]

ABSTRACT:

Image enhancement is used in a verity of application for extracting the information from selected images. Image enhancement

techniques provide a multitude of choices for improving the visual quality of images. Color image enhancement technique has been

effective vision system for agriculture domain. It is a method for modifying images to reduce the effects of noise, blurring and

distortion of the agricultural image and improve the quality of poor images. The simulation model has been developed using

MATLAB to study the effect by applying filtering techniques. Adding noises like gaussian, salt and pepper in the agricultural images

using successive filtering process. The histogram equalization provides level of intensity and shows image histogram. The processed

image is better than the noise added image for a specific application. This simulation study is a useful and flexible approach for

studying the effects of filters on agriculture domain images.

KEY WORDS: Color Image Enhancement, Filter Techniques, Histogram Modelling, MATLAB.

1. INTRODUCTION

Image Enhancement alters the visual impact that the image has

on the interpreter in a fashion that improves the information

content. Image Enhancement is the process of processing an

image so that the result is more suitable than the original for a

specific application [1]. Digital Image Processing refers as

processing of any two-dimensional pictures by a digital

computer. Digital Image Processing has broad area spectrum of

applications, such as medical image processing, image

transmission for business applications, optical camera images,

microwave remote sensing, inspection of industrial parts and

many more areas [2].

Color Image Enhancement is one of the most visually appealing

areas of digital image processing. This technique has been

effective vision system for agriculture domain. Color Image

Enhancement is the modification of an image to alter impact on

the viewer. In image enhancement the goal is to accentuate

certain image features for subsequent analysis or for image

display [3].

The Color Image Enhancement Filtering techniques are

classified as linear filter & non-linear filter. In present work

wiener filtering is used as a linear filter and median filtering as a

non-linear filter [4]. Image Enhancement basically includes

noise reduction from the image. Noises like Gaussian, salt and

pepper adding into the agricultural images then using successive

filtering process. The processed filter image can analysed with

noise added image by the histogram equalization, provides level

of intensity and shows image histogram.

In the proposed work the simulation model has been developed

using MATLAB Version 8.03 (R2014a) software to study the

effect by applying above filtering techniques, comparing which

filtering technique is better for noise removal and for improving

the quality of image. The main objective of proposed work is

the above filtering technique is use for removal of noise from

agricultural image.

2. FILTER TECHNIQUE

Image acquired by optical, electro-optical or electronic means is

likely to be degraded by the sensing environment. The

degradations may be in the form of sensor noise, blur due to

ISRS Proceeding Papers of Sort Interactive Session ISPRS TC VIII International Symposium on “Operational Remote Sensing Applications: Opportunities, Progress and Challenges”, Hyderabad, India, December 9 – 12, 2014

No.224/ISRS Proceedings 2014/ISPRSTCVIII Mid-Symposium, Hyderabad, India

Page 2: COLOR IMAGE ENHANCEMENT FILTERING TECHNIQUES FOR ... › 4114 › 5e5c9e6ea76... · Image enhancement is used in a verity of application for extracting the information from selected

camera misfocus, relative object-camera motion, random

atmospheric turbulence, and so on. Image Enhancement is

concern with filtering the observed image to minimize the effect

of degradations. The effectiveness of image enhancement filters

depends on the extent and the accuracy of the knowledge of the

degradation process as well as on the filter design criterion.

Color Image Enhancement is divided into two types i.e. linear

filtering and non-linear filtering [4].

2.1 Image Enhancement based on Linear Filtering

Wiener filter is one of the popular method of Image

Enhancement based on Linear Filter. Using this method the

presence of blur as well as noise can be removed from images.

Let u(m,n) and v(m,n) be arbitrary, zero mean, random

sequences. It is desired to obtain an estimate, û(m,n), of u(m,n)

from v(m,n) such that mean squared errror is minimised.

σ2

e=E{[u(m,n)- û(m,n)]2

} (1)

where û(m,n) is known to be the conditional mean of u(m,n)

given {v(m,n), for every (m,n)}, that is,

û(m,n)= E[u(m,n)|v(k,l), (k,l)] (2)

Equation 2 is non linear, hence it is quite difficult to solve in

genral. Therefore, it can be written as,

( , ; , ) ( . ), , -

g m n k l v k lû m n k l

(3)

Where g(m,n;k,l) is the filter impulse response determine such

that the mean square error of Eq. 1 is minimized. For

minimizations of Eq. 1 requires the orthogonality condition

given as,

E[{u(m,n)- û (m,n)}v(m’,n’)]=0, (m,n),(m’,n’)] (4)

which can be satisfied.

Using the defination of cross-correlation

rab(m,n;k,l) E[a(m,n)b(k,l)] (5)

for two the arbitrary random sequences a(m,n) and b(k.l), and

given Eq. 3 the orthogonality condition yeilds the equation,

,

( , ; , ) ( , ; ', ') ( , ; ', ')uvvv

k l

g m n k l r k l m n r m n m n

(6)

Eq.3 and Eq.6 are called wiener filter equations.

2.2 Image Enhancement based on Non-Linear Filtering

Median Filtering is a non-linear filter allows for the

preservation of image features and the removal of impulsive

noise. In this filtering the input pixel is replaced by the median

of the pixels contained in a window around the pixel, that is,

v(m,n)=median{y(m-k,n-l),(k,l) € W} (1)

Where W is a suitably chosen window. The algorithm for

median filtering requires arranging the pixel values in the

increasing or decreasing order and picking the middle value. It

is useful for removing isolated lines or pixels while preserving

spatial resolution.

Median Filters are quite popular because, for certain types of

random noise they provide excellent noise reduction capabilities

[5].

2.3 Noise Models

In digital images the major source of noise arises during image

acquisition and transmission. Images are corrupted during

transmission principally due to interference in the channel used

for transmission. The performance of imaging sensors is

affected by a variety of factors such as environmental condition

during image acquiring and by the quality of the sensing

elements. Most of the time light levels and sensor temperature

are major factors affecting the amount of noise in the resulting

image. Filters can be used for making the analysis simple, also

used to perform noise removal on images corrupted by various

sources of noise. The noise can be additive or multiplicative,

here salt and pepper and Gaussian noise are used as an additive

noise [6].

ISRS Proceeding Papers of Sort Interactive Session ISPRS TC VIII International Symposium on “Operational Remote Sensing Applications: Opportunities, Progress and Challenges”, Hyderabad, India, December 9 – 12, 2014

No.224/ISRS Proceedings 2014/ISPRSTCVIII Mid-Symposium, Hyderabad, India

Page 3: COLOR IMAGE ENHANCEMENT FILTERING TECHNIQUES FOR ... › 4114 › 5e5c9e6ea76... · Image enhancement is used in a verity of application for extracting the information from selected

2.3.1 Salt and Pepper Noise

The PDF (Probability Density Function) of impulse noise is

given by,

P(z)= Pa for z=a

P(z)= Pb for z=b

P(z)= 0 otherwise

If b>a, gray level will appear as a light dot in the image.

Conversely b>a will appear like a dark dot. If either Pa or Pb is

zero, the impulse noise is called uni-polar. If neither probability

is zero and especially if they are approximately equal impulse

noise values will resemble salt and pepper granules randomly

distributed over the image. For this reason bipolar impulse noise

is also called salt and pepper noise. Sometime the term shot and

spike noise also used to refer this type of noise.

Noise impulses can be negative or positive. The negative

impulses appear as black (pepper) points in an image. For the

same reason positive impulses appears white (salt) noise. In 8-

bit image suppose a=0 it can be considered as a black i.e.

pepper whereas b=255 is white i.e. salt.

2.3.2 Gaussian Noise

The PDF of a Gaussian random variable, z is given by,

2 2( ) /21( )

2

zp z e

(1)

Where z represents gray level,

µ is the mean of a average values of z,

σ is its standard deviation.

The standard deviation squared, σ2 is called the variance of z.

Because of its mathematical tractability in both the spatial and

frequency domains, Gaussian noise models are frequently used

in practice. In fact, this tractability is so convenient that it often

results in Gaussian models being used in situations in which

they are marginally applicable at best [5][7].

3. HISTOGRAM MODELING

Histogram modeling has been found to be one of the powerful

techniques for image enhancement. The histogram of an image

represents the relative frequency response of occurrence of the

various gray levels in the image. The image can be modifying

by using histogram modeling technique so that its histogram has

a desired shape.

3.1 Histogram Processing

The histogram of image is a graphical representation of the

tonal distribution of the gray values in a digital image The

histogram of a digital image with intensity levels in the range

[0, L – 1] is a discrete function h (rk) = nk, where rk is the kth

intensity value and nk is the number of pixels in the image with

intensity of rk. In histogram by dividing each of its components

by the total number of pixels in the image, denoted by the

product MN, where, as usual, M and N are the row and column

dimensions of the image. Thus, a normalized histogram is given

by p(rk) = nk /MN, for K = 0,1,2,……, L – 1,. The sum of all

components of a normalized histogram is equal to 1[8].

We can analyze the frequency of appearance of the different

gray levels contained in the image by viewing image’s

histogram. The agricultural image i.e. Color Bajra Crop image

as shown in figure. 1(a) [9], which is further converted into

Gray Scale image, fig. 1(b), with its histogram representation,

fig. 1(c). The pixels in the image have a wide histogram

representation indicating that the image is of a high quality.

(a) (b)

ISRS Proceeding Papers of Sort Interactive Session ISPRS TC VIII International Symposium on “Operational Remote Sensing Applications: Opportunities, Progress and Challenges”, Hyderabad, India, December 9 – 12, 2014

No.224/ISRS Proceedings 2014/ISPRSTCVIII Mid-Symposium, Hyderabad, India

Page 4: COLOR IMAGE ENHANCEMENT FILTERING TECHNIQUES FOR ... › 4114 › 5e5c9e6ea76... · Image enhancement is used in a verity of application for extracting the information from selected

(c)

Figure.1 (a) Color Image of Bajra Crop (b) Color Image converted into Gray Scale Bajra

Image (c) Histogram of Gray scale Image of Bajra Crop

3.2 Histogram Equalization

Histogram Equalization is used to enhance the contrast of the

image. There are many peaks and valleys in any images but

after equalization the peaks and valleys will be shifted. In this

technique only adds extra pixels to the light regions of the

image and removes extra pixels from dark region of the image

resulting in a high dynamic range in the output image. Thus this

technique helps to improve contrast and uniform histogram

[10].

The histogram equalization technique changes the pdf

(probability density function) of a given image into that of a

uniform pdf that spreads out from the lowest pixel value i.e. 0 to

the highest pixel value i.e. L – 1. This can be achieved quite

easily if the pdf is a continuous function. However, since we are

dealing with a digital image, the pdf will be a discrete function.

Let’s suppose we have an image x, and let the dynamic range

for the intensity rk varies from 0 (black) to L –1 (white). The pdf

of image x given as,

pdf(x) = p(rk) =total pixels with intensity rk

total pixels in image x (1)

where pdf can be approximated using the probability based on

the histogram p(rk).

4. EXPERIMENTAL RESULT

In this section Image Enhancement by using filtering techniques

can be proceed, which are classified into two types. The First

type is Linear Filtering which include; wiener filters & its

histogram processing. The second type is the non-linear filtering

which include; median filters & its histogram processing. In

both type of filtering the original color image of bajra crop as

shown in fig.1 (a) is converted into gray scale image then

further processing is done.

The figure below shows salt and pepper & Gaussian noise

added and results of Wiener Filter.

(a)

(b) (c)

(d) (e)

Figure.2 (a) Original Image (b) Image Corrupted by Salt and Pepper (c) Histogram after

Salt and Pepper Noise added (d) Result of applying Wiener Filter on Salt and Pepper

Noise (e) Histogram after Wiener Filtered

ISRS Proceeding Papers of Sort Interactive Session ISPRS TC VIII International Symposium on “Operational Remote Sensing Applications: Opportunities, Progress and Challenges”, Hyderabad, India, December 9 – 12, 2014

No.224/ISRS Proceedings 2014/ISPRSTCVIII Mid-Symposium, Hyderabad, India

Page 5: COLOR IMAGE ENHANCEMENT FILTERING TECHNIQUES FOR ... › 4114 › 5e5c9e6ea76... · Image enhancement is used in a verity of application for extracting the information from selected

In fig.2(b) Salt and Pepper Noise added into original image

fig.2(a), it was observed from the histogram after salt and

pepper noise added i.e. fig.2(c) & histogram after applying

wiener filter i.e. fig.2(e), the noise reduction was poor.

(a) (b)

(c) (d)

Figure.3 (a) Image Corrupted by Gaussian (b) Histogram after Gaussian Noise added (c)

Result of applying Wiener Filter on Gaussian Noise (d) Histogram after applying Wiener

Filtered.

In fig.3(a), Gaussian noise added into original image fig.2(a),

and fig.3(c) is the image after applying wiener filter. It was

observed that from fig.3(b), histogram after gaussian noise

added & fig.3(d), histogram after applying wiener filter, the

noise was better than salt and pepper noise reduction, but still it

was poor in noise reduction.

The figure below shows results of median filter by adding salt

and pepper and gaussian noise.

(a) (b)

(c) (d)

Figure.4 (a) Image Corrupted by Salt and Pepper (b) Histogram after Salt and Pepper

Noise added (c) Result of applying Median Filter on Salt and Pepper Noise (d) Histogram

after Median Filtered.

In fig.4 (a) salt and pepper noise added to an original image

fig.2 (a), fig.4(c) shows image after applying median filter . It

was observed from fig.4 (b) and fig.4 (d) i.e. histogram after salt

and pepper noise added and histogram after applying median

filter, the median filter is better than wiener filter for removal of

salt and pepper.

(a) (b)

ISRS Proceeding Papers of Sort Interactive Session ISPRS TC VIII International Symposium on “Operational Remote Sensing Applications: Opportunities, Progress and Challenges”, Hyderabad, India, December 9 – 12, 2014

No.224/ISRS Proceedings 2014/ISPRSTCVIII Mid-Symposium, Hyderabad, India

Page 6: COLOR IMAGE ENHANCEMENT FILTERING TECHNIQUES FOR ... › 4114 › 5e5c9e6ea76... · Image enhancement is used in a verity of application for extracting the information from selected

(c) (d)

Figure 5. (a) Image Corrupted by Gaussian (b) Histogram after Gaussian Noise added (c)

Result of applying Median Filter on Gaussian Noise (d) Histogram after applying Median

Filtered.

In fig.5(a), Gaussian noise added to an original image fig.2(a),

Image after applying median filter shown in fig.5(c), from

fig.5(b) i.e. histogram after gaussian noise added & fig.5(d), i.e.

image after applying median filter. It was observed that the

gaussian noise removal is better the gaussian noise removed by

applying wiener filter.

5. CONCLUSION

This paper made an attempt to study image enhancement by

using linear & non-linear filtering technique. Both Linear and

Non-linear filter was used for removal of noise from

agricultural image. Noises like salt and pepper and gaussian was

added into image, also it was observed that the histogram

equalization shows different gray scale levels changes with

respective of intensity. For performing these filtering techniques

on applying noises the image was first converted from color to a

gray scale image.

It was observed from histogram of wiener filter applying on

image corrupted by both salt and pepper noise and gaussian

noise was poor in noise reduction. Also salt and pepper noise

and gaussain noise added into image after applying median

filtered, it was observed that salt & pepper noise and gaussain

noise reduction was better than wiener filter. The Median Filter

perform better than wiener filter, it is not only better for noise

reduction also remove the blurred effect in image.

6. REFERENCE

[1] A.K. Jain, “Fundamental of Electronic Image Processing”

Eastern Economy Edition, PHI Pvt. Ltd., 2013.

[2] R. G. Gonzalez & R. E. Woods, “Digital Image Processing”

3rd Edition, Publication House of Electronic Industry,

Beijing.

[3] R. Maini & H. Aggarwal, “A Comprehensive

Review of Image Enhancement Technique” Journal of

Computing, Vol.2, No.3 pp.8-13 March 2010.

[4] P.G. Nikolas , S. Andrew & K.K Aggelos, “Digital Image

Enhancement.” Marcel Dekker INC, pp. 388-402, 2003.

[5] G. Gupta, “Algorithm for Image Processing Using

Improved Median Filter and Comparison of Mean, Median

and Improved Median Filter” , International Journal of

Soft Computing and Engineering (IJSCE), Vol.1, No.5,

pp.304-311, Nov.2011.

[6] http://www.see.ed.ac.uk/~sml/Image_Processing/ IP%20wit

h%20MATLAB/Image%20Processing%20with%20

MATLAB.pdf

[7] H. S. Nassir, “New Image Processing Toolbox using

MATLAB Codes” pp.1-8.

[8] M.A. Fari,, “Image Enhancement using Histogram

Equalization & Spatial Filtering.” International Journal of

Science & Research (IJSR), Vol.1 No.3, pp.15-20,

Dec.2012.

[9] http://www.teambhp.com/forum/attachments/travelogues/

175301d1250418902-monsoon-masti-15th-august-16.jpg

[10]A.K. Vishwakarma, Mishra A, “Color Image

Enhancement Techniques: A Critical Review”, Indian

Journal of Computer Science and Engineering (IJCSE),

Vol. 3 No. 1, pp. 39-45, Feb -Mar 2012.

ISRS Proceeding Papers of Sort Interactive Session ISPRS TC VIII International Symposium on “Operational Remote Sensing Applications: Opportunities, Progress and Challenges”, Hyderabad, India, December 9 – 12, 2014

No.224/ISRS Proceedings 2014/ISPRSTCVIII Mid-Symposium, Hyderabad, India