\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={Virtual Grader for Apple Quality Assessment using Fruit Size and Illumiation Features},
 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{2014 2014-01-15 (revised: 8 Year 2014 15 January 2014)}
\def\TheID{\makeatother }
\def\TheDate{2014 2014-01-15}
\title{Virtual Grader for Apple Quality Assessment using Fruit Size and Illumiation Features}
\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]{Ajay Pal Singh  Chuahan}

             \author[2]{Amar Partap Singh  Pharwaha}

             \affil[1]{  }

\renewcommand\Authands{ and }

\date{\small \em Received: 14 December 2013 Accepted: 2 January 2014 Published: 15 January 2014}

\maketitle


\begin{abstract}
        


The present paper reports on the development of an intelligent virtual grader for assessing apple quality using machine vision. The heart of the proposed virtual grader was executed in the form of K-Nearest Neighbor (K-NN) classifier designed on the architecture of Euclidean distance metric. KNN classifier is executed for this particular application due to its robustness to the noisy environment. The present study revealed that fruit surface illumination is one of the major deterministic parameters affecting accuracy substantially while assessing apple quality based on fruit size. The performance of the proposed virtual grader was examined experimentally under different conditions of fruit surface illumination. An industrial grade camera connected to an image grabber was used to implement the proposed industrial-grade virtual grader using machine vision. Results of this study are quite promising with an achievement of 99% efficiency at 100% repeatability when fruit surface is exposed to an optimal value of 310 lux. However, such an attempt has not been made earlier.

\end{abstract}


\keywords{classifier, machine vision, intensity, perimeter, hydraulic radius}

\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[{Introduction}]{Introduction}\par
ood Industry is one of the industries in which packaging of agriculture produce is an important task that largely depends upon grading methods. Therefore, grading of agriculture produce is required to be very fast \& accurate as far as the quality of produce is concerned. In order to accomplish this task, highly efficient algorithms are needed invariably in machine vision based inspection systems. The basis of fruit gradation is external factors including size, shape, color, defect and external damage, etc. However, consumer choice is always to have fruits with equal size. In fact, this is the basis of sorting of fruits based on their size. Proper sorting of fruit ensures uniformity in fruit size, reduce packaging and transportation costs and also provides an optimum packaging configuration. Thus in packaging industry, grading of fruits based on size is one of the important tasks that are performed. Though human graders can do this task but machine vision has proved to be a great tool that can replace human sorters for consistent and reliable judgment in estimating and comparing size of the fruits. Human graders may make different judgments on the same product at different instances and also if done by human graders it will be time consuming also. Therefore, in order to replace human graders, machine vision is the most effective and non-destructive evaluation technique. Assessment of apple quality based on its size is highly subjective due to a number of factors that may influence the crop maturity during cultivation such as geographical location, weather conditions, rainfall density, nurturing ingredients, disease and industrial effluence, etc. Due to highly subjective nature of the apple quality, it is indeed extremely difficult to make any benchmark or standards for size-based quality assessment. Most of the fruit packaging industries, in fact, largely depend upon the decision of the human experts in assessing or assigning the grade to a particular size of the apple. However, manual grading is obviously a very cumbersome process as far as efficiency and accuracy are concerned. In order to circumvent these difficulties, machine vision based intelligent systems are required urgently to replace human graders for assessing fruit quality. An attempt is made in the present work to replace human grader with a virtual grader for assessing the apple quality based on its size using machine vision. The knowledge or intelligence acquired by the human grader with experience in grading apple based on its size is, in fact, imbibed artificially in the proposed virtual grader. Different algorithms had been developed for size determination of fruits, cereals, vegetables and food products under the realm of image processing in the past, which are detailed below.\par
Emphasis on important aspects of image processing technique along with review of the most recent developments throughout the food industry was already reported \hyperref[b0]{[1]}. Another review of recent work reported on food and agricultural products along with in depth introduction to machine vision system and its components was also available \hyperref[b1]{[2]}. Different techniques for apple processing were studied and features such as hue angle, shape defect, circumference, firmness, weight, blush percentage, russet, bruise content and number of natural defects were defined \hyperref[b2]{[3]}.Reviews in the progress of computer vision in the agricultural and food industry was done and areas for further research and wider application of the technique were identified \hyperref[b3]{[4]}. Correlation and regression analysis was performed in order to determine the relationships among fruit quality parameters \hyperref[b4]{[5]}. Image analysis was done to distinguish Arthur from Arkan based upon different parameters namely perimeter, area, length, feret diameter but proper positioning of kernels was G . e-mails: ajaypal@sliet.ac.in, aps.aps67@gmail.com. mandatory \hyperref[b5]{[6]}. Pattern recognition was employed to discriminate between wheat and nonwheat and between weed seeds and stones in nonwheat part of grain samples but manual orientation of kernel was required \hyperref[b6]{[7]}.Fast Fourier transform analysis was derived from Fourier harmonics in conjunction with machine vision system for potatoes size inspection based on elongation ratio \hyperref[b7]{[8]}. To classify several cereal grains, size and shape features including kernel length, width, projected area and aspect ratio were used \hyperref[b8]{[9]}.Fourier descriptor technique \hyperref[b9]{[10]}, a method of using boundary radius and its Fourier transform to spectrum domain, was studied for size description.\par
A color vision sorter capable of performing full color spectral sorting of different varieties of fruits and vegetables including apples, peaches, tomatoes and citrus was developed for color, size and shape, with a capacity of up to 44 tons per hour \hyperref[b11]{[11]}. However, much of the above work had not been used in commercial apple sorting systems because of the constraints in speed, accuracy and flexibility. Correct classification rates (CCR) were calculated from the confusion matrix. The overall accuracy was 94 \%.Three methods were discussed for apple size determination by applying known geometrical models \hyperref[b12]{[12]}. A simplified Machine vision system was developed for estimating size of pomegranates \hyperref[b13]{[13]}. It allows the estimation of volume, surface area and weight of fruit using prediction equations developed from the relationship between projected area, shape and size. An automatic detection system for finding out surface quality parameters and defects of fruits like apples was designed \hyperref[b14]{[14]}.But this paper mainly deals with mechanical aspects. Image processing method with the disk approximation technique was employed to estimate the volume of cantaloupes of varying sizes from sets of two surface images captured with a digital camera  {\ref [15]}. Algorithm to grade papaya samples according to their size using estimated weight information with 90\% classification accuracy was reported  {\ref [16]}.A technique was developed using fuzzy sets to correlate the attributes of size, color, shape and abnormalities, obtained from tomato images, with the inner quality of the tomato samples  {\ref [17]}.\par
Another automatic strawberry sorting system was developed  {\ref [18]} with average shape and size accuracies of 98 and 100\%, respectively, regardless of the fruit orientation angle with judgment time within 1.18 s. Physical features of chocolate chip biscuits, including size, shape baked dough color, and fraction of top surface area using image analysis were measured and four fuzzy models were developed to predict consumer ratings based on these features  {\ref [19]}. Kohanz apple fruit area, perimeter and eccentricity were extracted by image processing to suggest an appropriate package design  {\ref [20]}. High Correlation between the maximum size and weight of fruit prove that the weight could become a proper quality index for apples  {\ref [21]}.An algorithm for sorting lemon based on color and size was developed and implemented in visual basic environment  {\ref [22]}. The correct classification rates were 95.45 \%, 100\%, and 86.67\% for grade 1, 2 and 3 respectively. A fuzzy image analysis method based upon size and color had been reported for mango fruit quality grading \hyperref[b15]{[23]}.The recent techniques and features of external grading systems for non-destructive operation and performance of automated quality verification systems for agriculture products were discussed \hyperref[b16]{[24]}.\par
After having rigorous literature review, it is concluded that above methods work well only for a particular quality of a fruit or vegetable or cereal with efficiency less than 100 \% and also they fail to address the effect of an important parameter that is intensity of fruit surface illumination. However based on the successful results of these studies, the authors of present paper decided to estimate fruit quality based on size using K-nearest neighbor (K-NN) classifier while considering intensity as one of the important deterministic parameters. The performance of different variants of K-NN classifier is also examined at different values of fruit surface exposures by the authors of the present paper in their earlier work on quality assessment of red delicious apples using color features \hyperref[b17]{[25]}. An intelligent virtual grader was also developed based on the architecture of Euclidean metric oriented K-NN classifier for estimation of quality of red delicious apples using color features \hyperref[b18]{[26]}. Similarly, another type of virtual grader was also developed for assessing apple quality using shape features \hyperref[b19]{[27]}. In line with this strategy, the use of K-NN classifier is extended in the present work to develop an intelligent virtual grader for estimation of apple fruit quality using size features. In fact, the work reported in the present paper is a part of the complete machine vision based apple gradation system for assessing apple quality using information related to fruit size, shape, color and surface defect. 
\section[{II.}]{II.} 
\section[{K-Nearest Neighbor (K-NN) Classifier}]{K-Nearest Neighbor (K-NN) Classifier}\par
The main goal of a classifier is to assign an object to a predefined class using the given features. Machine vision systems usually use specially designed digital image processing software to accomplish the task of classification. Size is considered to be one of the important factor on the basis of which grading of apple is done. K-NN algorithm is a widely used technique that found many applications in classification. In the present work, the concept of classification is extended to determine accurately the apple fruit quality based on its size. However, in some applications, it may fail to produce adequate results owe to lack of in depth knowledge in its implementation, yet the fact is that it is easy to fine-tune to a variety of situations because it has only one parameter, that is, the number of neighbors (k).    The image processing software, the heart of the proposed virtual grader, was executed in the form of a size-classifier using NI Vision Builder for Automated Inspection in combination with Lab VIEW. NI Vision Builder for Automated Inspection was chosen for the development of image processing software in Lab VIEW environment, as it provides an effective graphical user interface with interactive features. K-NN algorithm using Euclidian distance metric was used to execute the sizeclassifier. The size-classifier calculates the size features by carefully extracting the features from the acquired image and computes the statistical information associated with the size including perimeter and hydraulic radius.  
\section[{Global Journal of Computer}]{Global Journal of Computer} 
\section[{IV. Experimental Validation}]{IV. Experimental Validation}\par
The proposed virtual grader was designed to operate in a real time environment, however, in a highly user-interactive manner. Its operation was controlled under the supervision of specially designed Algorithm of Control \& Computations executed in the form of block diagram as back-end programming. 
\section[{a) Samples Preparation}]{a) Samples Preparation}\par
Covering a wide range of size, two hundred apples of red delicious variety were taken. Three human experts trained in the field of size-based manual grading of this particular variety of apples were given the samples. So four grades A, B, C and D having 25 samples each was selected. Fifteen samples in each grade were taken as reference samples that were commonly agreed upon by all the experts. These samples were used for training the K-NN based sizeclassifier as per the following details. The inspection image contains multiple samples. These were fed to the executed size classifier for training. The proposed size classifier was executed on the architecture of K-NN algorithm powered with Euclidean metrics. The executed size classifier was operated in three phases including training phase, classifying phase and validation phase. A known sample consists of a region in the image containing the apple size that the classifier needs to learn. The size-classifier calculates a size features and assigns the associated class label to the computed features, for each and every sample added during the training phase. Eventually, all the trained samples added to the size-classifier were saved into a file which represents a trained sizeclassifier. After training the classifier, regions were classified into their corresponding classes for size identification in apple quality. The Region of Interest (ROI) toolbar was used to define a region which was useful for training. The Annulus ROI tool was chosen for apple, because it adjusts the inner and outer radii, and also adjusts the start and end angles. Experimentation was conducted using database of 60 training samples selected by three human experts, with 15 samples in each category and at five different intensities of apple surface illumination including 170 lux, 253 lux, 310 lux, 405 lux and 486 lux. However, the optimal number of training samples (k) and illumination intensity were determined after rigorous experimental trials using executed size-classifier. In the training phase, the sizeclassifier was provided with samples of each grade, that is, A, B, C and D varying from 1 to 15 respectively. In order to do so, in training phase, the size classifier was trained first with one sample of each grade and its performance was examined at five different illumination intensities of ambient light source (natural day light) taken at different instance of time. Then the experiment was repeated again fourteen times by varying sample of each grade from two to fifteen. From repeated experimental trials, it was established that the proposed size-classifier works effectively at an illumination intensity of 310 Lux when k-NN was trained with eight (k = 9) number of training samples, each with four different grades. It was also established that when the fruit under examination was not properly exposed with proper illumination intensity, the results obtained with the proposed classifier were less accurate. Reason behind this was that when light intensity varies ambient occlusion plays its affect. Ambient occlusion adds visual realism to the image without being physically correct. The effect of ambient occlusion can well be seen in the results presented in tables 1 and 2.The range of perimeter and hydraulic radius for a grade varies with intensity.\par
phase were again given to the proposed virtual grader one by one (choosing k = 9 and illumination intensity 310 lux), however, operated in an automatic mode, which classifies and grade them according to their size content. In the classifying phase, the size classifier calculates the size features of the sample that need to be identified and classifies it among trained samples using K-NN Algorithm. The classification process was responsible to classify the input or user selected fruit by using K-NN algorithm. This measure the distance between features values of the stored fruit under test. Afterward the K-NN finds out among the stored fruit the one having shortest distance with the input and identifies and assigns the class to the input fruit. 
\section[{d) Size classifier validation}]{d) Size classifier validation}\par
Again covering a wide range of size, one thousand apples of red delicious variety were taken. Three human experts trained in the field of size-based manual grading of this particular variety were provided each with the same number of samples to have an individual trial of each. After having individual judgment from them, they were each asked to choose 200 apples of each of the four grades out of a set of one thousand apples. Then out of these four sets, 100 samples in each grade were taken as reference samples that were commonly agreed upon by all the experts. In this way, four sets of fruits containing 100 fruits in each set were selected with corresponding A, B, C and D grades. In the validation phase, the selected 100 validation samples selected by human experts were given to the proposed virtual grader operated at illumination intensity of 310 lux and keeping k=9, which classifies and grade them according to their size content. Accordingly, the performance of the virtual grader was found to be quite satisfactorily as confirmed from the results presented in the following section. 
\section[{V. Results and Discussion}]{V. Results and Discussion}\par
The proposed virtual grader was used practically to estimate the quality of red delicious apple fruits based on their size. In order to examine the performance of the proposed virtual grader, it was brought in the operational mode by switching it on. In operational mode, the size-classifier operates in the classifying phase while acquiring images automatically. As soon as the image of the apple under inspection was acquired, it automatically displays its grade along with other related parameters on the Front Panel. After having repeated experimental trials, it was found that the proposed virtual grader works effectively at an illumination intensity of 310 lux when K-NN classifier was trained with nine numbers of training samples. It had been found experimentally that the proposed virtual G confirm the results obtained in the training and classifying phases. In fact, efficiency achieved using proposed virtual grader is 99\%, if manual grading is assumed to be 100\% efficient as reference level. However this1\% variation was due to subjective judgment of human graders in perceiving the apple fruit during manual grading, which of course, is inevitable. Moreover, the repeatability of the proposed system was found to be 100\% as confirmed after rigorous experimental validation. Achievement of 99\% accuracy at repeatability of 100\%, established that Euclidean distance metric based K-NN classifier was an efficient method to translate human visual perception of grading the apple based on fruit size into machine vision. However, the manual grading was always manifested with subjective tolerance. This fact was also confirmed by three human experts chosen for manual grading. According to them, it was not possible for them also to decide the border cases. Now, in order to establish empirically the reason for successful gradation of the apple fruit under inspection by the proposed virtual grader, using acquired fruit images, size features including perimeter and hydraulic radius were estimated using image processing algorithms implemented in the LabVIEW at different fruit surface exposures.   
\section[{Conclusion}]{Conclusion}\par
A new type of virtual grader is developed to estimate apple quality from its size. The implemented system is used effectively in real time environment to grade red delicious apple using fruit size features. It has been established experimentally that Euclidean distance metric based K-NN Classifier achieves promising results for this particular application. It is also found that the efficiency is the highest at a particular value of illumination intensity as well as optimal number of \begin{figure}[htbp]
\noindent\textbf{}\includegraphics[]{image-2.png}
\caption{\label{fig_1}G}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{12}\includegraphics[]{image-3.png}
\caption{\label{fig_2}Figure 1 Figure 2 :G}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{3}\includegraphics[]{image-4.png}
\caption{\label{fig_3}Figure 3 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{4}\includegraphics[]{image-5.png}
\caption{\label{fig_4}Figure 4 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{}\includegraphics[]{image-6.png}
\caption{\label{fig_5}}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{}\includegraphics[]{image-7.png}
\caption{\label{fig_7}Virtual}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{}\includegraphics[]{image-8.png}
\caption{\label{fig_8}}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{1} \par 
\begin{longtable}{P{0.05813679245283018\textwidth}P{0.1964622641509434\textwidth}P{0.004009433962264151\textwidth}P{0.11627358490566037\textwidth}P{0.17441037735849058\textwidth}P{0.026061320754716982\textwidth}P{0.07417452830188678\textwidth}P{0.1964622641509434\textwidth}P{0.004009433962264151\textwidth}}
Intensity\tabcellsep Grade-A\tabcellsep \tabcellsep \multicolumn{2}{l}{Grade-B}\tabcellsep \multicolumn{2}{l}{Grade-C}\tabcellsep \multicolumn{2}{l}{Grade-D}\\
(Lux)\tabcellsep Pixels\tabcellsep mm\tabcellsep Pixels\tabcellsep Mm\tabcellsep Pixels\tabcellsep mm\tabcellsep Pixels\tabcellsep mm\\
486\tabcellsep \multicolumn{2}{l}{2485-2290 391-360}\tabcellsep 2321-1991\tabcellsep \multicolumn{2}{l}{365-313 2067-1972}\tabcellsep 325-310\tabcellsep \multicolumn{2}{l}{2023-1977 318-311}\\
405\tabcellsep \multicolumn{2}{l}{2413-2239 379-352}\tabcellsep 2277-1946\tabcellsep \multicolumn{2}{l}{358-306 2010-1844}\tabcellsep 316-290\tabcellsep \multicolumn{2}{l}{1857-1741 292-274}\\
310\tabcellsep \multicolumn{2}{l}{2347-2131 369-335}\tabcellsep 2141-1908\tabcellsep \multicolumn{2}{l}{337-300 1902-1730}\tabcellsep 299-272\tabcellsep \multicolumn{2}{l}{1736-1682 273-264}\\
253\tabcellsep \multicolumn{2}{l}{2329-2143 366-337}\tabcellsep 2103-1895\tabcellsep \multicolumn{2}{l}{331-298 1965-1685}\tabcellsep 309-265\tabcellsep \multicolumn{2}{l}{1743-1696 274-267}\\
170\tabcellsep \multicolumn{2}{l}{2361-1978 371-311}\tabcellsep 2025-1717\tabcellsep \multicolumn{2}{l}{318-270 1883-1749}\tabcellsep 296-275\tabcellsep \multicolumn{2}{l}{1679-1647 264-259}\end{longtable} \par
 
\caption{\label{tab_0}Table 1 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{2} \par 
\begin{longtable}{P{0.1608108108108108\textwidth}P{0.14932432432432433\textwidth}P{0.022972972972972974\textwidth}P{0.14932432432432433\textwidth}P{0.022972972972972974\textwidth}P{0.14932432432432433\textwidth}P{0.022972972972972974\textwidth}P{0.14932432432432433\textwidth}P{0.022972972972972974\textwidth}}
Intensity\tabcellsep Grade-A\tabcellsep \tabcellsep Grade-B\tabcellsep \tabcellsep Grade-C\tabcellsep \tabcellsep \multicolumn{2}{l}{Grade-D}\\
(Lux)\tabcellsep Pixels\tabcellsep mm\tabcellsep Pixels\tabcellsep Mm\tabcellsep Pixels\tabcellsep mm\tabcellsep Pixels\tabcellsep mm\end{longtable} \par
 
\caption{\label{tab_1}Table 2 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{3} \par 
\begin{longtable}{P{0.0576271186440678\textwidth}P{0.273728813559322\textwidth}P{0.14406779661016947\textwidth}P{0.2689265536723164\textwidth}P{0.1056497175141243\textwidth}}
Grade\tabcellsep \multicolumn{2}{l}{Perimeter Range}\tabcellsep \multicolumn{2}{l}{Hydraulic Radius Range}\\
\tabcellsep Pixels\tabcellsep Mm\tabcellsep Pixels\tabcellsep Mm\\
A\tabcellsep 2347-2131\tabcellsep 369-335\tabcellsep 165-158\tabcellsep 26-25\\
B\tabcellsep 2141-1908\tabcellsep 337-300\tabcellsep 156-149\tabcellsep 25-23\\
C\tabcellsep 1902-1730\tabcellsep 299-272\tabcellsep 138-128\tabcellsep 22-20\\
D\tabcellsep 1736-1682\tabcellsep 273-264\tabcellsep 130-121\tabcellsep 20-19\\
VI.\tabcellsep \tabcellsep \tabcellsep \tabcellsep \end{longtable} \par
 
\caption{\label{tab_2}Table 3 :}\end{figure}
 			\footnote{© 2014 Global Journals Inc. (US)} 		 		\backmatter   			 
\subsection[{Acknowledgement}]{Acknowledgement}\par
The authors would like to acknowledge Department of Electronics    			  			  				\begin{bibitemlist}{1}
\bibitem[Sapirstein et al. ()]{b8}\label{b8} 	 		‘An Instrument system for cereal grain classification using digital image analysis’.  		 			H D Sapirstein 		,  		 			M Neuman 		,  		 			E H Wright 		.  	 	 		\textit{Cereal Sci}  		1987. 6 p. .  	 
\bibitem[Tao et al. ()]{b7}\label{b7} 	 		‘Automated machine vision inspection of potatoes’.  		 			Y Tao 		,  		 			C T Marrow 		,  		 			P H Heinemann 		.  	 	 		\textit{ASAE}  		1990. p. .  	 
\bibitem[Jiang and Merickel]{b9}\label{b9} 	 		‘Boundary estimation in complex images using fourier descriptors’.  		 			M B Jiang 		,  		 			Merickel 		.  	 	 		\textit{Proc},  				 (null)  		 	 
\bibitem[Salvador et al. ()]{b4}\label{b4} 	 		‘Correlations between Fruit Size and Fruit quality in apple trees with high and standard crop load levels’.  		 			F R D Salvador 		,  		 			M Fisichella 		,  		 			M Fontanar 		.  	 	 		\textit{Journal of Fruit and Ornamental Plant Research}  		2006. 14  (2)  p. .  	 
\bibitem[Singh and Singh ()]{b18}\label{b18} 	 		‘Development of an intelligent virtual grader for estimation of fruit quality’.  		 			A J P Singh 		,  		 			A P Singh 		.  	 	 		\textit{International Journal of Computer Applications}  		2013. 62  (17)  p. .  	 
\bibitem[Zayas et al. ()]{b5}\label{b5} 	 		‘Discrimination between Arthur and Arkan wheat by image analysis’.  		 			I Zayas 		,  		 			Y Pomeranz 		,  		 			F S Lai 		.  	 	 		\textit{Cereal Chem}  		1985. 63  (2)  p. .  	 
\bibitem[Zayas et al. ()]{b6}\label{b6} 	 		‘Discrimination of wheat and Nonwheat components in Grain Samples by image analysis’.  		 			I Zayas 		,  		 			Y Pomeranz 		,  		 			F S Lai 		.  	 	 		\textit{Cereal Chem}  		1989. 66  (3)  p. .  	 
\bibitem[Hobani and Ai-Janobi ()]{b13}\label{b13} 	 		‘Estimation of pomegranate shape and size by Machine vision’.  		 			Ali I Hobani 		,  		 			A Ai-Janobi 		.  	 	 		\textit{J. King Saud Univ}  		1997. 9  (1)  p. .  	 	 (Agric.Sci) 
\bibitem[Kavd?r and Guyer ()]{b2}\label{b2} 	 		‘Evaluation of different pattern recognition techniques for apple sorting’.  		 			I Kavd?r 		,  		 			D E Guyer 		.  	 	 		\textit{Biosystems Engineering}  		2008. 99 p. .  	 
\bibitem[Brosnan and Sun ()]{b0}\label{b0} 	 		‘Improving quality Inspection of food products by computer vision systems*/a review’.  		 			T Brosnan 		,  		 			D W Sun 		.  	 	 		\textit{Journal of food Engineering}  		2004. 61 p. .  	 
\bibitem[Brosnan and Sun ()]{b3}\label{b3} 	 		‘Inspection and grading of agricultural and food products by computer vision systems*/a review’.  		 			T Brosnan 		,  		 			D W Sun 		.  	 	 		\textit{Computers and Electronics in Agriculture}  		2002. 36 p. .  	 
\bibitem[Singh and Singh ()]{b17}\label{b17} 	 		‘Intelligent estimator for assessing apple fruit Quality’.  		 			A J P Singh 		,  		 			A P Singh 		.  	 	 		\textit{International Journal of Computer Applications}  		2012. 60  (5)  p. .  	 
\bibitem[Intl and Conf ()]{b10}\label{b10} 	 		 			Intl 		,  		 			Conf 		.  		\textit{Pattern Recognition},  				1988. 1 p. .  	 
\bibitem[Patel et al. ()]{b1}\label{b1} 	 		‘Machine vision system: a tool for quality inspection of food and agricultural products’.  		 			K K Patel 		,  		 			A Kar 		,  		 			S N Jha 		,  		 			M A Khan 		.  	 	 		\textit{J Food SciTechnol}  		2012. 49  (2)  p. .  	 
\bibitem[Tao ()]{b11}\label{b11} 	 		‘Methods and apparatus for sorting objects including stable color transformation’.  		 			Y Tao 		.  	 	 		\textit{United States Patent 5},  				1996. p. .  	 
\bibitem[Rosli et al. ()]{b15}\label{b15} 	 		‘Mohd Nazari bin Abu Bakar, Khairul Adilahbt Ahmad, Ab Razak Mansor’.  		 			T Rosli 		,  		 			B Razak 		,  		 			Mahmod B Othman 		.  	 	 		\textit{International Conference on Agricultural, Environment and Biological Sciences (ICAEBS'2012) Phuket},  				May 26-27, 2012. p. .  	 	 (Mango Grading By Using Fuzzy Image Analysis) 
\bibitem[Rao and Renganathan ()]{b12}\label{b12} 	 		‘New approaches for size Determination of Apple Fruits for automatic Sorting and Grading’.  		 			P Rao 		,  		 			S Renganathan 		.  	 	 		\textit{Iranian journal of Electrical and Computer Engineering}  		2002. 2002. 1  (2)  p. .  	 	 (Summer Fall) 
\bibitem[Filibertopla et al. ()]{b14}\label{b14} 	 		‘On-Line machine vision system for Fast fruit colour sorting using low cost architecture’.  		 			Jose S Filibertopla 		,  		 			Jose M Sanchez 		,  		 			Sanchiz 		.  	 	 		\textit{SPIE system based on color and size},  				2010. 4 p. .  	 
\bibitem[Salem]{b16}\label{b16} 	 		‘Recent Methods and Techniques of External Grading Systems for Agricultural Crops Quality Inspection’.  		 			Meftab Salem 		,  		 			Alfatni 		.  	 	 		\textit{International Journal of Food Engineering}  		7 p. .  	 
\bibitem[Singh and Singh ()]{b19}\label{b19} 	 		‘Virtual Grader for Assessing Apple Quality using Shape features’.  		 			A J P Singh 		,  		 			A P Singh 		.  	 	 		\textit{Wulfenia Journal}  		2014. 21  (7)  p. .  	 
\end{bibitemlist}
 			 		 	 
\end{document}
