0% found this document useful (0 votes)
20 views8 pages

Segmentation Using Fuzzy Logic in Color

Uploaded by

Anshul Kaushal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views8 pages

Segmentation Using Fuzzy Logic in Color

Uploaded by

Anshul Kaushal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

ISSN: 2277-9655

[Kumar* et al., 6(6): June, 2017] Impact Factor: 4.116


IC™ Value: 3.00 CODEN: IJESS7

IJESRT
INTERNATIONAL JOURNAL OF ENGINEERING SCIENCES & RESEARCH
TECHNOLOGY
SEGMENTATION USING FUZZY LOGIC IN COLOR IMAGES BASED ON
MEMBERSHIP FUNCTIONS
E Boopathi Kumar & Dr V Thiagarasu
Research Scholar, Department of Computer Science, Gobi Arts & Science College,
Gobichettipalayam, Erode, India
Associate Professor of Computer Science, Gobi Arts & Science College, Gobichettipalayam, Erode,
India

DOI: 10.5281/zenodo.802803

ABSTRACT
Color Image Segmentation is the high level image description in terms of objects, scenes, and features separates
the image into distinct regions of similar pixels based on pixel property. The success of image analysis depends
on segmentation reliability. This article presents a novel approach for color image segmentation using two
different algorithms with respect to color features. Here presented an adaptive masking method based on fuzzy
membership functions and a thresholding mechanism over each color channel to overcome over segmentation
problem, before combining the segmentation from each channel into the final one. Our proposed method ensures
accuracy and quality of different kinds of color images. Consequently, the proposed modified fuzzy approach
can enhance the image segmentation performance by use of its membership functions. Similarly, it is worth
noticing that our proposed approach is faster than many other segmentation algorithms, which makes it
appropriate for real-time application. According to the visual and quantitative authentication, the proposed
algorithm is performing better than existing algorithms.

KEYWORDS: Color Segmentation, Fuzzy Membership Functions, Edge Detection, Region Growing

INTRODUCTION
Image segmentation is one of the most important steps leading to the analysis of processed image data, which
refers to grouping of similar pixels together and separating the particular portion of the image for the purpose of
identification. Its main goal is to divide an image into parts that have strong correlation with objects or areas of
the real world contained in the image. In computer vision, Segmentation is the process of partitioning a digital
image into multiple segments. Color images can convey more information compared to gray scale images. Color
image segmentation follows discontinuity principles to extract the regions based on color as its property. It is a
method of mining one or more integrated regions that are homogenous. There are a large number of color image
segmentation techniques based on segment properties. Segmentation properties can be classified into four
general categories such as pixel-based, edge-based, region-based, and model-based techniques. Image
segmentation is one of the most important steps leading to the analysis of processed image data, which refers to
grouping of similar pixels together and separating the particular portion of the image for the purpose of
identification. Its main goal is to divide an image into parts that have strong correlation with objects or areas of
the real world contained in the image. In computer vision, segmentation is the process of partitioning a digital
image into multiple segments which gives more meaning and easier to analyze and is to cluster pixels into
prominent image regions, i.e., regions corresponding to individual surfaces, objects, or natural parts of objects.
Image segmentation algorithms are based on either discontinuity principle or similarity principle. The idea

http: // www.ijesrt.com© International Journal of Engineering Sciences & Research Technology


[38]
ISSN: 2277-9655
[Kumar* et al., 6(6): June, 2017] Impact Factor: 4.116
IC™ Value: 3.00 CODEN: IJESS7
behind the discontinuity principle is to extract regions that differ in properties such as intensity, color, texture, or
any other image statistics and the similarity principle is to group pixels based on common properties

Generally, the basic behavior of these techniques can be divided into three major concepts which are shown in
above figure. The first concept is the similarity concept like edge-based techniques which involves edge
detection in image. Alternatively, the second concept is based on the discontinuity of pixel values as same as
pixel-based and region-based techniques. It is an effective concept which is accepted overall by all categories of
applications. Finally, a complete different approach is the third concept which is based on a statistical approach
like Model-based techniques. This technique provides approximate mathematical calculation in order of
statistical way. There are various color models such as RGB, CMY, and HSV etc, which are considered to
examine color segmentation process.

RELATED WORKS
A.Borji & M.Hamidi proposed a new method for color image segmentation using fuzzy logic membership
functions. Sugeno type fuzzy inference system is used. Trapezoidal, Gaussian and bell shaped membership
functions are investigated in their work and the results are compared. Trapezoidal membership function quotes
better results among other functions. Md. Abul Hasnat, Olivier Alata and Alain Tremeau proposed an
unsupervised method for indoor RGB-D image segmentation and analysis. Worked a statistical image
generation model based on the color and geometry of the scene and it consists of a joint color-spatial-directional
clustering method followed by a statistical planar region merging method. Evaluate their method on the NYU
depth database and compare it with existing unsupervised RGB-D segmentation methods.

Firas Ajil Jassim proposed a novel algorithm based on combining two existing methods to obtain a significant
method to partition the color image into significant regions. On their first phase, the traditional Otsu method for
gray channel image segmentation were applied for each of the R,G, and B channels separately to determine the
suitable automatic threshold for each channel. After that, the new modified channels are integrated again to
formulate a new color image. The resulted image suffers from some kind of distortion. To get rid of those
distortion, the second phase is arise which is the median filter to smooth the image and increase the segmented
regions.

A.Kalaivani, Dr.S.Chitrakala represented K-Means Clustering algorithm which is the popular unsupervised
clustering used for dividing the images into multiple regions based on image color property. The major issue of
the algorithm is that the user has to specify the number of clusters-K, which is used to split the image into K
regions. To overcome the issue, they focused on determining K automatically based on local maxima of gray
level co-occurrence matrix. Automatic generated K value is then passed to Fast K-means Clustering algorithm
for segmenting color images into multiple regions.

Rafael Guillermo Gonzalez Acuna generalizes Otsu’s binarization method towards reduction of color levels in
color images. Color defines a multi-dimensional property vector at each pixel location, and this can be further
generalized towards considering arbitrarily finite-dimensional property vectors at pixel locations. Otsu’s
binarization method, originally already briefly discussed by Otsu for multi-Thresholding, was efficiently
mapped earlier into a segmentation method for grey-level images by recursively applying the original
binarization method. They generalize further by proposing a recursive algorithm for finite dimensional property
vectors at pixel locations.

Navkirat Kaur presented color image segmentation algorithm in the form of color conversion. They convert
RGB image to HSV because it gives the color according to human perception. Further three matrixes are made
by three different planes. Firstly, a single new matrix is formed so as to see values of RGB at each pixel. If two
rows are equal in a single new matrix then combine those rows. After that total number of colors existing in an

http: // www.ijesrt.com© International Journal of Engineering Sciences & Research Technology


[39]
ISSN: 2277-9655
[Kumar* et al., 6(6): June, 2017] Impact Factor: 4.116
IC™ Value: 3.00 CODEN: IJESS7
original image is calculated. To see the exact color enter the number of colors wants to see and finally processed
image is converted from HSV to RGB color space.

MATERIALS AND METHODS


Color is perceived by humans as a combination of tristimuli Red, Green, and Blue (RGB) which are usually
called three primary colors. From R,G, B representation, we can derive other kinds of color representations
(spaces) by using either linear or nonlinear transformations. Several color spaces, such as RGB, HSI, CIE are
utilized in color image segmentation, but none of them can dominate the others for all kinds of color images.
Selecting the best color space still is one of the difficulties in color image segmentation. Red, green, and blue
components can be represented by the brightness values of the scene obtained through three separate filters (red,
green, and blue) based on the variables present in the membership functions. Fuzzy logic membership functions
such as triangular and trapezoidal were proposed to segment the grey level images. Here there are some
difficulties with trapezoidal membership function i.e. it have four variables to represent their own capability. In
color images there are number of color spaces which contain three color properties. In such case triangular
membership function is much suitable function because of having three variables formula. For example, if we
take RGB color space means three colors are included in triangular membership variable XYZ.

Figure 1: Result image with grey levels

Figure 1 represents the results obtained through trapezoidal membership function in grey level images. Here
four variables are taken through membership functions for implementation. This membership function doesn’t
suits for color image segmentation. In this case triangular membership function is proposed with suitable
variable declaration. Fuzzy inference system editor contains different input and output variable which is based
on masks types. Two fuzzy sets are used for the input i.e. Black & White and three fuzzy sets are used for the
output i.e. Black, White and Edge. For 2*2 masks, P4 variable is chosen for output and for 3*3 masks p5
variable is chosen for output. 2*2 masks contain 16 fuzzy rules and 3*3 masks contain 28 fuzzy set rules. The
results are based upon fuzzy rules. In membership function editor, the value and degree of membership is
denoted and the function trapmf is Chosen.

http: // www.ijesrt.com© International Journal of Engineering Sciences & Research Technology


[40]
ISSN: 2277-9655
[Kumar* et al., 6(6): June, 2017] Impact Factor: 4.116
IC™ Value: 3.00 CODEN: IJESS7

Figure 2: Surface Viewer

Above figure is the surface viewer of resultant image which is represented in figure 1. It is a read only option in
the fuzzy inference system which shows the surface occupation of input image. Surface viewer and rule viewer
are read only tools given by inference system to check rule properties and surface occupation in the given input.

Fuzzy sets and fuzzy operators are the subjects and verbs of fuzzy logic. These if-then rule statements are used
to formulate the conditional statements that comprise fuzzy logic.
A single fuzzy if-then rule assumes the form if x is A then y is B where A and B are linguistic values defined by
fuzzy sets on the ranges (universes of discourse) X and Y, respectively. The if-part of the rule “x is A” is called
the antecedent or premise, while the then-part of the rule “y is B” is called the consequent or conclusion. An
example of such a rule might be
If ‘service’ is ‘good’ then ‘tip’ is ‘average’

The concept good is represented as a number between 0 and 1, and so the antecedent is an interpretation that
returns a single number between 0 and 1. Conversely, average is represented as a fuzzy set, and so the
consequent is an assignment that assigns the entire fuzzy set B to the output variable y.

http: // www.ijesrt.com© International Journal of Engineering Sciences & Research Technology


[41]
ISSN: 2277-9655
[Kumar* et al., 6(6): June, 2017] Impact Factor: 4.116
IC™ Value: 3.00 CODEN: IJESS7

Figure 3: Fuzzy Inference System Tools

Figure 3 point out the fuzzy inference system properties in the form of tools namely Fuzzy Inference System
Editor, Membership Function Editor, Rule Editor, Rule Viewer, and Surface Viewer. Membership Function
Editor is used to define the shapes of all the membership functions associated with each variable. Rule Editor is
used to edit the list of rules that defines the behavior of the system. Rule Viewer to view the fuzzy inference
diagram based on given input. Use this viewer as a diagnostic to see, for example, which rules are active, or how
individual membership function shapes influence the results. Surface Viewer to view the dependency of one of
the outputs on any one or two of the inputs i.e. it generates and plots an output surface map for the system.
Generally, Membership function is a curve that defines how each point in the input space is mapped to a
membership value between 0 and 1. It provides a measure for the degree of an element to a fuzzy set. It fully
defines fuzzy set and it can take any form, but there are some common examples that appear in real applications.
There are different shapes of membership functions; triangular, trapezoidal, piecewise-linear, Gaussian, bell-
shaped, and so on. In most of the literature, triangular membership functions are used due to having flexible
formula to calculate. Choosing of membership function is based on problem taken.

RESULTS AND DISCUSSION


Parameters of triangular membership function are denoted as a, b, c where b is peak point. Here 2*2 masks are
used in this algorithm, input pixels are divided into Black and White i.e. two fuzzy sets while the output pixel is
divided into three fuzzy sets i.e. Black, Edge and White. For 2*2 masks, rule base of 16 rules is set for various
conditions that can occur. The result of proposed method was compared to existing operators and it was
suggested to 3*3 dimension window.

A Triangular Membership Function is specified by three parameters {a, b, c} as follows:

http: // www.ijesrt.com© International Journal of Engineering Sciences & Research Technology


[42]
ISSN: 2277-9655
[Kumar* et al., 6(6): June, 2017] Impact Factor: 4.116
IC™ Value: 3.00 CODEN: IJESS7
By using min and max, we have an alternative expression for the preceding equation:

The parameters {a, b, c} (with a < b < c) determine the x coordinates of the three corners of the underlying
triangular. Trapezoidal is one of the types of fuzzy membership function having flat top and really is just a
truncated triangle curve. It fully depends on four scalar parameters such as a, b, c and d given by,

A Trapezoidal Membership Function is specified by four parameters {a, b, c, d} as follows:

An alternative concise expression using min and max is:

The parameters {a, b, c, d} (with a < b <= c < d) determine the x coordinates of the four corners of the
underlying Trapezoidal Membership Function. Note that a Trapezoidal Membership Function with parameter
{a, b, c, d} reduces to a Triangular Membership Function when b is equal to c. Due to their simple formulas and
computational efficiency; both Triangular Membership Functions and Trapezoidal Membership Functions have
been used extensively, especially in real-time implementations. However, since the Membership Functions are
composed of straight line segments, they are not smooth at the corner points specified by the parameters.

The parameters a and d locate the "feet" of the trapezoid and the parameters b and c locate the "shoulders." In
this paper, mamdani’s fuzzy inference method is implemented with the help of flexible trapezoidal formula.
Fuzzy inference system editor contains four input variables p1, p2, p3, p4 and one output variable. Two fuzzy
sets are used for the input i.e. Black & White and three fuzzy sets are used for the output. It is a 2*2 mask
scanning process which is done by using those four input variables. P4 variable is chosen for output where the
results are based upon fuzzy rules. In membership function editor, the value and degree of membership is
denoted and the function trapmf is Chosen. The mask moved over an area of the input image, changes the P4
pixels value and then shifts one pixel to the right and continues to the right until it reaches the end of a row. It
then starts at the beginning of the next row & process continues till the whole image is scanned. When this mask
is made to scan over the image, the output is generated by the fuzzy inference system based upon the rules and
the value of the pixels P1, P2, P3 and P4. In fuzzy inference system editor, input variables such as P1, P2, P3
and P4 notify input and output type of the pixels which are find out at image scanning section.

CONCLUSION
Segmentation algorithms for color images based on Edge detection are described in this paper. Additionally,
fuzzy logic membership function’s masking methods were proposed which is based on IF-THEN rules and the
output gives some likely results. A brief introduction to color image segmentation and fuzzy segmentation
approach is discussed. The development based on IF-THEN rules is predicted as a promising research area in

http: // www.ijesrt.com© International Journal of Engineering Sciences & Research Technology


[43]
ISSN: 2277-9655
[Kumar* et al., 6(6): June, 2017] Impact Factor: 4.116
IC™ Value: 3.00 CODEN: IJESS7
the near future. Suitable membership functions are chosen based on the parameters likely to assign for the
variables and it finally concludes that triangular membership function must satisfy all the conditions which suits
for implementation. Generally, implementation process can be done through two phases. On the first phase, the
fuzzy membership function based edge detection for gray channel image segmentation were applied for each of
the R,G, and B channels separately to determine the suitable automatic threshold for each channel. After that,
the new modified channels are included with channel wise and again to form a new color image. The resulted
image suffers from some kind of alteration. To get rid of this warp, the second phase is arise which is the
median filter to smooth the image and increase the projection on segmented regions. Experimental results were
presented on a variety of test images to support the proposed algorithm.

REFERENCES
1. Rafael C Gonzalez and Richard E Woods (2013), “Digital image processing”, ISBN 978-81-317-2695-
2, Pearson Education.
2. Rafael C Gonzalez, Richard E Woods and Steven L Eddins (2011), “Digital image processing using
MATLAB”, ISBN – 13: 978-0-07-070262-2, Tata McGraw Hill Education.
3. Firas Ajil Jassim, Fawzi H. Altaani, “Hybridization of Otsu Method and Median Filter for Color Image
Segmentation”, International Journal of Soft Computing and Engineering (IJSCE) ISSN: 2231-2307,
Volume-3, Issue-2, May 2013.
4. Song Gao, Chengcui Zhang, and Wei-Bang Chen, “An Improvement of Color Image Segmentation
through Projective Clustering”, IEEE IRI 2012, August 8-10, 2012.
5. Mrs. C. Mythili, Dr. V. Kavitha, “Efficient Technique for Color Image Noise Reduction”, The
Research Bulletin of Jordan, ACM, Volume 2, Issue 3, 2011.
6. Nikita Sharma, Mahendra Mishra, Manish Shrivastava, “Color Image Segmentation Techniques and
Issues: An Approach”, International Journal of Scientific & Technology Research Volume 1, Issue 4,
May 2012.
7. Jan Puzicha and Serge Belongie, “Model–based Halftoning for Color Image Segmentation”, UC
Berkeley, Department of Computer Science, December 2002.
8. Soumya Dutta, Bidyut B. Chaudhuri, “Homogenous Region based Color Image Segmentation”,
Proceedings of the World Congress on Engineering and Computer Science, ISBN: 978-988-18210-2-7,
Volume 2, October 2009.
9. E. Boopathi Kumar and M. Sundaresan, “Edge Detection Using Trapezoidal Membership Function
Based on Fuzzy‘s Mamdani Inference System”, IEEE, 2014.
10. E. Boopathi Kumar and M. Sundaresan, “Fuzzy Inference System based Edge Detection using Fuzzy
Membership Functions”, International Journal of Computer Applications, ISSN: 0975 – 8887, Volume
112, Issue: 4, February 2015.
11. M. Jogendra Kumar, Dr. GVS Raj Kumar, R. Vijay Kumar Reddy, “Review on Image Segmentation
Techniques”, International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN
2278 – 0882, Volume 3, Issue 6, September 2014.
12. Rozy Kumari, Narinder Sharma, “A Study on the Different Image Segmentation Technique”,
International Journal of Engineering and Innovative Technology (IJEIT), ISSN: 2277-3754, Volume 4,
Issue 1, July 2014.
13. H.D. Cheng, X.H. Jiang, Y. Sun, Jingli Wang, “Color image segmentation: advances and prospects”,
Pattern Recognition 34 (2001) 2259-2281.
14. M. Borsotti, P. Campadelli, R. Schettini, “Quantitative evaluation of color image segmentation results”,
Pattern Recognition Letters 19 (1998) 741–747
15. Navkirat Kaur, V. K. Banga, Avneet Kaur, “Image Segmentation Based on Color”, International
Journal of Research in Engineering and Technology, Volume: 02 Issue: 11 | Nov-2013
16. Frank Y. Shih, Shouxian Cheng, “Automatic seeded region growing for color image segmentation”,
Image and Vision Computing 23 (2005) 877–886

http: // www.ijesrt.com© International Journal of Engineering Sciences & Research Technology


[44]
ISSN: 2277-9655
[Kumar* et al., 6(6): June, 2017] Impact Factor: 4.116
IC™ Value: 3.00 CODEN: IJESS7
17. Khande Bharath Kumar and D. Venkataraman, “Object Detection Using Robust Image”, © Springer
India 2015, L.P. Suresh et al. (eds.), Artificial Intelligence and Evolutionary Algorithms in Engineering
Systems, Advances in Intelligent Systems and Computing 324, DOI 10.1007/978-81-322-2126-5.
18. Mihir Narayan Mohanty and Subhashree Rout, “An Intelligent Method for Moving Object Detection”,
© Springer India 2015 L.C. Jain et al. (eds.), Intelligent Computing, Communication and Devices,
Advances in Intelligent Systems and Computing 309, DOI 10.1007/978-81-322-2009-1.
19. Emmanuel Joy and J. Dinesh Peter, “Tracking of Unique Colored Objects: A Simple, Fast Visual
Object Detection and Tracking Technique”, E.B. Rajsingh et al. (eds.), Informatics and
Communication Technologies for Societal Development, DOI 10.1007/978-81-322-1916-3_15, ©
Springer India 2015.
20. Simranjit Singh Walia, Gagandeep Singh, “Color based Edge detection techniques– A review”,
International Journal of Engineering and Innovative Technology, Volume 3, Issue 9, March 2014.
21. Amiya Halder, Nilabha Chatterjee, Arindam Kar, Swastik Pal and Soumajit Pramanik, “Edge
Detection: A Statistical approach”, 3rd International Conference on Electronics Computer Technology,
2011.
22. Suryakant, Neetu Kushwaha, “Edge Detection using Fuzzy Logic in Matlab”, International Journal of
Advanced Research in Computer Science and Software Engineering, Volume 2, Issue 4, April 2012.
23. Shikha Bharti, Sanjeev Kumar, “An Edge Detection Algorithm based on Fuzzy Logic”, International
Journal of Engineering Trends and Technology, Volume 4, Issue 3, 2013.
24. Mehul Thakkar, Prof. Hitesh Shah, “Edge Detection Techniques Using Fuzzy Thresholding”, 978-1-
4673-0126-8/ 2011, IEEE.
25. Anil K Jain (2014), “Fundamentals of Digital Image Processing”, ISBN 978-81-203-0929-6, Pearson
Education.
26. E.Boopathi Kumar and V.Thiagarasu, “Evaluation of Color Image Segmentation Novel Methods”,
IJIRCCE, ISSN: 2320 – 9798, Pages: 21323 – 21328, Volume 4, Issue 12, December 2016.
27. E.Boopathi Kumar and V.Thiagarasu, “Segmentation using Masking Methods in Color Images: an
Approach”, IJESRT, ISSN 2277 – 9655, Pages: 104-110, Volume 6, Issue 2, February 2017.
28. A.Kalaivani, Dr.S.Chitrakala, “Automatic Color Image Segmentation”, International Conference on
Science, Engineering and Management Research (ICSEMR 2014), ©2014 IEEE.
29. Md. Habibur Rahman, Md. Rafiqul Islam, “Segmentation of Color Image using Adaptive Thresholding
and Masking with Watershed Algorithm”, 978-1-4799-0400-6/13/ ©2013 IEEE.
30. Rafael Guillermo Gonzalez, Junli Tao, “Generalization of Otsu’s Binarization into Recursive Color
Image Segmentation”, 978-1-5090-0357-0/15/, © 2015 IEEE.

CITE AN ARTICLE
Kumar, E. B., & Thiagarasu, V., Dr. (2017). SEGMENTATION USING FUZZY LOGIC IN
COLOR IMAGES BASED ON MEMBERSHIP FUNCTIONS. INTERNATIONAL JOURNAL
OF ENGINEERING SCIENCES & RESEARCH TECHNOLOGY, 6(6), 38-45.
doi:10.5281/zenodo.802803

http: // www.ijesrt.com© International Journal of Engineering Sciences & Research Technology


[45]

You might also like