Vous êtes sur la page 1sur 11

International Journal of Mechanical Engineering and Technology (IJMET)

Volume 9, Issue 8, August 2018, pp. 1367–1377, Article ID: IJMET_09_08_147


Available online at http://www.iaeme.com/ijmet/issues.asp?JType=IJMET&VType=9&IType=8
ISSN Print: 0976-6340 and ISSN Online: 0976-6359

© IAEME Publication Scopus Indexed

COLOUR BASED IMAGE SEGMENTATION


USING HYBRID KMEANS WITH WATERSHED
SEGMENTATION
V. Sasikaladevi
M.Phil, Department of Computer Science,
Presidency College, Chennai, Tamil Nadu, India

V. Mangai
Associate Professor, Department of Computer Science,
Presidency College, Chennai, Tamil Nadu, India

ABSTRACT
Image processing, arbitrarily manipulating an image to achieve an aesthetic
standard or to support a preferred reality. The objective of segmentation is
partitioning an image into distinct regions containing each pixels with similar
attributes. Image segmentation can be done using thresholding, color space
segmentation, k-means clustering.
Segmentation is the low-level operation concerned with partitioning images by
determining disjoint and homogeneous regions or, equivalently, by finding edges or
boundaries. The homogeneous regions, or the edges, are supposed to correspond,
actual objects, or parts of them, within the images. Thus, in a large number of
applications in image processing and computer vision, segmentation plays a
fundamental role as the first step before applying to images higher-level operations
such as recognition, semantic interpretation, and representation. Until very recently,
attention has been focused on segmentation of gray-level images since these have been
the only kind of visual information that acquisition devices were able to take the
computer resources to handle. Nowadays, color image has definitely displaced
monochromatic information and computation power is no longer a limitation in
processing large volumes of data. In this paper proposed hybrid k-means with
watershed segmentation algorithm is used segment the images. Filtering techniques is
used as noise filtration method to improve the results and PSNR, MSE performance
parameters has been calculated and shows the level of accuracy.
Key words: Image Processing, Colour segmentation, K-Means, Watershed, Median
Filter and Wiener Filter.
Cite this Article: V. Sasikaladevi and V. Mangai, Colour Based Image Segmentation
Using Hybrid Kmeans with Watershed Segmentation, International Journal of
Mechanical Engineering and Technology 9(8), 2018, pp. 1367–1377.
http://www.iaeme.com/IJMET/issues.asp?JType=IJMET&VType=9&IType=8

http://www.iaeme.com/IJMET/index.asp 1367 editor@iaeme.com


Colour Based Image Segmentation Using Hybrid Kmeans with Watershed Segmentation

1. INTRODUCTION
Images is one of the most important medium for conveying information, the process of
extracting meaningful information from images is known as image segmentation. Image
segmentation is the process where digital images are partitioned into multiple smaller
segments that contain meaningful information while having similar features and properties.
The goal of performing image segmentation is to simplify and change the representation of an
image into more meaningful and earlier to analyze. Representation of an image into a form
that is more meaningful and easier to analyze. Image segmentation algorithms play an
important role in applications such as medical imaging, bio-metric recognition, object
detection, target tracking etc.
For many years, images that were segmented were usually in gray-scale due to the fact
that computers were not powerful enough to display and manipulate large, full-color data sets.
With the advent of more powerful and easily accessible hardware came a shift in the current
of research towards the more widely applicable and more complex problem of color
segmentation. Color images generally convey more information as opposed to gray-scale
images which allow one to obtain more meaningful and robust segmentation.
Misclassification problems, may arise when segmenting gray-scale images can be easily
avoided by resorting to color information.
Also the success of image analysis depends on reliability of segmentation, but an accurate
partitioning of an image is generally very challenging and can see that in next topic. All types
of uploaded data should undergo three phases while proceeding digital techniques are
1. Pre-processing
2. Enhancement
3. Display Information Extraction

1.1. Image Segmentation


The reason for image segmentation is to segment a image into meaningful regions as for a
specific application. The segmentation depends on estimations taken from the image and may
be gray level, colour, texture, depth or motion.. The Image segmentation is partitioning an
image into unmistakable areas containing every pixel with similar attributes. It tends to be
finished utilizing thresholding, color space segmentation, k-means clustering.

a) b)
Figure 1 a) Original Image b) Segmented Image
Segmentation partitions an image into particular areas containing every pixel with
comparative characteristics. To be significant and helpful for analysis and interpretation the

http://www.iaeme.com/IJMET/index.asp 1368 editor@iaeme.com


V. Sasikaladevi and V. Mangai

regions should strongly relate to depicted objects or features of interest.. Meaningful


segmentation is the first step from low-level image processing transforming a grayscale or
colour image into one or more other images to high-level image description in terms of
features, objects, and scenes. The accomplishment of image analysis depends on reliability of
segmentation, but an accurate partitioning of an image is generally a very challenging
problem.
Segmentation procedures are either contextual or non-contextual. The latter take no
account of spatial connections between features in an image and group pixels together on the
basis of some global attribute, e.g. gray level or colour. Contextual techniques additionally
exploit these relationships, e.g. group together pixels with similar gray levels and close spatial
areas.

1.2. Colour Image Segmentation


Colour image segmentation is gathering the recommended pieces of the image and using it
according to the application and each pixel within the image is signifies the color at a single
point in the image. In order to achieve certain data from an image, for example, a certain
colour, the image processing techniques of colour image segmentation can be used to carry
out such a task.

Figure 2 Colour Image

1.3. Segmentation Based on Clustering


There is no general theory of image segmentation. However, with the introduction of many
new theories and methods of various disciplines, there have been many image segmentation
techniques combined with some specific theories and methods. The so-called class refers to
the collection of similar fundamentals. Clustering is in accordance with certain requirements
and laws of the classification of things in the process. The feature space clustering method is
used to segment the pixels in the image space with the corresponding feature space points.
According to their aggregation in the feature space, the feature space is segmented, and then
they are mapped back to the original image space to get the segmentation result. K-means is
one of the most commonly used clustering algorithm. The basic idea of k-means is to gather
the samples into different clusters according to the distance. The closer the two points are, the
closer they are to get the compact and independent clusters as grouping targets.

http://www.iaeme.com/IJMET/index.asp 1369 editor@iaeme.com


Colour Based Image Segmentation Using Hybrid Kmeans with Watershed Segmentation

1.4. Filtering Techniques


Noise filtration technique is the process of removing the unwanted noise from the image. Two
types of filtering techniques are Linear Filtering and Non-linear Filtering. Image de-noising
performed on different noises by using linear and non linear filtering techniques like Mean
filter, Median filter and Wiener filter.
The choice of filter is determined by
1. The nature of the task performed by filter
2. Filter behavior
3. Type of the data

2. LITERATURE REVIEW
Sharada Mani proposed a method that utilizes simple Circular Shifting for manipulating the
whole image at a time rather than template based (Sharada Mani, 2010). As pre-processing
step, real complement of each channel was taken and the circular shift operations were
applied in all directions in order to determine the edge pixels on the resultant image. This
process was considered to be attractive in a computational perspective since the underlying
operations at edge point effectively reduce to shift and subtraction. Advantages: Performance
of the proposed method is satisfactory in almost all cases and runs in polynomial time.
Genyun Sun presents an edge detection algorithm based on calculations of the difference
in values of 2 clusters (Sun, 2011). For every pixel, a window is first defined by placing the
pixel at the center. This window is partitioned into 2 sub-regions respectively in 4 different
directions. An appropriate function is then chosen to estimate the difference between each
pair of 2 adjacent regions and also to calculate edge information in terms of edge strength and
direction by maximizing the difference value. Finally, the non-maxima suppression is adopted
to derive the output edge map. Advantages: More robust under noisy conditions. It is
consistent and reliable even when image quality is significantly degraded by noise.
Rafika Harrabi proposed a technique that combines many realizations of the same image
(Rafika Harrabi, 2012). First, most significant peaks of the histogram is determined by
utilizing an optimal multi-level thresholding technique based on the 2-stage Otsu optimization
approach. Then, the evidence theory is employed to merge multiple images represented in
different color spaces. This was done in order to obtain a final reliable and accurate result.
The notion of mass functions, in the Dempster-Shafer (DS) evidence theory, is linked to the
Gaussian distribution, and the final segmentation is achieved. On the input image, it is
expressed in different color spaces, by using DS combination rule and decision. Advantages:
High segmentation sensitivity.
Wu Kaihua and Ban Tao have proposed an optimal threshold segmentation method that is
based on the entropy criteria and Genetic algorithm in order to improve the image acquisition
process in computer vision. The factors that were taken into account were illumination, light,
reflection of light, CCD exposure time and some properties of image histogram. Advantages:
Efficient in searching and finding threshold.
Ghassan Hamarneh proposed a novel method for enhancing watershed segmentation by
using prior shape and appearance knowledge (Ghassan Hamarneh, 2009). The method
iteratively aligns a shape histogram with the result of an improved k-means clustering
algorithm of the watershed segments. The method comprises a training stage and a
segmentation stage. In the training stage, a „shape histogram‟ and image intensity statistics are
used to model prior shape and appearance knowledge, respectively. The segmentation stage is
an automatic iterative procedure and consists of 4 steps: Classical Watershed Transformation,
Improved k-Means Clustering, Shape Alignment, and Refinement.

http://www.iaeme.com/IJMET/index.asp 1370 editor@iaeme.com


V. Sasikaladevi and V. Mangai

Biplab Banerjee proposed a method for image segmentation that involves the use of
Minimum Spanning Tree (MST) (Biplab Banerjee, 2010). First, MST is performed based on
the “natural grouping” of the image pixels to determine the clusters of the pixels that have
TGB values within a certain range present in the image. Then, the pixels closest to the centers
of those clusters are identified and labeled as the seeds for region growing based
segmentation. After that, a region merging based segmentation having a suitable threshold is
carried out to remove the effect of over-segmentation that remains after the previous method.
Advantages: Eliminate the effect of over segmentation that may persists after region growing
method.
Y. Deng developed the J-Segmentation (JSEG) algorithm that integrates color
quantization and spatial segmentation for extraction of color-texture regions in images and
video (Y. Deng, 2001). While the JSEG method was capable in deriving spatially compact
regions, the JSEG method commences in a color quantization step utilized to obtain a “color
class map” which is subsequently employed to compute a J-image based on certain spatial
constraints. These spatial constraints were designed such that the resultant boundaries and low
values for homogenous color-texture regions. Subsequently, the J-image is utilized as a
reference to identify suitable seed points to initiate a region growing process, wherein the
obtained regions are eventually refined in a merging process using a color similarity criterion.
Mathur and Purohit Digital image can be considered as a large array of discrete dots called
picture elements or pixels, each of which has a brightness associated with it where each pixel
of the digital image signifies the color at a single point in the image, for the coloured image or
the gray level or monochrome image.
Sharma, Mishra and Shrivastava Through these color representation, higher level
processes beyond the human visual system can be achieved where the colour is better
represented by hue, saturation and intensity.
In colour image segmentation, algorithms such as the k-means clustering, thresholding
and colour space segmentation. In the k-means clustering. These region based techniques are
based on common patterns in the colour intensity values within a group of neighboring pixels
where the goal of this kind of segmentation algorithm is to identify and group the regions
according to their similarities according to their hue, saturation and intensity.

3. OBJECTIVES
K-Means is an algorithm that quickly group pixels on the basis of predefined feature vectors
and initial centroids. The consideration of color components alone as feature space dimension
is not enough to validate the results for clustering and hence an improvement by means of
parameterization, feature space extension with texture or gradient is necessary. So that
watershed segmentation is combined with k means algorithm with noise filtration technique.
The main objectives are
 To perform color segmentation
 To reduce the noise
 To achieve high PSNR
 To reduce MSE

4. PROPOSED METHODOLOGY
4.1. Hybrid K Means with Watershed Algorithm
1. Place K points into the space represented by the objects that are being clustered. These
points represent initial group centroids.
2. Assign each object to the group that has the closest centroid.

http://www.iaeme.com/IJMET/index.asp 1371 editor@iaeme.com


Colour Based Image Segmentation Using Hybrid Kmeans with Watershed Segmentation

3. When all objects have been assigned, recalculate the positions of the K centroids.
4. Repeat Steps two and three until the centroids no longer move. This produces a
separation of the objects into groups from which the metric to be minimized can be
calculated.
5. Compute a segmentation function. This is an image whose dark regions are the objects
you are trying to segment.
6. Compute foreground markers. These are connected blobs of pixels within each of the
objects.
7. Compute background markers. These are pixels that are not part of any objects. Also
modify the segmentation function so that, it has only minima at the foreground and
background marker locations.
8. Compute the watershed transform of the modified segmentation function.

4.2. Flow Chart for Hybrid K Means with Watershed Algorithm


Flow Chart for Hybrid K Means with Watershed Algorithm

ENHANCED INPUT
IMAGE

SEGMENTED BY K-MEANS

OUTPUT IMAGE FOR CLUSTER1,


CLUSTER2, CLUSTER3 IMAGE

SELECT ANY ONE CLUSTER

SELECTED CLUSTER IS INPUT IMAGE


IN WATERSHED ALGORITHM

USING FILTERING TECHNIQUES

CALCULATE PSNR AND MSE VALUES

OUTPUT IMAGES

Figure 3 Flow chart

http://www.iaeme.com/IJMET/index.asp 1372 editor@iaeme.com


V. Sasikaladevi and V. Mangai

5. RESULTS AND DISCUSSION


Discussed about image quality measurement and watershed segmentation is combined with k
means algorithm to be used for research. The quality measures are Peak-Signal Noise Ratio
(PSNR), Mean Square Error (MSE). The performance analysis of this methods give the image
quality values and compare the types of rules, finally using filter technique is better result for
k-means with watershed algorithm.

5.1. Experimental Result of Image without Filter


Table 1 Quality measures rating table with jpeg, bmp and png image
Source image PSNR MSE
JPEG 55.5623 0.180654
BMP 55.5631 0.180623
PNG 55.5631 0.180623

Figure 4 Comparison of PSNR value JPEG, BMP and PNG


The figure 4 is the line chart representation of the table 1 in the figure X axis represents
Image types for JPEG, BMP and PNG. The Y axis represents the quality measurement PSNR
and MSE. According to the table 1 it is clearly seen in the graph that the PSNR rate in the
proposed technique k-means with watershed algorithm is less than the other techniques.

Figure 5 Comparison of MSE value JPEG, BMP and PNG

http://www.iaeme.com/IJMET/index.asp 1373 editor@iaeme.com


Colour Based Image Segmentation Using Hybrid Kmeans with Watershed Segmentation

The figure 5 is the line chart representation of the table 1 in the figure X axis represents
Image types for JPEG, BMP and PNG. The Y axis represents the quality measurement PSNR
and MSE. According to the table 1 it is clearly seen in the graph that the MSE rate in the
proposed technique k-means with watershed algorithm is less than the other techniques.

5.2. Experimental Result of Image with Weiner Filter


Table 2 Quality measures rating table with jpeg, bmp and png image
Source image PSNR MSE
JPEG 59.605 0.071217
BMP 59.5915 0.0714385
PNG 59.6055 0.0712081

Figure 6 Comparison of PSNR value JPEG, BMP and PNG


The figure 6 is the line chart representation of the table 2 in the figure X axis represents
Image types for JPEG, BMP and PNG. The Y axis represents the quality measurement PSNR
and MSE. These quality measures are compared for wiener filtering techniques of types of
images using k-means with watershed segmentation. According to the table 2 it is clearly seen
in the graph that the PSNR rate in the proposed technique k-means with watershed algorithm
is less than the other techniques.

Figure 7 Comparison of MSE value JPEG, BMP and PNG


The figure 7 is the line chart representation of the table 2 in the figure X axis represents
Image types for JPEG, BMP and PNG. The Y axis represents the quality measurement PSNR

http://www.iaeme.com/IJMET/index.asp 1374 editor@iaeme.com


V. Sasikaladevi and V. Mangai

and MSE. These quality measures are compared for wiener filtering techniques of types of
images using k-means with watershed segmentation. According to the table 2 it is clearly seen
in the graph that the MSE rate in the proposed technique k-means with watershed algorithm is
less than the other techniques.

5.3. Experimental Result of Image with Median Filter


Table 3 quality measures rating table with jpeg, bmp and png image
Source image PSNR MSE
JPEG 59.9344 0.0660149
BMP 59.932 0.0660519
PNG 59.932 0.0660519

Figure 8 Comparison of PSNR value JPEG, BMP and PNG


The figure 8 is the line chart representation of the table 3 in the figure X axis represents
Image types for JPEG, BMP and PNG. The Y axis represents the quality measurement PSNR
and MSE. These quality measures are compared for median filtering techniques of types of
images using k-means with watershed segmentation. According to the table 3 it is clearly seen
in the graph that the PSNR rate in the proposed technique k-means with watershed algorithm
is less than the other techniques.

Figure 9 Comparison of MSE value JPEG, BMP and PNG

http://www.iaeme.com/IJMET/index.asp 1375 editor@iaeme.com


Colour Based Image Segmentation Using Hybrid Kmeans with Watershed Segmentation

The figure 9 is the line chart representation of the table 3 in the figure X axis represents
Image types for JPEG, BMP and PNG. The Y axis represents the quality measurement PSNR
and MSE. These quality measures are compared for median filtering techniques of types of
images using k-means with watershed segmentation. According to the table 3 it is clearly seen
in the graph that the PSNR rate in the proposed technique k-means with watershed algorithm
is less than the other techniques.

6. CONCLUSIONS
Clustering is the unsupervised classification of observations, data points or feature vectors
into groups. The clustering problem has been discussed in many contexts and by the
investigators in many disciplines this shows its widespread interest and usefulness as one of
the steps in exploratory data analysis. The k-means algorithm is one of the most popular
clustering techniques because of its speed and simplicity. The initial step of this method is
determining k initial cluster centers. The way the set of initial cluster centers are selected have
a strong effect on speed and quality of results. In this thesis, an efficient technique that is
performing well (in most of the cases) in terms of run-time than k-means is proposed. The
analysis of quality measurement is PSNR and MSE. In the proposed system is describes the
quality measurement comparing without filter technique using filter technique is better result
for k-means with watershed algorithm. In the filtering techniques, the median filter is more
accurate than the wiener filter.

REFERNCES
[1] Gonzalez RC, Woods RE. Digital Image Processing. 3rd edition. Prentice-Hall; 2006.

[2] Lalitha M, Kiruthiga M, Loganathan C. A survey on image segmentation through


clustering algorithm. International Journal of Science and Research. 2013;2(2):348–358.

[3] Sharma N, Mishra M, Shrivastava M. Colour image segmentaion techniques and issues:
an approach. International Journal of Scientific & Technology Research. 2012;1(4):9–12.

[4] Busin L, Vandenbroucke N, Macaire L. Color spaces and image segmentation. Advances
in Imaging and Electron Physics. 2008; 151: 65–168.

[5] Biplab Banerjee, T. B. (2010). Color Image Segmentation Technique Using “Natural
Grouping” of Pixels.

[6] Ghassan Hamarneh, X. L. (2009). Watershed segmentation using prior shape and
appearance knowledge.

[7] Jifeng Ning, D. Z. (2010). Automatic tongue image segmentation based on gradient vector
flow and region merging.

[8] Rafika Harrabi, E. B. (2012). Color image segmentation using multi-level thresholding
approach and data fusion techniques.

[9] Sharada Mani, G. S. (2010). A Novel Edge Detection Technique for Color Images.

[10] Sun, G. (2011). A New Method for Edge Detection Based on the Criterion of Separability.

[11] Y. Deng, B. M. (2001). Unsupervised segmentation of color texture regions in images and
video.

http://www.iaeme.com/IJMET/index.asp 1376 editor@iaeme.com


V. Sasikaladevi and V. Mangai

[12] U. Rahamathunnisa, Babu Chellappa Chetty, A. Clement King, A Survey on Fault


Detection Techniques in Different Machines - An Image Processing Approach.
International Journal of Civil Engineering and Technology, 8(9), 2017, pp. 1124 – 1127

[13] Bhavani S, Sumit Patil, Dhanashri Patil, Yash Shah, Rushikesh Babar, Abhishek Rathi, K
- Means Modification for Scalability. International Journal of Civil Engineering and
Technology, 8(12), 2017, pp . 101 – 107

[14] Sridhar.Ranganathan and Srivatsan.Kannan, A Survey of Entity Identification and


Clustering Using Text Processing from Newspaper. International Journal of Civil
Engineering and Technology, 9(1), 2018, pp. 320 – 329

[15] C.Ramesh, Dr.T.Venugopal and Dr.Venkateswara Reddy.E, Comparison of various color


spaces for image segmentation using Rough-Fuzzy Clustering Techniques, International
Journal of Computer Engineering & Technology , 9(1), 2018, pp. 20–25.

http://www.iaeme.com/IJMET/index.asp 1377 editor@iaeme.com

Vous aimerez peut-être aussi