\documentclass[11pt,twoside]{article}\makeatletter

\IfFileExists{xcolor.sty}%
  {\RequirePackage{xcolor}}%
  {\RequirePackage{color}}
\usepackage{colortbl}
\usepackage{wrapfig}
\usepackage{ifxetex}
\ifxetex
  \usepackage{fontspec}
  \usepackage{xunicode}
  \catcode`⃥=\active \def⃥{\textbackslash}
  \catcode`❴=\active \def❴{\{}
  \catcode`❵=\active \def❵{\}}
  \def\textJapanese{\fontspec{Noto Sans CJK JP}}
  \def\textChinese{\fontspec{Noto Sans CJK SC}}
  \def\textKorean{\fontspec{Noto Sans CJK KR}}
  \setmonofont{DejaVu Sans Mono}
  
\else
  \IfFileExists{utf8x.def}%
   {\usepackage[utf8x]{inputenc}
      \PrerenderUnicode{–}
    }%
   {\usepackage[utf8]{inputenc}}
  \usepackage[english]{babel}
  \usepackage[T1]{fontenc}
  \usepackage{float}
  \usepackage[]{ucs}
  \uc@dclc{8421}{default}{\textbackslash }
  \uc@dclc{10100}{default}{\{}
  \uc@dclc{10101}{default}{\}}
  \uc@dclc{8491}{default}{\AA{}}
  \uc@dclc{8239}{default}{\,}
  \uc@dclc{20154}{default}{ }
  \uc@dclc{10148}{default}{>}
  \def\textschwa{\rotatebox{-90}{e}}
  \def\textJapanese{}
  \def\textChinese{}
  \IfFileExists{tipa.sty}{\usepackage{tipa}}{}
\fi
\def\exampleFont{\ttfamily\small}
\DeclareTextSymbol{\textpi}{OML}{25}
\usepackage{relsize}
\RequirePackage{array}
\def\@testpach{\@chclass
 \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
  \ifnum \@lastchclass=7 5 \else
   \ifnum \@lastchclass=8 \tw@ \else
    \ifnum \@lastchclass=9 \thr@@
   \else \z@
   \ifnum \@lastchclass = 10 \else
   \edef\@nextchar{\expandafter\string\@nextchar}%
   \@chnum
   \if \@nextchar c\z@ \else
    \if \@nextchar l\@ne \else
     \if \@nextchar r\tw@ \else
   \z@ \@chclass
   \if\@nextchar |\@ne \else
    \if \@nextchar !6 \else
     \if \@nextchar @7 \else
      \if \@nextchar (8 \else
       \if \@nextchar )9 \else
  10
  \@chnum
  \if \@nextchar m\thr@@\else
   \if \@nextchar p4 \else
    \if \@nextchar b5 \else
   \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi
   \fi \fi  \fi  \fi  \fi  \fi  \fi \fi \fi \fi \fi \fi}
\gdef\arraybackslash{\let\\=\@arraycr}
\def\@textsubscript#1{{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
\def\Panel#1#2#3#4{\multicolumn{#3}{){\columncolor{#2}}#4}{#1}}
\def\abbr{}
\def\corr{}
\def\expan{}
\def\gap{}
\def\orig{}
\def\reg{}
\def\ref{}
\def\sic{}
\def\persName{}\def\name{}
\def\placeName{}
\def\orgName{}
\def\textcal#1{{\fontspec{Lucida Calligraphy}#1}}
\def\textgothic#1{{\fontspec{Lucida Blackletter}#1}}
\def\textlarge#1{{\large #1}}
\def\textoverbar#1{\ensuremath{\overline{#1}}}
\def\textquoted#1{‘#1’}
\def\textsmall#1{{\small #1}}
\def\textsubscript#1{\@textsubscript{\selectfont#1}}
\def\textxi{\ensuremath{\xi}}
\def\titlem{\itshape}
\newenvironment{biblfree}{}{\ifvmode\par\fi }
\newenvironment{bibl}{}{}
\newenvironment{byline}{\vskip6pt\itshape\fontsize{16pt}{18pt}\selectfont}{\par }
\newenvironment{citbibl}{}{\ifvmode\par\fi }
\newenvironment{docAuthor}{\ifvmode\vskip4pt\fontsize{16pt}{18pt}\selectfont\fi\itshape}{\ifvmode\par\fi }
\newenvironment{docDate}{}{\ifvmode\par\fi }
\newenvironment{docImprint}{\vskip 6pt}{\ifvmode\par\fi }
\newenvironment{docTitle}{\vskip6pt\bfseries\fontsize{22pt}{25pt}\selectfont}{\par }
\newenvironment{msHead}{\vskip 6pt}{\par}
\newenvironment{msItem}{\vskip 6pt}{\par}
\newenvironment{rubric}{}{}
\newenvironment{titlePart}{}{\par }

\newcolumntype{L}[1]{){\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{){\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{){\raggedleft\arraybackslash}p{#1}}
\newcolumntype{P}[1]{){\arraybackslash}p{#1}}
\newcolumntype{B}[1]{){\arraybackslash}b{#1}}
\newcolumntype{M}[1]{){\arraybackslash}m{#1}}
\definecolor{label}{gray}{0.75}
\def\unusedattribute#1{\sout{\textcolor{label}{#1}}}
\DeclareRobustCommand*{\xref}{\hyper@normalise\xref@}
\def\xref@#1#2{\hyper@linkurl{#2}{#1}}
\begingroup
\catcode`\_=\active
\gdef_#1{\ensuremath{\sb{\mathrm{#1}}}}
\endgroup
\mathcode`\_=\string"8000
\catcode`\_=12\relax

\usepackage[a4paper,twoside,lmargin=1in,rmargin=1in,tmargin=1in,bmargin=1in,marginparwidth=0.75in]{geometry}
\usepackage{framed}

\definecolor{shadecolor}{gray}{0.95}
\usepackage{longtable}
\usepackage[normalem]{ulem}
\usepackage{fancyvrb}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{marginnote}

\renewcommand{\@cite}[1]{#1}


\renewcommand*{\marginfont}{\itshape\footnotesize}

\def\Gin@extensions{.pdf,.png,.jpg,.mps,.tif}

  \pagestyle{fancy}

\usepackage[pdftitle={Color Image Segmentation using Automated K-Means Clustering with RGB and HSV Color Spaces},
 pdfauthor={}]{hyperref}
\hyperbaseurl{}

	 \paperwidth210mm
	 \paperheight297mm
              
\def\@pnumwidth{1.55em}
\def\@tocrmarg {2.55em}
\def\@dotsep{4.5}
\setcounter{tocdepth}{3}
\clubpenalty=8000
\emergencystretch 3em
\hbadness=4000
\hyphenpenalty=400
\pretolerance=750
\tolerance=2000
\vbadness=4000
\widowpenalty=10000

\renewcommand\section{\@startsection {section}{1}{\z@}%
     {-1.75ex \@plus -0.5ex \@minus -.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\Large\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
     {-1.75ex\@plus -0.5ex \@minus- .2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\Large}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
     {-1.5ex\@plus -0.35ex \@minus -.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\large}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
     {-1ex \@plus-0.35ex \@minus -0.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\normalsize}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
     {1.5ex \@plus1ex \@minus .2ex}%
     {-1em}%
     {\reset@font\normalsize\bfseries}}


\def\l@section#1#2{\addpenalty{\@secpenalty} \addvspace{1.0em plus 1pt}
 \@tempdima 1.5em \begingroup
 \parindent \z@ \rightskip \@pnumwidth 
 \parfillskip -\@pnumwidth 
 \bfseries \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}\par
 \endgroup}
\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
\@ifundefined{c@section}{\newcounter{section}}{}
\@ifundefined{c@chapter}{\newcounter{chapter}}{}
\newif\if@mainmatter 
\@mainmattertrue
\def\chaptername{Chapter}
\def\frontmatter{%
  \pagenumbering{roman}
  \def\thechapter{\@roman\c@chapter}
  \def\theHchapter{\roman{chapter}}
  \def\thesection{\@roman\c@section}
  \def\theHsection{\roman{section}}
  \def\@chapapp{}%
}
\def\mainmatter{%
  \cleardoublepage
  \def\thechapter{\@arabic\c@chapter}
  \setcounter{chapter}{0}
  \setcounter{section}{0}
  \pagenumbering{arabic}
  \setcounter{secnumdepth}{6}
  \def\@chapapp{\chaptername}%
  \def\theHchapter{\arabic{chapter}}
  \def\thesection{\@arabic\c@section}
  \def\theHsection{\arabic{section}}
}
\def\backmatter{%
  \cleardoublepage
  \setcounter{chapter}{0}
  \setcounter{section}{0}
  \setcounter{secnumdepth}{2}
  \def\@chapapp{\appendixname}%
  \def\thechapter{\@Alph\c@chapter}
  \def\theHchapter{\Alph{chapter}}
  \appendix
}
\newenvironment{bibitemlist}[1]{%
   \list{\@biblabel{\@arabic\c@enumiv}}%
       {\settowidth\labelwidth{\@biblabel{#1}}%
        \leftmargin\labelwidth
        \advance\leftmargin\labelsep
        \@openbib@code
        \usecounter{enumiv}%
        \let\p@enumiv\@empty
        \renewcommand\theenumiv{\@arabic\c@enumiv}%
	}%
  \sloppy
  \clubpenalty4000
  \@clubpenalty \clubpenalty
  \widowpenalty4000%
  \sfcode`\.\@m}%
  {\def\@noitemerr
    {\@latex@warning{Empty `bibitemlist' environment}}%
    \endlist}

\def\tableofcontents{\section*{\contentsname}\@starttoc{toc}}
\parskip0pt
\parindent1em
\def\Panel#1#2#3#4{\multicolumn{#3}{){\columncolor{#2}}#4}{#1}}
\newenvironment{reflist}{%
  \begin{raggedright}\begin{list}{}
  {%
   \setlength{\topsep}{0pt}%
   \setlength{\rightmargin}{0.25in}%
   \setlength{\itemsep}{0pt}%
   \setlength{\itemindent}{0pt}%
   \setlength{\parskip}{0pt}%
   \setlength{\parsep}{2pt}%
   \def\makelabel##1{\itshape ##1}}%
  }
  {\end{list}\end{raggedright}}
\newenvironment{sansreflist}{%
  \begin{raggedright}\begin{list}{}
  {%
   \setlength{\topsep}{0pt}%
   \setlength{\rightmargin}{0.25in}%
   \setlength{\itemindent}{0pt}%
   \setlength{\parskip}{0pt}%
   \setlength{\itemsep}{0pt}%
   \setlength{\parsep}{2pt}%
   \def\makelabel##1{\upshape ##1}}%
  }
  {\end{list}\end{raggedright}}
\newenvironment{specHead}[2]%
 {\vspace{20pt}\hrule\vspace{10pt}%
  \phantomsection\label{#1}\markright{#2}%

  \pdfbookmark[2]{#2}{#1}%
  \hspace{-0.75in}{\bfseries\fontsize{16pt}{18pt}\selectfont#2}%
  }{}
      \def\TheFullDate{2017-01-15 (revised: 15 January 2017)}
\def\TheID{\makeatother }
\def\TheDate{2017-01-15}
\title{Color Image Segmentation using Automated K-Means Clustering with RGB and HSV Color Spaces}
\author{}\makeatletter 
\makeatletter
\newcommand*{\cleartoleftpage}{%
  \clearpage
    \if@twoside
    \ifodd\c@page
      \hbox{}\newpage
      \if@twocolumn
        \hbox{}\newpage
      \fi
    \fi
  \fi
}
\makeatother
\makeatletter
\thispagestyle{empty}
\markright{\@title}\markboth{\@title}{\@author}
\renewcommand\small{\@setfontsize\small{9pt}{11pt}\abovedisplayskip 8.5\p@ plus3\p@ minus4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus2\p@
\belowdisplayshortskip 4\p@ plus2\p@ minus2\p@
\def\@listi{\leftmargin\leftmargini
               \topsep 2\p@ plus1\p@ minus1\p@
               \parsep 2\p@ plus\p@ minus\p@
               \itemsep 1pt}
}
\makeatother
\fvset{frame=single,numberblanklines=false,xleftmargin=5mm,xrightmargin=5mm}
\fancyhf{} 
\setlength{\headheight}{14pt}
\fancyhead[LE]{\bfseries\leftmark} 
\fancyhead[RO]{\bfseries\rightmark} 
\fancyfoot[RO]{}
\fancyfoot[CO]{\thepage}
\fancyfoot[LO]{\TheID}
\fancyfoot[LE]{}
\fancyfoot[CE]{\thepage}
\fancyfoot[RE]{\TheID}
\hypersetup{citebordercolor=0.75 0.75 0.75,linkbordercolor=0.75 0.75 0.75,urlbordercolor=0.75 0.75 0.75,bookmarksnumbered=true}
\fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}}

\date{}
\usepackage{authblk}

\providecommand{\keywords}[1]
{
\footnotesize
  \textbf{\textit{Index terms---}} #1
}

\usepackage{graphicx,xcolor}
\definecolor{GJBlue}{HTML}{273B81}
\definecolor{GJLightBlue}{HTML}{0A9DD9}
\definecolor{GJMediumGrey}{HTML}{6D6E70}
\definecolor{GJLightGrey}{HTML}{929497} 

\renewenvironment{abstract}{%
   \setlength{\parindent}{0pt}\raggedright
   \textcolor{GJMediumGrey}{\rule{\textwidth}{2pt}}
   \vskip16pt
   \textcolor{GJBlue}{\large\bfseries\abstractname\space}
}{%   
   \vskip8pt
   \textcolor{GJMediumGrey}{\rule{\textwidth}{2pt}}
   \vskip16pt
}

\usepackage[absolute,overlay]{textpos}

\makeatother 
      \usepackage{lineno}
      \linenumbers
      
\begin{document}

             \author[1]{Md. Rakib  Hassan}

             \author[2]{Romana Rahman  Ema}

             \author[3]{Tajul  Islam}

             \affil[1]{  North Western University}

\renewcommand\Authands{ and }

\date{\small \em Received: 15 December 2016 Accepted: 31 December 2016 Published: 15 January 2017}

\maketitle


\begin{abstract}
        


Segmentation implies the division of an image into different objects or connected regions that do not overlap. Though, extensive research has been done in creating many different approaches and algorithms for image segmentation, however, it is still not very clear to assess whether one algorithm produces more accurate segmentations than another, whether it be for a particular image or set of images, or more generally, for a whole class of images [7]. A reliable and accurate segmentation of an image is, in general, very difficult to achieve by purely automatic means. Present researches on image segmentation using clustering algorithms reveals that K-means clustering algorithm so far produces best results but some improvements can be made to improve the results. The biggest disadvantage of our heavy usage of k-means clustering, is that it means we would have to think of a k each time, which really doesn?t make too much sense because we would like to algorithm to solve this on his own. Therefore we tried to find the K automatically and so create segmentation without any human giving ?"hints?" to the algorithm. So we tried to make the process automatic. In this paper, the combined segmentation of RGB and HSV color spaces give more accurate segmentation result compared to segmentation of single color space. For keeping the k parameter as small as possible, we had to keep different intensity levels of the same color on the same segment to estimate the right k automatically for the algorithm.

\end{abstract}


\keywords{automated k-means, clustering, RGB, HSV, segmentation, color space, cluster, image processing, color image, K-means clustering.}

\begin{textblock*}{18cm}(1cm,1cm) % {block width} (coords) 
\textcolor{GJBlue}{\LARGE Global Journals \LaTeX\ JournalKaleidoscope\texttrademark}
\end{textblock*}

\begin{textblock*}{18cm}(1.4cm,1.5cm) % {block width} (coords) 
\textcolor{GJBlue}{\footnotesize \\ Artificial Intelligence formulated this projection for compatibility purposes from the original article published at Global Journals. However, this technology is currently in beta. \emph{Therefore, kindly ignore odd layouts, missed formulae, text, tables, or figures.}}
\end{textblock*}


\let\tabcellsep& 	 	 		 
\section[{I. Introduction}]{I. Introduction}\par
ith the impetuous improvement in the digital technology, digital image play very significant role in modern era with its rapidly uses at medical sector and the visualization sector. Digital image can be described as a large number array of discrete dots where each dot has a brightness level associated with it.\par
These dots are simply represents as pixels or picture elements. Image segmentation is defined as; "the search for homogeneous regions in an image and later the classification of these images". Segmentation signifies the partition of an image into different objects or connected regions that do not overlap. Highly use of Real world image segmentation issues have multiple objectives like reduce overall deviation, maximize property, reduce the options or reduce the error rate of the classifier. In image processing, it is still not very clear to measure whether one algorithm express more accurate segmentation than another, whether it be for related image, particular image or set of images, or more usually, for a whole class of each images \hyperref[b3]{[4]}. The modern researches on digital image segmentation generally use K-means clustering algorithm which doesn't express best results but after some elevation of K-means algorithm, it could express the results better. In this paper, the combined segmentation of RGB and HSV color spaces give more accurate segmentation result compared to segmentation of single color space our main objectives while segmenting images of different kind like using the RGB color space where we wanted to get rid of different intensity level of the same color shade which is not satisfied. Hence, we thought of another representation to color images the HSV color space which will ease our solution to segmentation Pattern Recognition and Image Analysis MacQueen J proposed some methods for classification and analysis of multivariate observations. Y. Li and Y. Shen done a great job about Robust image segmentation algorithm using fuzzy clustering based on kernel-induced distance measure whereas D. E.  {\ref Ilea}  Clustering (also called unsupervised learning) is the method of partitioning a data-set into various groups. Sometimes the members of every group are as similar (close) as probable to one another, and sometimes different groups are as dissimilar (far) as possible from one another \hyperref[b8]{[9]}. Clustering can discover previously unperceived relationships in a data set. There are various applications for cluster analysis. Cluster analysis can be used to discover and distinguish customer segments for marketing purposes. In Biology, it uses at alignment of plants and animals given their features. Not only that it can also be used in pattern recognition spatial data analysis, image processing etc. \hyperref[b18]{[20]} In other words, clustering means collection of data or distribution a large data set into smaller data sets of some similarity \hyperref[b4]{[5]}. An important appearance in clustering is how to designate the similarity between individual objects, Clusters can be made from objects with the possibility of high similarity within clusters and low similarity between clusters \hyperref[b6]{[7]}. Commonly, to measure similarity or dissimilarity between objects there are many popular methods, such as Euclidean, Manhattan and Minkowski are used. A distance function executes a lower value for similar objects that are more similar to one another. Requirements of good cluster:\par
? The ability to discover some or all of the hidden clusters also handle high dimensionality. ? Within-cluster similarity and between-cluster dissimilarity and Scalable, Interpretable and usable ? Ability to deal with various types of attributes, can deal with noise and outliers.\par
Hierarchical Clustering is a set of nested clusters organized as a hierarchical tree and on the other hand Partitioning Clustering is a division data objects into non-overlapping subsets (clusters) such that each data object is in exactly one subset \hyperref[b3]{[4]}. The k-means algorithm works like to cluster "n" number of objects based on characteristic into k partitions, where k < n. Simply speaking it is an algorithm to group or to classify objects based on their corresponding features into K number of group. Here K is always positive integer number \hyperref[b14]{[16]}. In general, the group is created based on minimizing the sum of distances between the corresponding clusters centroid and data  {\ref [5] [11]}.  
\section[{c) Basic Steps of K -Means Clustering Algorithm}]{c) Basic Steps of K -Means Clustering Algorithm}\par
Given n objects, choose k number of clusters to be determined. Choose k objects randomly as the initial cluster. Assign each object to their closest cluster center. Update the center of each cluster (Calculate mean points) until no changes on cluster centers (i.e. Centroids do not change location any more). A number of other strategies stands for verifying K, including cross-verify, information criteria, the information the silhouette procedure, theoretic jump procedure and also the G-means algorithm. In addition, monitoring the classification of data points across various groups provides acumen into how the algorithm is partitioning the data for each K. 
\section[{d) Choosing "K" of K -Means Clustering Algorithm}]{d) Choosing "K" of K -Means Clustering Algorithm}\par
The algorithm described over discovers the clusters and data set labels for an individual pre-chosen K. To discover the number of clusters in the data, the user needs to operate the K-means clustering algorithm for a range of K values and compare the outcomes. In general, there is no procedure for recognizing exact value of K \hyperref[b16]{[18]}. 
\section[{Figure 4: Elbow Point Example}]{Figure 4: Elbow Point Example}\par
One of the metrics that is generally used to compare outcomes across several values of K is the mean distance between data points and their cluster centroid. Since increasing the number of clusters will always maximize this metric and minimize the distance to data points to the ultimate of reaching zero when K is the same as the number of data points. Thus, this metrics cannot be used as the absolute target. 
\section[{e) HSV Color Space}]{e) HSV Color Space}\par
HSV color space will be more compatible for conduct with segmentation of rough color images. We can describe HSV color space with the help of a hex cone with three extensions where the middle vertical axis describes the intensity [level 18]. Here H represents Hue. Basically Hue is an angle, which range is [0,2 ?] comparative to angle 0 at red axis, 2 ?/3 at green axis, 4?/3 at blue axis and red again at 2?. S represents Saturation, which represents how authentic the hue is with respect to a white section. This can be concern of as the depth or integrity of color and is measured as a long range distance from the middle axis with properties between 0 at the center to 1 at the outer surface \hyperref[b11]{[13]}. While, for a given intensity and hue, if the saturation is qualified from 0 to 1, the comprehend color switch from a shade of gray to the most authentic form of the color represented by its hue. Diagrammatic view is given below \hyperref[b4]{[5]}: V represents Value which percentage is between 0 to 100. This percentage range can be concern as the amount of light expressing a color. For example, the value is high and when the hue is red, the color seems bright. On the other hand, it looks dark when the value is low. Following figures show the HSV converted image of the original image \hyperref[b4]{[5]}:  RGB color space is also called additive color space, which can be described well based on the RGB color model \hyperref[b9]{[10]}. Three chromaticity's is represented by a particular RGB color space which includes the red, green, and blue additive primaries, and also generate any chromaticity with a triangle which represented by Year 2017 ( ) F those fundamental colors. A gamma correction curve and a white point chromaticity also requires for the total specification of an RGB color space  {\ref [12]}. Three colored lights for red, green, and blue are produced and described from An RGB color space, for example, shining three lights together onto a white wall in a dark room: one red light, one green light, and one blue light, each with dimmers. If only the red light is on, the wall will be red. If only the green light is on, the wall will look green. If the red and green lights are on together, the wall will look yellow. Dim the red light and the wall will become more of a yellow-green. Dim the green light instead, and the wall will become more orange. Typical RGB input devices are color TV and video cameras, image scanners, video games, and digital cameras. 
\section[{IV. Methodology}]{IV. Methodology}\par
To generate the best practical segmentation, we intend to use images with known characteristics, where most popular use about the segmentation is color. Our aim is to find out an amusing way to segment the image by the colors with the k means clustering algorithm, which includes mapping the image pixels to the RGB color space and HSV color space (i.e. if pixel 4, 5 holds the values red: 50, green: 30, blue: 20, we map it to the point (50, 30, 20) on a 3d space representing the RGB and HSV values). Our proposed function works like to adjust the input to the format of k means procedure for expects to get and ran a few tests. Our motivation was to keep the k parameter as small as possible to estimate the right k automatically for the algorithm. For that, we had to keep different intensity levels of the same color on the same segment; for example trying to keep light green and dark green in the same segment. Our basic supposition for this part of the work, was that whether given a data set of n clusters, when we operate K means algorithm with parameter k=m (Where m>n). The centers which is created by the algorithm would be closer to each other than if we ran the algorithm with the parameter k=n (the actual number of clusters). So the minimum distance between the cluster centers would decrease. 
\section[{Figure 9: Proposed Technique of RGB Color Segmentation}]{Figure 9: Proposed Technique of RGB Color Segmentation}\par
To reduce the K parameter, we start with a high value of K, and iteration ally reducing it, until we go an indicated condition, which normally has to do with the minimum distance between the centers of the segmentation resulted by the k-means algorithm. For calculate the sample values of RGB and HSV we used Matlab. Of the colors we wanted to separate, we tried to take the algorithm to a point where it wouldn't accumulate those colors under the corresponding segment. If we consider the minimum distance between the colors then we can use a condition that will force the k to be small enough that the various segments generated will be at least as far from one another, as the various colors of the game play world, we won't get a segment with colors "close to one another". We confined heavily on our basic supposition, associated with hope that various intensity of the same color may be closer to one another, after decreasing K value and increases the minimum distance our proposed algorithm is ends. Basically various "shades" of the same color are multiplication by a constant of a basic vector in the RGB space. If in the data set there are several clusters, each one representing several intensity level of the color. Our main goal is to get rid of various intensity level of the same color hue. Hence, the illustration to color images the HSV color space which will comfort our solution to segmentation \hyperref[b7]{[8]}. The HSV color space has several parameters for the HUE, SATURATION and VALUE (intensity) of the pixel, and so we get instinctive access to the actual hue of the pixel, without any concerns about several intensity level. 
\section[{V. Performance Results}]{V. Performance Results} 
\section[{a) Performance Matrices}]{a) Performance Matrices}\par
We discovered that even though the K-Means algorithm does a great job, but when we tried to make the process automatic with the right automatic K, even though we were in a restricted world of images, the process wasn't easy, and obviously our results are not perfect, but not too far away. On images of unknown source, the problem becomes much harder. So we proposed an algorithm to minimize the K parameter by itself, at the beginning of time it starts with high value of K, and then iteration ally reducing it, until we meet a certain condition, which generally has to do with the minimum distance between the centers of the segmentation. Now, the problem is to choose a condition which will make the algorithm stop and calculate the "right" k. We can easily fix this certain condition based on our knowledge of the game play images, like the colors existing in the world. On fruit ninja game play image we sampled the different colors from all the individual fruits in the game, and using the minimum distance between the fruits as a starting point for a terminating condition. We noticed with this result, the perceive areas to be segment and assigned to in the result. The background got divided to two segments. Here someone can argue that if we segment the image based only on colors, but we wanted it to be a good pre-processing for a later by object recognition algorithm. But as we started implementing this method, we realized that there is much simpler solution. Hence, we thought of another representation to color images the HSV color space which will ease our solution to segmentation. The HSV color space has different parameters for the HUE, the SATURATION and the VALUE (intensity) of the pixel. Again, the fully automatic algorithm isn't perfect, the usage of the minimum distance condition isn't enough to accurately estimate the K parameter but we do ideas on how to improve it. In the restricted world of game play images, HSV based segmentation did much better than the RGB version. The fact that we can ignore the pixels intensity level opened up a way to clearly segment the picture based on hue only, which, in this scenario specifically is very good. Year 2017 ( ) F No representation is better than the other though we wanted to emphasize this fact, so we provide examples from real world images; there HSV color space to eliminate different intensities of the same hue isn't performing too well, as opposed to RGB. 
\section[{b) Working Results when HSV is better than RGB}]{b) Working Results when HSV is better than RGB}\par
The major step we did was the HSV color space to get a clearer segmentation view to us, for better out come in the future we like to add the K recognition feature which still requires work to be fully functional.\par
Here is several samples of the results we achieved, with some annotations:  From the figure number 12 and 13 we get a clear view that our proposed K-means clustering algorithm give better output on Game play images and also can segment properly without giving any human hints of find out the number of "K." 
\section[{c) Working Results when RGB is better than HSV}]{c) Working Results when RGB is better than HSV}\par
Segmentation by colors generally show a very perfect sense of the picture, and can be a decent preprocessing for stages like object visualization. The role of segmentation is authentic in most tasks requiring image analysis. The success or failure of the process is often a direct result of the success or failure of segmentation. However, an authentic and exact segmentation of an image is, in general, very difficult to acquire by purely automatic means. Considering the pros and cons of the main algorithm used (K-Means Clustering) and the fact that segmentation can be understand differently by different people, we set our minds to several goals. When we worked with Real world Images our RGB results were so much better than HSV Color Space method. We got proper segmentations. Here some results are given below: For the segmentation we have proposed the idea of k means clustering algorithm which involves mapping the image pixel to the RGB color space and HSV color space. We proposed some function to set the input to the format the k-means iteration expects, and ran few tests where the outputs were quite impressive \hyperref[b7]{[8]}. For keeping the k parameter as small as possible, to estimate the right k automatically for the algorithm, we had to keep various intensity levels of the color on the same segment. We know that different "shades" of the same color (different intensities) are basically multiplication by a constant of a basic vector in the RGB space. The most disadvantage of our excessive usage of k-means clustering is that it means we would have to think of a k every time, which really not the perfect way because we would like to proposed the algorithm to solve this by own. Therefore we attempted to get the K automatically and so express segmentation without any user giving "hints" to the algorithm. As we explained before, for these scenarios (Game play images), RGB isn`t Performing exceptionally well. 
\section[{d) Comparison between optimal K-Means and Automated K-Means Algorithom}]{d) Comparison between optimal K-Means and Automated K-Means Algorithom}\par
For the scenario (Game play images), RGB isn`t Performing well. If the color set is known then for the same color hue we don't need to give different Segments to different intensity levels, K-Means algorithm on the HSV color space does more impressive job. From below example we can easily compare the K value between Optimal K-Means and our Automated K-Means at RGB and HSV Color space. On RGB color space, the optimal K value and the Automated K value was not so close. So on game play images, our proposed automated K-Means algorithm could not provide impressive result; On the other hand when we worked with automated K-Means on HSV Color space, we got the K value so much closer with optimal K-Means value. So most of the times it gave us impressive result and also achieved our goal. But it is difficult to say HSV result is all time better than RGB result with our proposed automated K-Means algorithm.\par
Although K-means algorithm does comparatively better task but the process commits little bit ambiguous while we have try to choose the actual k. We efficient about various ways to select the right "K" for the algorithm, like G-Means clustering, which uses statistics and hypotheses about the data to calculate the K, and X-means algorithm which didn't supposed to give a result that would glut \hyperref[b1]{[2]}. So we tried to make the method instinctive, even though we were in a strict world of images, the work is not easy and accurate but not impossible by any means. When worked with RGB color space, our proposed technique is not gave us suitable result. The optimal K value and the automated K value is quite difference. Work with normal K-means algorithm has quite few problems regarding the color segmentation of images that it we would have to think of "K" each time for segmentation result, which is one of the biggest disadvantage of k-means clustering algorithm. Basically it doesn't make too much intuition because we would like to do algorithm to execute this by own. When we worked with HSV Color space, the optimal K vale and the automated K value is quite same which assure us that our automated K-means algorithm performed better at HSV color space. 
\section[{VI. Conclusion and Future Work}]{VI. Conclusion and Future Work}\par
We discovered that even though the K-Means algorithm does a great job, the fact that we have to Year 2017 ( ) F choose a k makes using it a bit problematic. When we tried to make the process automatic but the job wasn't easy, and obviously our results are not perfect, but not too far away. The characteristics which we use for our working procedure is color: As most of us know, the different figures in the game are fruits, which usually have very different colors, and so segmentation by colors usually gives a very correct feel of objects, and can be a good preprocessing for stages like object recognition. We found the numbers we used to terminate the reduction of K based on samplings from game play images and manipulations on the results, general pictures are not supposed to work this way. However we wanted to emphasize the fact that no representation is better than the other. In the restricted world of Game play images, HSV based segmentation did much better than the RGB version. The fact that we can ignore the pixels intensity level opened up a way to clearly segment the picture based on hue only, which, in this scenario specifically is very good. HSV representation is not better generally all the time, because for real world images, the RGB representation gave us better outcomes which show us about the importance of having different representations of the same object. Those methods we implemented that did not get the best performance. We tried to get the right K but it was so much difficult for us to detect it. We only worked with RGB color pace and HSV color space. We tried to get best result with RGB and HSV color space with our automated K-Means algorithm but all time we did not get best result from our proposed algorithm. Not only that, it was so much difficult to get the right K from our proposed algorithm. In future we will try to modify our proposed automated K-Means algorithm to get the accurate K all time at all color space. Now we only worked with two color space but in future we will like to work with more color space like CMYK, L*a*b, YCBCR, HSL etc. after work with these color spaces we can easily compare which will be best for image segmentation.\begin{figure}[htbp]
\noindent\textbf{1}\includegraphics[]{image-2.png}
\caption{\label{fig_0}Figure 1 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{}\includegraphics[]{image-3.png}
\caption{\label{fig_1}}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{2}\includegraphics[]{image-4.png}
\caption{\label{fig_2}Figure 2 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{3}\includegraphics[]{image-5.png}
\caption{\label{fig_3}Figure 3 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{5}\includegraphics[]{image-6.png}
\caption{\label{fig_4}Figure 5 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{6}\includegraphics[]{image-7.png}
\caption{\label{fig_5}Figure 6 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{7}\includegraphics[]{image-8.png}
\caption{\label{fig_6}Figure 7 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{8}\includegraphics[]{image-9.png}
\caption{\label{fig_7}Figure 8 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{10}\includegraphics[]{image-10.png}
\caption{\label{fig_8}Figure 10 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{11}\includegraphics[]{image-11.png}
\caption{\label{fig_9}Figure 11 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{12}\includegraphics[]{image-12.png}
\caption{\label{fig_10}Figure 12 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{13}\includegraphics[]{image-13.png}
\caption{\label{fig_11}Figure 13 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{14}\includegraphics[]{image-14.png}
\caption{\label{fig_12}Figure 14 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{15}\includegraphics[]{image-15.png}
\caption{\label{fig_13}Figure 15 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{16}\includegraphics[]{image-16.png}
\caption{\label{fig_14}Figure 16 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{17}\includegraphics[]{image-17.png}
\caption{\label{fig_15}Figure 17 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{18}\includegraphics[]{image-18.png}
\caption{\label{fig_16}Figure 18 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{19}\includegraphics[]{image-19.png}
\caption{\label{fig_17}Figure 19 :}\end{figure}
 			\footnote{© 2017 Global Journals Inc. (US)} 		 		\backmatter  			  				\begin{bibitemlist}{1}
\bibitem[Teknomo and Tutorial]{b12}\label{b12} 	 		\textit{},  		 			Kardi Teknomo 		,  		 			-K Mean Clustering Tutorial 		.  		 	 
\bibitem[Teknomo et al.]{b14}\label{b14} 	 		\textit{},  		 			Kardi Teknomo 		,  		 			-K Mean Clustering Tutorial 		,  		 			Teknomo 		,  		 			. K-Means Clustering Kardi 		,  		 			Tutorials 		.  		 \url{http:\textbackslash \textbackslash people.revoledu.com\textbackslash kardi\textbackslash tutorial\textbackslash kMean\textbackslash }  		 	 
\bibitem[Barbakh W et al. (2006)]{b16}\label{b16} 	 		‘A family of novel clustering algorithms’.  		 			Barbakh W 		,  		 			M Crowe 		,  		 			C Fyfe 		.  	 	 		\textit{7th international conference on intelligent data engineering and automated learning},  				 (Spain)  		2006. September 2006. Springer. p. .  		 			University of Burgos 		 	 
\bibitem[Klinker et al. ()]{b0}\label{b0} 	 		‘A Physical Approach to Color Image Understanding’.  		 			Gudrun J Klinker 		,  		 			Steven A Shafer 		,  		 			Takeo Kanade 		.  	 	 		\textit{International Journal of Computer Vision}  		1990. 4  (1)  p. 738.  	 
\bibitem[Pal ()]{b26}\label{b26} 	 		‘A review on image segmentation techniques’.  		 			N R Pal 		,  		 			SK 		.  	 	 		\textit{Pattern Recognition}  		1993. 26  (9)  p. .  	 
\bibitem[
			Yzang
		 ()]{b6}\label{b6} 	 		‘A review on image segmentation techniques with remote sensing perspective’.  		 			Yzang 		.  	 	 		\textit{IAPRS}  		July 5-7, 2010.  	 	 (IAPRS. XXXVIII) 
\bibitem[Mcandrew ()]{b10}\label{b10} 	 		\textit{An Introduction to Digital Image Processing with Matlab Notes for SCM2511 Image Processing 1},  		 			A Mcandrew 		.  		2004.  		 			School of Computer Science and Mathematics, Victoria University 		 	 
\bibitem[Kaur (2012)]{b7}\label{b7} 	 		‘Bacteria foraging based image segmentation’.  		 			Navneet Kaur 		.  	 	 		\textit{An International Journal of Engineering Sciences}  		 2229-6913.  		July 2012. 6.  	 
\bibitem[Cheng ()]{b22}\label{b22} 	 		 			H D Cheng 		.  		\textit{Color Image Segmentation: Advances and Prospects. Pattern Recognition},  				2001. 34 p. .  	 
\bibitem[Cognachrome image capture device ()]{b18}\label{b18} 	 		\textit{Cognachrome image capture device},  		 \url{http://www.newtonlabs.com}  		1999.  		 			Newton Laboratories 		 	 
\bibitem[Anil Z Chitade ()]{b1}\label{b1} 	 		‘Color based image segmentation using kmeans clustering’.  		 			Anil Z Chitade 		.  	 	 		\textit{International Journal of Engineering science and Technology}  		2010. 2  (10)  p. .  	 
\bibitem[Ilea and Whelan ()]{b25}\label{b25} 	 		‘Color image segmentation using a spatial k-means clustering algorithm’.  		 			D E Ilea 		,  		 			P F Whelan 		.  	 	 		\textit{Proceedings of the Irish Machine Vision \& Image Processing Conference},  				 (the Irish Machine Vision \& Image Processing Conference)  		2006. 2006. p. .  		 			Dublin City University 		 	 	 (IMVIP 2006) 
\bibitem[Mythili and Kavitha (2012)]{b4}\label{b4} 	 		‘Color Image Segmentation using ERKFCM’.  		 			C Mythili 		,  		 			V Kavitha 		.  	 	 		\textit{International Journal of Computer Applications}  		March 2012. 41  (20)  p. .  	 
\bibitem[Dibya Jyoti Bora1, Anil Kumar Gupta2, Fayaz Ahmad Khan3 (2008)]{b5}\label{b5} 	 		‘Comparing the Performance of L*A*B* and HSV Color Spaces with Respect to Color Image Segmentation’.  	 	 		\textit{International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com}  		Dibya Jyoti Bora1, Anil Kumar Gupta2, Fayaz Ahmad Khan3 (ed.)  		 2250-2459.  		2008. February 2015. 9001  (2) .  	 	 (Certified Journal) 
\bibitem[Krishna and Narasimha ()]{b15}\label{b15} 	 		‘Genetic Kmeans algorithm’.  		 			K Krishna 		,  		 			M M Narasimha 		.  	 	 		\textit{IEEE Trans. on Systems, Man and Cybernetics}  		3. Linda GS, George CS (ed.)  		1999. 1999. 2001. Prentice-Hall. 29 p. .  	 	 (Computer Vision) 
\bibitem[Gonzalez and Woods ()]{b2}\label{b2} 	 		 			R C Gonzalez 		,  		 			R E Woods 		.  		\textit{Digital Image Processing},  				1993. Addison-Wesley.  	 
\bibitem[Tan et al. ()]{b3}\label{b3} 	 		\textit{Introduction to Data Mining},  		 			Tan 		,  		 			Steinbach 		,  		 			Kumar 		.  		4/18/2004.  	 
\bibitem[Lloyd ()]{b13}\label{b13} 	 		‘Least squares quantization in pcm’.  		 			S P Lloyd 		.  	 	 		\textit{IEEE Transactions on Information Theory}  		1957. 1957. 28 p. .  		 			Bell Laboratories 		 	 	 (Technical note) 	 (Published in 1982 in) 
\bibitem[Dass et al. (1995)]{b8}\label{b8} 	 		‘Locating Text in Complex Color Images’.  		 			Rajeshwar Dass 		,  		 			K Zhong 		,  		 			Karu 		.  	 	 		\textit{Image Segmentation Techniques" IJECT}  		Jan. -March 2012. October 1995. 3  (1)  p. .  	 	 (Pattern Recognition) 
\bibitem[Marques et al. ()]{b11}\label{b11} 	 		 			Blanca Np Marques 		,  		 			P ; Pina 		,  		 			S Singh 		,  		 			M Singh 		,  		 			C Apte 		,  		 			P Perner 		,  		 			Estoril 		.  		\textit{Pattern Recognition and Image Analysis},  				 (Portugal)  		2005. 2005.  	 
\bibitem[Brodley and Utgoff ()]{b20}\label{b20} 	 		‘Multivariate decision trees’.  		 			C E Brodley 		,  		 			P E Utgoff 		.  	 	 		\textit{Machine Learning},  				1995.  	 
\bibitem[Pena et al. ()]{b9}\label{b9} 	 		‘Principal Manifolds for Data Visualization and Dimension Reduction’.  		 			M Pena 		,  		 			W Barbakh 		,  		 			C Fyfe 		.  	 	 		\textit{chapter TopologyPreserving Mappings for Data Visualization},  				2007. 2007. Springer. p. .  	 
\bibitem[Comaniciu et al. ()]{b23}\label{b23} 	 		‘Real-Time Tracking of Non-Rigid Objects using Mean Shift’.  		 			D Comaniciu 		,  		 			V Ramesh 		,  		 			P Meer 		.  	 	 		\textit{IEEE Conf. Computer Vision and Pattern Recognition},  				2000. p. .  	 
\bibitem[Li and Shen ()]{b24}\label{b24} 	 		‘Robust image segmentation algorithm using fuzzy clustering based on kernelinduced distance measure’.  		 			Y Li 		,  		 			Y Shen 		.  	 	 		\textit{Proceedings of the International Conference on Computer Science and Software Engineering},  				 (the International Conference on Computer Science and Software Engineering)  		2008. 1 p. .  	 
\bibitem[Adams and Bischof ()]{b21}\label{b21} 	 		‘Seeded Region Growing’.  		 			R Adams 		,  		 			L Bischof 		.  	 	 		\textit{IEEE Trans. Pattern Analysis and Machine Intelligence}  		1994. 16 p. .  	 
\bibitem[Brown and Koplowitz ()]{b19}\label{b19} 	 		‘The weighted nearest neighbor rule for class dependent sample sizes’.  		 			T A Brown 		,  		 			J Koplowitz 		.  	 	 		\textit{IEEE Transactions on Information Theory}  		1979. p. .  	 
\bibitem[Veloso et al. ()]{b17}\label{b17} 	 		 			M Veloso 		,  		 			E Winner 		,  		 			S Lenser 		,  		 			J Bruce 		,  		 			T Balch 		.  		\textit{Vision-Servoed Localization and Behaviors for an Autonomous Quadruped Legged Robot Artificial Intelligence Planning Systems},  				2000.  	 
\bibitem[Chen and Wang ()]{b27}\label{b27} 	 		‘Visible color difference-based quantitative evaluation of colour segmentation’.  		 			H C Chen 		,  		 			S J Wang 		.  	 	 		\textit{Proceedings of the IEEE -72-Conference on Vision Image and Signal processing},  				 (the IEEE -72-Conference on Vision Image and Signal processing)  		2006. 153 p. .  	 
\end{bibitemlist}
 			 		 	 
\end{document}
