Вы находитесь на странице: 1из 4

Imperial Journal of Interdisciplinary Research (IJIR)

Vol-2, Issue-7, 2016


ISSN: 2454-1362, http://www.onlinejournal.in

A Basic Approach to Enhance a Gray


Scale Image
Ms. Asha1 & Mr. Krishan Gupta2
1
Institute of Technology and Sciences , Bhiwani
2
The Technological Institute of Textile & Sciences , Bhiwani

Abstract: This paper describes a Gray scale


image enhancement technique using Fuzzification.
The images can be enhanced by improving the
quality regarding the pixels value. It has three main
stages, namely, image fuzzification, modification of
membership function values, and defuzzification.
Fuzzy image enhancement is based on gray level
mapping into membership function. The proposed
technique enhanced the interpretability of images
that is input for other image processing technique.

Keywords- Image, Defuzzification, Fuzzification,


Membership function.

Introduction
Figure 1. Image Processing with Fuzzy System
Image enhancement processes consists of a
collection of techniques that seeks to improve the
visual appearance of an image, or to convert the
Step by step methodology to be followed for image
image into a form better suited for analysis for a
enhancement is as follows:
human or a machine perception[2,13].The principle
1) Morphological Processing
objective of image enhancement techniques is to
process an image so that the result is more suitable 2) Conversion of Image data into Fuzzy
than the original image for a specific application. domain data.
Fuzzy Technique mainly contains three steps 3) Membership Modification.
1) Image Fuzzification 4) Defuzzification
2) Membership Function Modification 5) Get Enhanced Image.
3) Image Defuzzification.
The Fuzzification and Defuzzification steps are due Design
to the fact that we do not possess fuzzy hardware. Image enhancement techniques can be divided into
Therefore, the coding of image data (Fuzzification) three broad categories:
and decoding of the results (Defuzzification) are 1) Spatial Domain method, which operates
steps that make possible to process images with directly on pixels.
fuzzy techniques. The main power of fuzzy image 2) Frequency domain methods, which operate
processing is in the middle step (modification of
on the Fourier transform of an image.
membership values)[1]. After the image data are
3) Fuzzy domain methods, which involves the
transformed from gray-level plane to the membership
use of knowledge-base systems that are
plane (Fuzzification), appropriate fuzzy techniques
capable of mimicking the behavior of a
modify the membership values. A fuzzy system
human expert[5,8,9].
consists of four functional blocks as shown in
Figure(see figure 1).
Fuzzy Inference System tools for Image
Enhancement:
1) Fuzzy Inference System Editor(see figure
2)
2) Membership Function Editor(see figure
3.)

Imperial Journal of Interdisciplinary Research (IJIR) Page 126


Imperial Journal of Interdisciplinary Research (IJIR)
Vol-2, Issue-7, 2016
ISSN: 2454-1362, http://www.onlinejournal.in

3) Fuzzy Rule Editor(see figure 4.)[7]


1. Implementation

Fuzzy Inference System is process of formulating the


mapping from given input to output using fuzzy
logic. The mapping thus involves a basis through
which decisions can be made[11,9]. The process of
fuzzy inference involves all of the piece that are
described in previous sections: membership
functions, fuzzy logic operator and if-then rules.
There are two types of fuzzy inference system that
can be implemented in the fuzzy logic toolbox:
Mamdani- type and Sugeno-type. Fuzzy Inference
System has successfully implemented in fields such
as automatic control, data classification, decision
analysis, expert system and computer vision.
Because of it multidisciplinary nature, fuzzy
inference system are associated with a number of
names, such as fuzzy rule based system, fuzzy expert
Figure 2. FIS Editor system; the following are the steps which are carried
out in sequence to get the desired output[4,10,12].

Algorithm to enhance the color of image


The algorithm starts with initialization of image
parameter. Size, min, mid, maximum gray level. The
Fuzzy based approach is powerful and universal
method for many task in the image processing.
The algorithm is described below:
Step 1-Morphological Processing
 Read the image

 Convert it into gray scale image if it is RBG

 Find the size of image (M×N)

Figure 3. Membership Editor


 Add noise to image

 Find min, maximum gray level of image


also find gray level of image

Step 2: convert the data into fuzzy domain data

 Crop the image and new image is d.


 Find maximum and minimum intensity of I
mx = max(max (d))

mn = min(min(d))

Figure 4. Rule Editor

Imperial Journal of Interdisciplinary Research (IJIR) Page 127


Imperial Journal of Interdisciplinary Research (IJIR)
Vol-2, Issue-7, 2016
ISSN: 2454-1362, http://www.onlinejournal.in

 One image function µmn can be calculated end


as:- Step 5:-Displaying the enhanced image

µ = (d – mn)/(mx-mn)  Show the original image

Where mn ,mx , d denotes minimum gray and  Show the enhanced image

maximum gray and any gray level.


2. Result
Step 3: Membership modification
We write our code in MATLAB to implement
Define all the pixels (i,j)th inside the image the proposed algorithm and then run this code
after saving it as m file in MATLAB
For i=1:m workspace[4]. Experiment was done on several
poor quality images. Some of the results are as
For j=1:n shown below:

 If((µ (i,j) >= 0 )&&( µ (i,j) <= 0.5 ))

input (i,j) = 5*µ(i,j)^3

 Elseif ((µ (i,j) > =0.5 )&&( µ (i,j) <= 1 ))

input (i,j) =1-5*(1-µ(i,j))^3


end
Step 4:- Defuzzification (if necessary) (a) Original Image (b)Enhanced Image
Now convert fuzzy data into grayscale enhanced Figure 5. Pout
data.Set maximum intensity and minimum intensity
for enhanced image.
maxI = 255 , minI = 0
For i=1:m
For j=1:n

 if (d(i,j) <= mn)


(a) Original Image (b) Enhanced Image
enhanceimage(i,j) = 0
Figure 6. Cake

 elseif ((d(i,j) > mn)&&( d(i,j) < mx))

enhanceimage(i,j) = (maxI – minI)*input(i,j)


+minI

 else
(a) Original Image (b) Enhanced Image

enhanceimage(i,j) = 255 Figure 7.Coin


end

Imperial Journal of Interdisciplinary Research (IJIR) Page 128


Imperial Journal of Interdisciplinary Research (IJIR)
Vol-2, Issue-7, 2016
ISSN: 2454-1362, http://www.onlinejournal.in

3. Conclusion And Future Scope [12] George J. Klir and Bo Yuan” Fuzzy sets and fuzzy
logic: Theory and applications”, Prentice Hall publication,
pp 1-405, 1995
The main focus of this research is on image
enhancement using fuzzy image enhancement [13] G. Liao, T. A. Nodes, and N. C. Gallagher, Jr.,
techniques. Many images like medical images, “Output distributions of two-dimensional median filters,”
satellite images, microscopy images, aerial images IEEE Trans. Acousf., Speech, Signal Processing, vol.
and even real life photographs suffer from poor ASSP-33, pp. 128G1295. Oct. 1985
contrast and noise. It is necessary to enhance the
[14] Liangrui Tang, Jing Zhang and Bing Qi. “An
contrast and remove the noise to increase image Improved fuzzy image enhancement algorithm”. Fifth
visual quality. International Conference on Fuzzy Systems and
Future work can be extended for other images than Knowledge Discovery, pp.186-189, 2008.
grayscale images to obtain better result with
accuracy. Image enhancement is a field that is being
used in various areas and disciplines. Image
enhancement plays a vital role in every field where
images have to be understood and analyzed. In
future modification of the algorithm can produce the
better result for the images

4. References
[1] Russo, F. ; Dipartimento di Elettrotecnica Elettronica
ed Inf., Trieste Univ., Italy ; Ramponi, G., “Edge
extraction by FIRE operators,” in IEEE Proc. Of 3rd
conference World congress on Computational intelligence,
pp. 249-253,vol 1, 1994.

[2] Faisel Saed, Huizhu Lu “Image Contrast Enhancement


Using Fuzzy Set Theory”.

[3] Timothy J. Ross, Fuzzy logic with Engineering


applications, John Wiley & Sons, Ltd 2004.

[4] www.mathwork.com

[5] L. Zadeh, Fuzzy sets, Information Control,pp.338-


353,1965

[6] S.N. Shivanandam, S. Sumathi and S.N. Deepa,


“Introduction to Fuzzy Logic using Matlab.”

[7] Faisal Saeed, K.M. George ,Huizhu Lu “Image contrast


Enhancement using Fuzzy set theory”.

[8] Tizhoosh, Fuzzy Image Processing,1997, Springer,


Berlin.

[9] Tyan C Y, Wang P P. Image Processing-Enhancement,


Filtering and Edge Detection Using The Fuzzy Logic
Approach. In Proceedings of the 2nd\

[10] Chen B T, Chen Y S, Hsu W H, Automatic Histogram


Specification Based on Fuzzy Set Operations for Image
Enhancement. IEEE Signal Processing Letters,1995, 2( 2):
37-40.

[11] H. J. Zimmermann, “Fuzzy Set Theory and Its


Applications”, Kluwer Academic Inc., pp ll-67, 1991.

Imperial Journal of Interdisciplinary Research (IJIR) Page 129

Вам также может понравиться