Sunteți pe pagina 1din 58

120280723002

Quality Analysis and Classification of Bananas Using


Digital Image Processing

By:
Mr. Sanjay Chaudhary
Enrolment Number: 120280723002
M.E. (Information Technology)

Guided By:
Prof. Bhavesh Prajapati
Assistant Professor,
Information Technology Department,
L. D. College of Engineering,
Ahmedabad-15

A Thesis Submitted to
Gujarat Technological University
In Partial Fulfillment of the Requirements for
The Degree of Master of Engineering
in Information Technology

MAY 2014

Computer Engineering Department,


L. D. College of Engineering,
Ahmedabad-15
i

120280723002

CERTIFICATE

This is to certify that research work embodied in this thesis entitled Quality Analysis
and Classification of Bananas Using Digital Image Processing was carried out by
Mr. Sanjaykumar R. Chaudhary Enrollment No. 120280723002 at L. D. College of
Engineering for partial fulfillment of M.E. degree to be awarded by Gujarat
Technological University. This research work has been carried out under my supervision
and is to my satisfaction.

Date: 12/05/2014
Place: Ahmedabad

Prof. Bhavesh Prajapati


Assistant Professor,
I.T. Department
L.D. College of Engineering
Ahmedabad.

Prof. Dhaval Parikh


Associate Professor and Head,
Computer/I.T. Department
L.D. College of Engineering
Ahmedabad.

Dr M. B. Dholakia
Principal,
L.D. College of Engineering
Ahmedabad.

ii

120280723002

COMPLIANCE CERTIFICATE

This is to certify that research work embodied in this thesis entitled Quality Analysis
and Classification of Bananas Using Digital Image Processing was carried out by
Mr. Sanjaykumar R. Chaudhary Enrollment No. 120280723002 at L. D. College of
Engineering (028) for partial fulfillment of Master of Engineering in Information
Technology degree to be awarded by Gujarat Technological University. He has compiled
to the comments given by the Mid Semester Thesis Reviewer to my satisfaction.

Date: 12/05/2014
Place: Ahmedabad

Mr. Sanjaykumar R. Chaudhary


(120280723002)

Prof. Bhavesh Prajapati


Assistant Professor,
I.T. Department
L.D. College of Engineering
Ahmedabad.

iii

120280723002

THESIS APPROVAL

This is to certify that research work embodied in this thesis entitled Quality Analysis
and Classification of Bananas Using Digital Image Processing was carried out by
Mr. Sanjaykumar R. Chaudhary Enrollment No. 120280723002 at L. D. College of
Engineering (028) is approved for award of the degree of Master of Engineering in
Information Technology by Gujarat Technological University.

Date:
Place:
Examiner(s):

---------------------------(
)

-------------------------(
)

iv

-------------------------(

120280723002

PAPER PUBLICATION CERTIFICATE

This is to certify that research work embodied in this thesis entitled Quality Analysis
and Classification of Bananas Using Digital Image Processing was carried out by
Mr. Sanjaykumar R. Chaudhary Enrollment No. 120280723002 at L. D. College of
Engineering (028) for partial fulfillment of Master of Engineering in Information
Technology degree to be awarded by Gujarat Technological University, has been
published/presented at IJARCSSE- January 2014 and accepted at IJCSE-April 2014.

Date: 12/05/2014
Place: Ahmedabad

Mr. Sanjaykumar R. Chaudhary


(120280723002)

Prof. Bhavesh Prajapati


Assistant Professor
I.T. Department,
L.D. College of Engineering
Ahmedabad.

Dr M. B. Dholakia
Principal
L.D.College of Engineering
Navrangpura, Ahmedabad

120280723002

DECLARATION OF ORIGINALITY

I hereby certify that I am the sole author of this thesis and that neither any part of
this thesis nor the whole of this thesis has been submitted for degree of any other
University or Institution.
I certify that, to the best of my knowledge, my thesis does not infringe upon
anyones copyright nor violate any proprietary rights and that any ideas, techniques,
quotations, or any other material from the work of other people included in my thesis,
published or otherwise, are fully acknowledged in accordance with the standard
referencing practices.
I declare that this is a true copy of my thesis, including any final revisions, as
approved by my thesis review committee.

Date: 12/05/2014
Place: Ahmedabad

Mr. Sanjaykumar R. Chaudhary


(120280723002)
Verified

Prof. Bhavesh Prajapati


Assistant Professor
I.T. Department,
L.D. College of Engineering
Ahmedabad.

vi

120280723002

Acknowledgement
I wish to express my deep sense of gratitude to my Guide, Prof. Bhavesh
Prajapati, Assistant Professor, I.T. Department, L. D. College of Engineering for his
great efforts and instructive comments in the dissertation work.
He has helped me plan the work from the beginning of the research work. He
allowed me a great deal of freedom to choose a research topic. Also, he took care to help
me narrow down the choices for the topic. Without his valuable support, it would have
been very difficult to do quality and directional work.
I would also like to extend my gratitude to Prof. Hiteishi Diwanji for their
invaluable and precious guidance and continuous encouragement and motivation.
I would also like to thank my family and my friends at L. D. College of
Engineering and Ashish Chaudhary for their support and help during the Research work.
I would also like to thank expert of bananas Nirav Chaudhary for their support and
help during the Research work.

Sanjay Chaudhary

vii

120280723002

Table of Contents
Title Page ........................................................................................................................ i
Thesis Approval............................................................................................................. ii
Certificate ..................................................................................................................... iii
Compliance Certificate................................................................................................. iv
Paper Publication Certificate ............................................................................................ v

Declaration of Originality ............................................................................................ vi


Acknowledgement ....................................................................................................... vii
Table of Content ......................................................................................................... viii
List of Figures ................................................................................................................ x
List of Tables ................................................................................................................ xi
Abstract ....................................................................................................................... xii

1. Introduction .............................................................................................................. 1
1.1. Introduction..................................................................................................... 2
1.2. Problem Statement ........................................................................................... 3
1.3. Aim of Dissertation .......................................................................................... 3
1.4 Organization of Thesis....................................................................................... 3

2. Literature Review ..................................................................................................... 4


2.1. Bananas Properties ........................................................................................... 5
2.2. Consumer Characteristics .................................................................................. 5
2.3. Color Spaces ................................................................................................... 6
2.3.1. RGB Color Model ................................................................................. 6
2.3.2. CIELAB color space .............................................................................. 6
2.3.3. HSV color space ................................................................................... 7

2.4. Segmentations Methods ................................................................................... 9


2.4. Study of Papers ................................................................................................ 9

3. Existing Systems ...................................................................................................... 11


4. Proposed Methodology ............................................................................................. 14
4.1. Proposed Algorithm ...................................................................................... 15
4.2. Methodology ................................................................................................. 15

viii

120280723002
4.2.1. Image Acquisition ...................................................................................... 16
4.2.2. Image Segmentation .................................................................................. 18
4.2.3. Feature Extraction .................................................................................... 19
4.2.4. Classification ............................................................................................ 20

4.3. Discriminate Power of Selected Features .......................................................... 22

5. Results and Discussion .............................................................................................. 25


5.1. Classification Performance .............................................................................. 26
5.2. Comments Resolution..................................................................................... 26

Conclusion and Future Work ..................................................................................... 27


Publication ................................................................................................................... 28
References .................................................................................................................... 29

ix

120280723002

List of Figures
Figure 1: Seven stages of Banana ................................................................................ 2
Figure 2: CIELAB color space .................................................................................... 7
Figure 3: HSV color space............................................................................................ 8
Figure 4: Mapping of function to stage of bananas ...................................................... 12
Figure 5: Process of classification of banana ............................................................... 16
Figure 6: Pop up message allows you to select way of input ....................................... 16
Figure 7: Pop up message allows you to select demo image ........................................ 16
Figure 8: Pop up window allows you to select input image ......................................... 17
Figure 9: Image given to algorithm for classification .................................................. 17
Figure 10: Pop up allow user to select background color ............................................. 18
Figure 11: Figure Window allow user to select region of background ........................... 19
Figure 12: Figure window of segmented image ............................................................ 19
Figure 13: Classifier for Proposed Scheme ................................................................... 21
Figure 14: Two Bunch of bananas at different stages .................................................... 22
Figure 15: Segmented image of Green part .................................................................. 23
Figure 16: Segmented image of Yellow part ................................................................ 23
Figure 17: Segmented image of Brown part .................................................................. 24

120280723002

LIST OF TABLE
Table 1: Relationship between stages of bananas and physical characteristics ................. 5
Table 2: Scale related to consumer characteristics ........................................................... 6
Table 3: Mean value Segmentation Table ..................................................................... 18
Table 4: Matrix as input for classifier ........................................................................... 20
Table 5: Classification Criteria Table............................................................................ 20
Table 6: Performance Index Table ............................................................................... 26

xi

120280723002

Abstract
Traditionally quality inspection of banana can be done by two ways: either
instrumental tools or human inspectors. Instrumentation technique, in the case of bananas
these techniques are usually destructive requiring the removal and flattening of the peel
for the measurement where decisions taken by human inspectors may be affected by
external factors like: tiredness, bias, revenge or human psychological limitations. An
interesting alternative is image processing can overcome limitations of these two
techniques. Digital Image processing can classify the banana fruit with speed and
accuracy. Good algorithms available in image processing which can classify banana
based on their color and texture characteristics, but limitation is that they can work well
on single banana. Bananas is sold in bunch of dozen and thats why it is important to
analyze quality in bunch. This paper proposes the technique of digital image processing to
classify the bananas hand. Features including CIELAB, and HSV colorspaces have been
used for classification of bananas images. Result shows better accuracy of proposed
algorithm.

Author: Sanjaykumar R. Chaudhary


Enrolment Number: 120280723002
Degree: Master of Engineering
Department: Information Technology
Guide: Prof. Prof. Bhavesh Prajapati
Designation: Assistant Professor
Department: I.T. Department

xii

120280723002

Chapter 1

Introduction

120280723002

1.1 Introduction
Bananas are the forth most important staple crops in the world and India is the leading
country in the production of banana [1]. Classification of bananas is important task for
banana industry. Classification of bananas can be done by basically three methods: (1)
Human visual inspection; (2) Instrumental techniques; (3) Computerized image analysis
techniques.
Human visual inspection is a highly subjective, tedious, time-consuming and laborintensive process. By contrast, instrumental techniques (i.e., colorimeters) allow accurate
and reproducible measurements of the colors not influenced by the observer. However,
their main disadvantages are that the surface color must be quite uniform and that many
locations on the sample must be measured to obtain a representative color profile. In
addition, in the case of bananas these techniques are usually destructive requiring the
removal and flattening of the peel for the measurement. An interesting alternative is
computerized image analysis techniques (also known as computer vision systems), which
overcome the deficiencies of visual and instrumental techniques and offer an objective
measure for color and other physical factors [8].
Development in the field of image processing especially in its field image segmentation
which is used to extract regions of interest has proven wonders in various applications
like Signature verification, Face recognition, Thumb impression verification, Automatic
character recognition, Industrial machine vision for assembly and inspection etc. But the
potential of image segmentation in the field of agriculture is yet to be exploited for the
daily use. Image Processing can use to analyze the fruit quality on the basis of its color,
size and weight. [9]
A mainly color change in banana during ripening is based on the peel color rather than the
pulp color and hence color of banana peel has been used in the assessment of the stages of
ripeness of banana. Commercial standard color charts are available in which 7 stages of
peel color were reproduced and translated to a numerical scale where Stage 1=all green,
2= green with trace of yellow, 3= more green than yellow, 4= more yellow than green, 5=
yellow with trace of green, 6= full yellow, 7= full yellow with brown spots [3].

Figure 1: Seven stages of Banana [3]

120280723002

1.2 Problem Statement:


Today quality inspection of bananas in industry is mostly done by human inspectors, due
to limitation of instrumental tool and image processing doesnt have algorithm to classify
bananas hand (bunch of bananas). Mostly image processing is used for classification of
other fruits and grain but bananas characteristics are different from other fruits.
- Bananas always sold in group or bunch of dozen where are other fruits sold
singly.
- Bananas are important at all level, means people purchase bananas which are at
any level from 1 to 7, where other fruits are important at mature level, like for
apple mature stage is red, for orange maturity stage is orange, similarly for other
fruits have maturity stage.
- Bananas have maturity stage at stage 6 and 7, but people can purchase bananas at
different stage for backing use.
- According to experts if single banana is changed their stage higher from other
bananas than we have to classify that bunch of bananas to higher stage.
- Listed algorithms are work on average of whole image thats why it will miss
classifying bananas bunch in the above cases.
- In case as discussed in section 4.3 others systems mostly miss classify stage of
bananas.
- Also other system didnt take consumer characteristics in mind for selection of
features or in the classification process.
1.3 Aim of Dissertation:
The objectives of this study were: (i) To implement a standardized computer vision
system for classification of bananas by characterize quantitatively color changes during
ripening using the sRGB, L*a*b* and HSV color spaces; (ii) To identify features of
interest which can be related with the ripening stages such as color and textural features
of the images, and; (iii) To develop a statistical model using selected features to identify
the seven ripening stages of bananas from samples previously classified by expert visual
inspection. We were taken consumer behavior in mind to selection of features, like:
%BSA is factor which consumers mostly take in mind to purchase banana. To increase
importance of algorithm we can provide extra information related to stages of bananas
like: chemical, mechanical properties of bananas, those properties are change with change
in stage of bananas.
1.4 Organization of Thesis:
Thesis is organized in 5 chapters. 1 st chapter gives introduction and brief idea about the
problem. 2nd chapter covers all the basic concepts of literature review. 3rd chapter covers
th
existing work. Proposed work and implementation are in 4 th chapter. In chapter 5 results
collected in the research. After that conclusion, references, and publication are covered.

120280723002

Chapter 2

Literature Review

120280723002

For selection of features of image processing it is important to first we know little about
bananas properties and consumer characteristics. We were analyzing bananas
characteristics using image processing color space and mapping to different stage of
bananas in this process we consider consumer characteristics to increase the importance
of system.
2.1 Bananas Properties
Bananas physical, chemical and mechanical properties are change from stage 1 to 7, and
related to that color properties of bananas also change, so that if we can successfully
measure the stage of bananas then we can get approximately right information of
physical, mechanical and chemical properties. Skin color changes from green to yellow,
firmness is decreased, fruit gets softened and starch is converted into sugar. A mainly
color change in banana during ripening is based on the peel color rather than the pulp
color and hence color of banana peel has been used in the assessment of the stages of
ripeness of banana [3].
Parameters
Pulp/Peel Ratio
Peel Color
Pulp Color

5
2.0
Yellow with Trace
of Green
White

Stage of Ripening
6
2.3
All Yellow
White Creamy

7
2.7
Yellow with brown
spots
Yellowish Creamy

Table 1: Relationship between stages of bananas and physical characteristics


As the ripening proceed, pulp to peel ratio was increased from 2.0 in stage 5 to 2.7 in
stage 7 when the fruits become fully ripened. (Table1). This could be due to the osmotic
transfer of moisture from the peel to the pulp as sugar content of pulp increased. It has
been suggested that pulp to peel ratio can be considered as a coefficient of ripeness. The
intensity of greenness of the peel also decreased from stage 5 to stage 7 [3].
2.2 Consumer Characteristics:
To examine consumer purchasing behavior five characteristics are important: damage
(dents and breaks in skin), markings (includes russet, waxy build-up, etc), brilliance
(degree of shine), maturity/color, and one less used is bruising. The peel color of bananas
is considered as the first quality parameter evaluated by consumers. Fruit maturity/color
was based on the ground color of banana. The ground color is referred to the base color of
the fruit; a green ground color could reflect immaturity, as in bananas; and more brown
spots reflect over-ripeness of bananas. Final classification after calculation of measure: A
quality measure was calculated by summing together the values for bruising, marking,
and damage. All the quality measure values were summed together to create a total
quality value. [6]. Development of spots expressed as %BSA (brown spots as a
percentage of the total area) [8].
Once the quality characteristics to be examined were identified, an assessment process
was developed. For bruising, markings, and damage the same evaluation technique and
scale values were used [6].

120280723002

Scale

Fruit Appearance (For


bruising, markings, and
damage)

Very shiny looking

Shiny looking

Glossy looking

Dull looking

Standard (brilliance)
Less than 10 % of the fruit on display has the
negative quality characteristic present
10 to 30 % of the fruit on display has the
negative quality characteristic present
30 to 50 % of the fruit on display has the
negative quality characteristic present
Greater than 50 % of the fruit on display has the
negative quality characteristic

Table 2: Scale related to consumer characteristics


2.3 Color Spaces
Color plays a major role in the assessment of external quality in food industries and food
engineering research. Color is basically specified by the geometry and spectral
distributions of three elements: [i] the light source, [ii] the reflectivity of the sample, and
[iii] the visual sensitivity of observer.
To measure characteristics of bananas to classification factors following three color
spaces model of image processing are important.
2.3.1 RGB Color Model
The RGB (Red, Green, Blue) color model is an especially important one in digital image
processing because it is used by most digital imaging devices (e.g., monitors and color
cameras). In the RGB model, a color is expressed in terms that define the amounts of
Red, Green and Blue light it contains.
Defines the transformation from floating point nonlinear R`G`B` values to sRGB: The
nonlinear R`G`B` values are transformed to linear sRGB values by
If R`, G`, B` 0.04045
sR =

`
.

, sG =

, sB

`
.

else if R`, G`, B`>0.04045


sR = -(
sG = -(
sB = -(

`
`

.
`
.

)2.4,

)2.4,

)2.4

2.3.2 CIELAB color space


CIE specified color space characterized as being less illumination-dependent and the
commonly used L*a*b* or CIELAB [7]. L* is the luminance or lightness component that
goes from 0 (black) to 100 (white), and a* (from green to red) and b* (from blue to
yellow) are the two chromatic components, varying from 120 to +120.

120280723002

Figure 2: CIELAB colorspace [14][15]


The definition of L*a*b* is based on the intermediate system CIE XYZ which simulates
the human perception. The knowledge of these effects, such as the variations of L*, a*,
and b* for a particular shape of the sample could be useful for developing image
processing correction algorithms which can permit a better correlation among product
quality. [7]
Defines the transformation from sRGB values to CIEXYZ:
0.4124
= 0.2126
0.0193

0.3576 0.1805
0.7152 0.0722
0.1192 0.9505

sR
sG
sB

Defines the transformation from CIEXYZ to CIELAB :


L* = 116 f( ) 16
a* = 500 [f( ) - f( )]
b * = 200 [f( ) - f( )]
Where
f(q) =

q if q > 0.008856
7.787q +

otherwise

Xn, Yn, and Zn correspond to the XYZ values of a reference white


chart (q{X/Xn, Y/Yn, Z/Zn}).
The total color difference between two color in L*, A* and b*
coordinates may be evaluated as
E*ab = [(L*)2 + (a*)2 + (b*)2]1/2
2.3.3 HSV color space:
The HSV (Hue, Saturation, and Value) color model describes a color in terms of how it is
perceived by the human eye. This is useful when processing images to compare two
colors, or for changing a color from one to another. The HSV model is also a more useful

120280723002

model for evaluating or measuring an object's color characteristics, such as the


"yellowness" of a banana. HSV separates color into three components varying from 0 to 1
(when it is calculated using the function rgb2hsv available in Matlab);

The hue (H) of a color refers to which pure color it resembles. All tints, tones and
shades of red have the same hue. Hues are described by a number that specifies
the position of the corresponding pure color on the color wheel, as a fraction
between 0 and 1. Value 0 refers to red; 1/6 is yellow; 1/3 is green; and so forth
around the color wheel.

The saturation (S) of a color describes how white the color is. A pure red is fully
saturated, with a saturation of 1; tints of red have saturations less than 1; and white
has a saturation of 0.

The value (V) of a color, also called its lightness, describes how dark the color is.
A value of 0 is black, with increasing lightness moving away from black.

Figure 3: HSV color space[16][17]


This diagram, called the single-hexcone model of color space, can help you visualize the
meaning of the H, S, and V parameters.

The outer edge of the top of the cone is the color wheel, with all the pure colors.
The H parameter describes the angle around the wheel.

The S (saturation) is zero for any color on the axis of the cone; the center of the
top circle is white. An increase in the value of S corresponds to a movement away
from the axis.

The V (value or lightness) is zero for black. An increase in the value of V


corresponds to a movement away from black and toward the top of the cone.

The Ostwald diagram corresponds to a slice of this cone. For example, the triangle
between red, white, and black is the Ostwald diagram for the varieties of red.

120280723002

Defines the transformation from sRGB to HSV :


V = max(R, G, B)
S=
1 +

H= 2+

3 +

( , , )

( , , )
( , , )
( , , )

for V = R
for V = G
for V = B

2.4 Segmentation Methods


Image segmentation is the process of dividing image into multiple parts. There are many
different ways to perform image segmentation, like : Thresholding methods such as
Otsus method, Color-based Segmentation such as K-means clustering, Transform
methods such as watershed segmentation, Texture methods such as texture filters, etc.
Thresholding is most commonly used techniques, determining a threshold value as a
criterion to select required region of interest. Selection of threshold value manually
requires trial and error method and is time consuming and chances of bias is also possible.
For selection of segmentation method we consider first criteria is color, means we have to
segment color image thats why we cannot use thresholoding. Second criteria is surface of
fruits, or bananas. Surface of bananas are curved thats why it will possible change of
intensity of color. From those two criteria use of color based segmentation method using
k-means clustering is best suited, also use of CIELAB is important in fruits. CIELAB
colorspace is less illuminant dependent so that it is widely used in fruits quality analysis
or classification.
In this paper we were used color-based segmentation methods. This method segment
colors in an automated fashion using the L*a*b* color space and K-means clustering. Kmeans clustering takes number of clusters as input and based on that it create distance
matrix. It find cluster in such away so that objects within each cluster are as close to each
other as possible, and as far from objects in other clusters as possible.
2.5 Study of Papers
2.5.1 Title: Predicting Ripening Stages of Bananas (Musa cavendish) by Computer
Vision
Authors: F. Mendoza, P. Dejmek, J.M. Aguilera
Summary: They have implemented system to predict the ripening stages of bananas. Two
simple color features from each image (mean value and variance of the intensity
histogram of image) were extracted and analyzed using the RGB, HSV and CIELAB
color spaces with classification purposes. Results show that the three evaluated sets were
able to correctly predict with more than 94% the ripening stages of bananas as
professional visual perception [8].
Issues: As discussed in problem statement this system classify banana in to different
stage but if we apply this algorithm to group of bananas with different stage it were miss
classified the stage of average of whole image. If we apply this algorithm to example

120280723002

given in section 4.3 it classify it to stage 4 or stage 5 because of average of green and
yellow.
2.5.2 Title: Calibrated color measurements of agricultural foods using image analysis
Authors: Fernando Mendozaa, Petr Dejmek, Jose M. Aguilera
Summary: Implemented system to quantify standard color of fruit and vegetables in
sRGB, HSV and L*a*b* color spaces. The results show that sRGB standard (linear
signals) was efficient to define the mapping between R`G`B` (no-linear signals) from the
digital camera and a device-independent system such as CIE XYZ. L*a*b* system is
suggested as the best color space for quantification in foods with curved surfaces [7].
2.5.3 Title: Hybrid Segmentation of Peel Abnormalities in Banana Fruit
Authors: D.Surya Prabha and J.Satheesh Kumar
Summary: Automation of banana fruit analysis based on morphological features likes:
Mean Square Error (MSE) and Similarity Measure (SSIM) will help banana industries for
better quality analysis. They have developed a new method for better segmentation and
categorization of banana fruits. Result shows better accuracy of proposed algorithm
compared to other segmentation methods like: Thresoloding, Clustering, color image
segmentation. Hybrid segmentation method improves results by combing edge based and
region based segmentation [4].
2.5.4 Title: Identification and Classification of Bulk Fruits Images using Artificial Neural
Networks
Authors: Dayanand Savakar
Summary: The study reveals that the Classification of Chikoo is about 94% and Mango
and Orange is 92% using color and texture feature sets. Classification using texture
analysis is better than classification using color analysis. Best results are obtained by
using the combination of both color and texture features [5].
2.5.5 Title: The Development of a Quality Scale to Measure the Impact of Quality on
Supermarket Fruit Demand
Authors: Catherine A. Durham, Marc V. McFetridge, and Aaron J. Johnson
Summary: This research examines how fluctuations in quality affect consumer
expenditures for fresh fruit at the retail level. A four-point scale was created and used to
quantify four different quality characteristics: bruising, markings, brilliance, and maturity
[6].
2.5.6 Title: Study of advanced maturity stages of banana
Authors: Tapre A.R. and Jain R.K.
Summary: Banana of three advanced stages of maturity i.e. stage 5, 6 and 7 were
analyzed for their physical, chemical and mechanical properties. As the ripening
progressed, various physical changes observed in fruit such as increased in pulp to peel
ratio, decreased in intensity of greenness of peel from stage 5 to stage 7. As the ripening
proceed, pulp to peel ratio was increased from 2.0 in stage 5 to 2.7 in stage 7 when the
fruits become fully ripened. It has been suggested that pulp to peel ratio can be considered
as a coefficient of ripeness [3].

10

120280723002

Chapter 3

Existing Systems

11

120280723002

3.1 Classification of bananas during ripening by computer vision by Fernando Mendoza


and Jos M. Aguilera [8]
A computer vision system was implemented to identify the ripening stages of bananas
based on color, development of brown spots, and image texture information. Simple
features of appearance like: L*a*b* values, brown area percentage, number of brown
spots per cm2, extracted from images of bananas were used for classification purposes.
Preliminary tests were performed to calibrate the performance of the selected parameters
(i.e., a* band and threshold of 130) in the identification and quantification of brown spots
from images. Selection of features with the method of Sequential Forward Selection
(SFS), Selecting L*, a*, b*, %BSA and contrast permitted the correct classification of the
49 samples in different ripening stages with an accuracy of 98%.
Discriminant functions used for classification of bananas
Function 1 = -a* - 0.65 b* + 0.09 L* + 0.08 %BSA + 0.15 Contrast
Function 2 = -0.07 a* - 1.35 b* + 0.82 L* + 0.72 %BSA + 0.48 Contrast

Figure 4: Mapping of function to stage of bananas


3.2 Identification and Classification of Bulk Fruits Images using Artificial Neural
Networks by Dayanand Savakar [5]
This paper presents an identification and classification of different types of bulk fruit
images using artificial neural networks. The color and texture features are extracted
considering the whole image for feature extraction. The extracted features are stored in
the form of knowledge base. When a new image is encountered features are extracted
from fruit image sample. The extracted features are used to identify and classify using
Neural Network.
Algorithm:
Algorithm 1: Identification and classification of fruit image samples
Input: Original 24-bit color image
Output: Classified fruit image of different types

12

120280723002

Start
Step1: Read the fruit images.
Step2: Extract color and texture features.
Step3: Use these features to identify and classify the fruit image samples
Stop
Algorithm 1 is takes 24-bit color image as input and extract color and texture features of
fruits based on that classifies fruits.
Algorithm 2: Color feature extraction
Input: Original 24-bit color image.
Output: 18 color features.
Start
Step 1: Separate the RGB components from the original 24-bit input color image.
Step 2: Obtain the HSI components from RGB components.
Step 3: Find the mean, variance, and range for each RGB and HSI components.
Stop.
Algorithm 2 is takes 24-bit color image of fruits as input, and extracts RGB and HIS
components and mean, variance, and range or each RGB and HIS component.
In this particularly topic large amount of research happened but normally all uses
common process but the selection factors are different, mostly L*a*b * and HSV color
space are used.

13

120280723002

Chapter 4

Proposed Methodology

14

120280723002

Proposed system is discussed in two different parts: proposed algorithm and


methodology. Proposed algorithm contains basic steps of proposed system where is
methodology containing detail of implementation with some screenshot.

4.1 Proposed Algorithm


Following is a suggested algorithm, which measures the different parameters and
compares them with standard values of parameters for classification of banana.
Algorithm:
Algorithm: Classification of bananas
Input: RGB color image of bananas
Output: Stage of bananas image
Start
Step 1: Read the fruit images.
Step 2: Apply segmentation methods to remove background from bananas image.
Step 3: Divides segmented image into 8 equal parts.
Step 4: Apply below steps A to D on each part of segmented image.
A.
B.
C.
D.

Obtain the L*a*b* components for part of the input RGB color image.
Obtain the HSV components for part of the input RGB color image.
Find the mean value of each components of L*a*b* and HSV.
Find %Green, %Yellow, and %Brown (%BSA) colors in each part of input color
image based on above components.

Step 5: Classify a bananas image part in to specific stage of bananas using %Green,
%Yellow, and %Brown components values.
Step 6: Find maximum stage from 8 parts classified by previous step.
Stop
Above algorithm takes an image with proper size and resolution as input. Bananas are
segmented from background of image for good accuracy. After that divides image into 8
equal parts and then measures parameter for every parts and compare with scale. Finally
it classifies bananas based on results of all parts into different categories. Graphical
representation of algorithm and methodology are discussed in next section.

4.2 Methodology
An algorithm discussed above is represented graphically in below figure [4]. Graphical
representation also contain five step as per given in above algorithm. Step 1 and step 2
given in above algorithm are represented in left box. Step 3 is represented in bottom box.
Step 4 and step 5 are represented in right side box. Flow of data is given with directional
arrow from one step to another step.

15

120280723002

Image1

Input
RGB color
Image

Classification:
Classify Bananas in to
different 7 stages

Image
Segmentation

Calculate mean values


of L*, a*, b*, H, S, and V
and %BSA,

Image2

Image3

Image4

Image5

Image6

Image7

Image8

Divide image in to 8 equal parts


Figure 5: Process of classification of banana
4.2.1 Image acquisition
A digital color image is given as input to the algorithm. In the implementation we
provided three ways to gives input to the algorithm [Figure 6].

Figure 6: Pop up message allow you to select way of input


First way is to select color image from demo, it is allow you to select image from stage1,
stage5, stage6 and by default is stage7 [Figure 7].

Figure 7: Pop up message allow you to select demo image


Second way is to select image from stored image from PC on which given program is
running. It will pop up a brows window to select an image [Figure 8].

120280723002

Figure 8: Pop up window allow you to select input image


Third way is allow you to capture image from camera connected to PC. An image
captured under following criteria will improve result of algorithm. A camera connected to
PC was located vertically over the background at a distance of 40cm. A black cover was
used over the sample illuminators and the Color Digital Camera (CDC) to avoid the
external light and reflections. Samples were illuminated using two parallel lamps were
situated 45 cm above the sample and at an angle of 45 to the sample. The angle between
the camera lens and the lighting source axis was approximately 45. An image has a
resolution of 1024 x 768 pixels and storage in JPEG format. The CDC was connected to
the USB port of a PC to acquire the images directly from the computer.
Image given to algorithm was displayed on figure window as shown in figure 8.

Figure 9: Image given to algorithm for classification

17

120280723002

4.2.2 Image Segmentation


The techniques that are used to find the region of interest (ROI) are usually referred to as
segmentation techniques. We were extracting ROI of yellow, green and brown part from
original image. ROI was extracted from the color image using combination of a* and b*
components of CIELAB colorspace. Mean value of a* and b* for each color yellow,
green and brown was calculated from some testing image. We were performing
segmentation of those colors using mean value of respective colors. We were converting
input RGB image into L*a*b* image and then calculate distance matrix for each pixel of
image using identical mean value of a* and b*. Based on distance from those colors we
were extracting ROI. Mean value of a* and b* used for segmentation are given in below
table.
Color
Mean value of a*
Mean value of b*
Green
93.2115
178.3605
Yellow
126.9776
172.5000
Brown
141.5233
153.6703
White(Background) 128.00
128.00
Table 3: Mean value Segmentation Table
Implementation allows you to select background, by default white color is taken as
background color.

Figure 10: Pop up allow user to select background color


If you select white button then it takes mean value of a* and b* given in table for
segmentation of background otherwise it popup one window which allows you to select
region of background. Based on Region of background selected by user system calculate
the mean value for selected background color and then use those values for segmentation.

18

120280723002

Figure 11: Figure Window allow user to select region of background


As shown in above image region selected on left-top side as background color region.
System calculate means value of a* and b* for that selected region and take those values
in segmentation of background.
After segmentation of green, yellow, brown, and background part and save as different
images. Result of segmentation shown in below figure.

Figure 12: Figure window of segmented image


4.2.3 Feature Extraction
For classification we are using following seven features: L*a*b* and HSV (Hue,
Saturation and values) and %BSA. L*a*b* components extracted from RGB components
using the function applycform of Matlab. Mean value of a* and b* for each part of RGB
color image are shown in above figure. HSV components are extracted from RGB
components using the function rgb2hsv of Matlab. The mean for all those 6 components
are calculated and stored suitably for later usage. The brown spots on the peel of bananas
were segmented from input RGB images using the combination of a* and b* color bands

19

120280723002

of the CIELAB color space, since the combination of these two color bands best
represented the appearance and development of brown spots during ripening.
Once segmentation of each color performed we were divide each color image into eight
equal parts and calculate %Green, %Yellow, and %Brown colors for each part of each
color partition or image using a* and b* component which calculated previously in same
step. In this step we create input for classifier, and classifier take matrix given below as
input. Feature extraction improve performance of classifier by providing information in
proper form before they needs. Below table show the matrix created at feature extraction
stage and provided as input to classifier based on segmentation given in figure 12.
%Green
%Yellow
%Brown
0
0
0
94.70
5.20
0.09
91.65
4.11
4.23
87.55
8.88
3.56
3.94
94.06
1.98
6.77
83.17
10.05
3.25
94.41
2.33
1.03
94.42
4.53
Table 4: Matrix as input for classifier
Above table contain matrix which given as input to classifier. This function identifies and
quantifies all features in the image and sends the data to a classification system.
4.2.4 Classification
Classification is the process of reducing images to usable information. This meant to
predict the ripening stages of bananas previously classified by expert visual inspection
using the smaller number of best features extracted from the images. [8]. Classifier given
in below figure 13 takes matrix developed in previous step and represented as table 4, as
input and output is stage of bananas or part of bananas image. According to expert we
analyze bananas bunch of different stages and developed table 5 which contain %Green,
%Yellow, and %Brown for different stages. Classifier is containing set of rules of type
If..Then..Else.
Stage
1
2
3
4
5
6
7

Green (G)
G 85%
85% > G 75%
75% > G 50%
20% G < 50%
10% < G < 20%
5% < G 10%
G 5%

Yellow (Y)
Y 10%
10% < Y 15%
15% < Y 40%
40% < Y 50%
50% < Y 75%
75% < Y 90%
Y 75%

Brown (B)

B <= 5%
B <= 5%
B <= 5%
B > 5%

Table 5: Classification Criteria Table


Classifier root node is testing, green part is greater than yellow part or not, if yes then
bananas belongs to first three stages of ripening, otherwise bananas belongs to remain
stages of bananas. After that for classification of bananas of first three stages we check
difference between %Green and %Yellow. For classification of bananas which are in
stages from 4 to 7 are done using difference between %Yellow and %Green, and %brown
color in part of bananas images. Classifier for proposed scheme is given figure 13.
20

120280723002

Representation of Classifier as flowchart is shown in figure 13. The root node is input
from previous step feature extraction, which is in form of matrix as represented in table 4.
Each row of matrix contains %Green, %Yellow, and %Brown for each part of image.
Classifier is work based on table 5, which contain %Green, %Yellow, and %Brown for
each stage of bananas. Classifier map each row of table 4 to table 5 and this will be done
through set of rules of decision tree as given in figure 13.

Input
Matrix

D1 = G Y
D2 = Y G
G = %Green
Y = %Yellow

True

D1 > 75

False

G >Y

B = %Brown

False

D2<35 &

False

%BSA <10

True

True
D1 > 60

True

False

D2 <60 &

%BSA <10

%BSA <10

True

False

True

Stage 1

Stage 2

Stage 3

Stage 4

Stage 5

Figure 13: Classifier for Proposed Scheme

Stage 6

False

Stage 7

120280723002

4.3 Discriminate Power of Selected Features


The comparison of relationships between the selected features in each set revealed that
the average values of L* and a* color bands and variance of a* color band, in all the sets,
presented the highest discriminating power in the predicting ripening stages. In fact,
CIELAB is consider a perceptually uniform color space, and therefore more suitable for
direct comparison with sensory data [8]. To test the power of a* and b* component we
were apply it to the multi stage bananas bunch, result shown in figure 14.
Multi stage bananas two bunch, one of them is green and second is yellow. We were
applied segmentation of green, yellow and brown component from below image given in
figure 14. Segmented image of respective color are shown in figure 14 to figure 17.

Figure 14: Two Bunch of bananas at different stages

22

120280723002

Figure 15: Segmented image of Green part

Figure 16: Segmented image of Yellow part

23

120280723002

Figure 17: Segmented image of Brown part


It is of interest to point out that in the three evaluated sets, the most difficult stages to
discriminate were between stages 4 (more yellow than green) and 5 (green tip and yellow)
due to the high variability of the color data at these stages. It is important to mention that
in the first stages the detection of spots in some images were due to defects on the surface
of bananas. We observed that the appearance of brown spots was evident from stage 4
onwards.

24

120280723002

Chapter 5

Results and Discussion

25

120280723002

5.1.

Classification Performance

Bananas set are first classified by expert and based on that we create table which contain
%green, %yellow, and %brown color for different stage and we compare it with input
color image of bananas.
Results show that using three features: L*,a*,b* we can classifies more than 92% bananas
hand. Results vary for different stages. Conclusion of performance is given in table.
Stage
1
2
3
4
5
6
7

No. of
sample
20
15
10
15
20
30
25

Performance
94%
92%
91%
90%
91%
95%
94%

Table 6: Performance Index Table


If analyse table 6 then we see that performance for middle stage are little bit decrease
compare to lower and higher stages and this is happen because variability of color from
green to yellow. The most difficult stages to discriminate were between stages 4 (more
yellow than green) and 5 (green tip and yellow) due to the high variability of the color
data at these stages.
5.2. Comments Resolution
In Dissertation phase 1, experts gave some remarks on the Proposed Scheme. Here, I have
tried to resolve those comments. Explanation to the comments is as below:
5.2.1. Justification of why 8 parts taken.
Justification: After study of more than 100 images of bananas hands and analyze that if
we taken hands of 12 fingers of bananas then its front part contain mostly 8 bananas and
4 bananas are covered by those 8 bananas. For improve results we were checked by
dividing each image into different parts, like divide image into 5, 6, 7, 8, 9, 10, 11, and
12parts respectively. After analysis we were conclude when we divides image of bananas
hands into 8 parts then each parts contain one finger of bananas. When we were going
from less number of part it were misclassified similarly as happened in reviewed
algorithm, also going to more number of division were divides hands of bananas in such
way so that single finger of hand of bananas were divided into two or more parts so that it
were degrade performance. Division of image of bananas hands into 8 equal parts is best
suited for algorithm.

26

120280723002

Conclusion and Future work


Digital image processing can improve the process of classification of bananas. All
reviewed and currently available algorithms can efficiently measure the quality of single
banana but when we apply on bunch of bananas, performances of all algorithms are
degrading. Proposed algorithm can overcome this limitation by division of image into
parts. If single banana from bunch of bananas is at different stage from other than
proposed algorithm can efficiently identify the stage of that banana. Selected features are
able to predict change of color on curved surface of bananas. In this research some factor
play major role and they are like: image acquisition system and resolution of image which
is given as input to algorithm, selection of segmentation method, selection of classifier.
This system will be very useful for bananas classification industry. This system overcome
the limitation of alternatives methods and reviewed algorithm. In development of system
we take industry requirement in mind, so that system can play major role in industry of
bananas classification. Sometimes objectives and industry you are targeting may help you
to select parameter. Adding more parameter is not good for all schemes means selection
of right number of parameter is important task. Some limitations of system and
characteristics of object you are analyze play major role and performance of system also
depends on it.
Thus, in the future, we can improve performance of proposed scheme by using different
segmentation methods and different classifier. Segmentation of bananas is first important
things for bunch of bananas so that we can improve performance by changing setting of
image acquisition system and resolution of image. Every steps of system is depends on
previous step means every steps of system provide input to its successor steps. We can
change at any higher stage will affects on performance. We can make change in system
by changing image acquisition system, selecting different segmentation methods, using
different classifier.

27

120280723002

Publication
Paper Title

Quality Analysis and


Classification of
Bananas

Quality Analysis and


Classification of
Bananas using Digital
Image Processing

National/
International

International

Conference/journal/institute

Status

International Journal of Advanced


Research in Computer Science and
Software Engineering (IJARCSSE)

Published

ISSN: 2277 128X


Pg No. : 869-874

International

International Journal of Computer


Science and Engineering (IJCSE)
ISSN(Print): 2278-9960
ISSN(Online): 2278-9979

28

Accepted

120280723002

References
[1] Sally Smith Fairtrade Bananas: A Global Assessment Of Impact April 2010 page
17-18
[2] Bhavesh B. Prajapati Algorithmic Approach to Quality Analysis of Indian Basmati
Rice Using Digital Image Processing IJETAE volume 3, Issue 3, March 2013
[3] Tapre A.R. and Jain R.K Study of Advanced Maturity Stages of Banana IJAERS
June 2012
[4] D.Surya Prabha and J.Satheesh Kumar Hybrid Segmentation of Peel Abnormalities
in Banana Fruit ICRTCT and IJCA 2013
[5] Dayanand Savakar Identification and Classification of Bulk Fruits Images using
Artificial Neural Networks IJEIT Volume 1, Issue 3, March 2012
[6] Catherine A. Durham, Marc V. McFetridge, and Aaron J. Johnson The Development
of a Quality Scale to Measure the Impact of Quality on Supermarket Fruit Demand
2005
[7] Fernando Mendozaa, Petr Dejmek, Jose M. Aguilera Calibrated color measurements
of agricultural foods using image analysis 2006
[8] Fernando Mendoza and Jos M. Aguilera Classification Of Bananas
Ripening By Computer Vision February 2003

During

[9] Mamta Juneja, Parvinder Singh Sandhu Image Segmentation based Quality Analysis
of Agricultural Products using Emboss Filter and Hough Transform in Spatial
Domain, 2009
[10] Anup Vibhute and S K Bodhe Applications of Image Processing in Agriculture
IJCA Volume 52 No.2, August 2012
[11] Shiv Ram Dubey, Pushkar Dixit, Nishant Singh, and Jay Prakash Infected Fruit
Part Detection using K-Means Clustering Segmentation Technique IJAI IM, Vol. 2,
N 2 Feb 2013
[12] Ms. Jyoti Atwal, Mr. Satyajit Sen Purkayastha Analysis of nutrient contents and
quality feature extraction of clustered seeds using Digital Image Processing Vol. 2
Issue 2, Feb.2012
[13] Reza Fellegari 1, Hosein Navid Determining the orange volume using image
processing , ICFEB, IACSIT, IPCBEE vol.9 2011
[14] John A. Molino, Jason F. Kennedy Daytime Color Appearance of Retroreflective
Traffic
Control
Sign
Materials
Citing
Sources:
[http://www.fhwa.dot.gov/publications/research/safety/13018/002.cfm]: Chapter. 2:
[Oct 3, 2013]
[15] A Practical Guide and Tutorial to Digital Color Management for Photographers
Section
I:
ColorModels
[http://www.booksmartstudio.com/color_tutorial/colortheory4.html] [Oct 13, 2013]

29

120280723002

[16] Introduction to color theory Section: 4.3 The hue-saturation-value(HSV) color


model
[http://infohost.nmt.edu/tcc/help/pubs/colortheory/web/hsv.html] [Oct 29,
2013]
[17]
Converting Color Data Between Color Spaces Section : HSV color space
[http://www.mathworks.in/help/images/converting-color-data-between-colorspaces.html] [Nov 12, 2013]

30

Volume 4, Issue 1, January 2014

ISSN: 2277 128X

International Journal of Advanced Research in


Computer Science and Software Engineering
Research Paper
Available online at: www.ijarcsse.com

Quality Analysis and Classification of Bananas


Sanjay Chaudhary*, Bhavesh Prajapati
Department of CSE and IT
L.D.College of Engineering, India
Abstract a quality inspection of banana can be done by mainly two ways: either instrumental tools or human
inspectors. An interesting alternative is image processing can overcome limitations of these two techniques. Digital
Image processing can classify the banana fruit with speed and accuracy. Good algorithms available in image
processing which can classify banana based on their color and texture characteristics, but limitation is that they can
work well on single banana. Bananas is sold in bunch of dozen and thats why it is important to analyze quality in
bunch. This paper reviews the technique of digital image processing to classify the banana in group or bunch.
Keywords Instrumental, inspectors, texture, digital image, dozen
I. INTRODUCTION
This document is a template. An electronic copy can be downloaded from the Journal website. For questions on
paper guidelines, please contact the journal publications committee as indicated on the journal website. Information
about final paper submission is available from the conference website.
A. Introduction
Bananas are the forth most important staple crops in the world and India is the leading country in the production of
banana [1]. With increased expectations for food products of high quality and safety standards, the need for accurate, fast
and objective quality determination of these characteristics in food products continues to grow. Classification of bananas
is important task for banana industry. Classification of bananas can be done by basically three methods: (1) Human
visual inspection; (2) Instrumental techniques; (3) Computerized image analysis techniques. A human inspection process
may be affected by external factors like: tiredness, bias, revenge or human psychological limitations where instrumental
techniques give accurate measurements of colors but requirement are that the surface color must be quite uniform and
removal of peel [8]. Image processing systems is good alternative for an automated, non-destructive and cost-effective
technique to accomplish these requirements and offer an objective measure for color and other physical factors.
B.

Problem Statement
Today quality inspection of bananas in industry is mostly done by human inspectors, due to limitations of alternative
methods. Mostly image processing is used for classification of other fruits and grain but bananas characteristics are
different from other fruits in such a way likes: bananas always sold in group or bunch of dozen where are other fruits sold
singly; bananas are important at all level, bananas have maturity stage at stage 6 and 7 but people can purchase bananas
at different stage for backing use. For effective classification we must have to concern equally on bananas characteristics
and consumer characteristics.
Presents Algorithm implemented on single banana thats why if we apply on bunch of bananas then we must have to
change image acquisition system like: we have to set camera to the different angle, distance from sample, etc; and if any
bunch contains some degraded bananas and remain are good then classifier will classify as a good quality due to average
of all bananas but consumer will never goes to purchase such bunch of bananas as good quality. So that it is important to
mind characteristics of consumer and analyze single bananas individually in the bunch without separating physically.
C. Aim of Dissertation
The objectives of this study were: (i) To select important features which can be related with the characteristics of
bananas and characteristics of consumer, (iii) To develop a statistical model using selected features to identify the stages
of bananas from samples previously classified by expert, and (iv) To implement an image processing system for
classification of bananas using the sRGB, L*a*b* and HSV color spaces.
II. LITERATURE REVIEW
For effective classification of banana it is important to have good information about bananas properties, consumer
properties, image processing ability or methods, image processing limitations, etc.
A. Bananas Properties
Commercial standard color charts classifies bananas in following 7 different stages: Stage 1=all green, 2= green with
trace of yellow, 3= more green than yellow, 4= more yellow than green, 5= yellow with trace of green, 6= full yellow, 7=
full yellow with brown spots [3].
2014, IJARCSSE All Rights Reserved

Page | 869

Chaudhary et al., International Journal of Advanced Research in Computer Science and Software Engineering 4(1),
January - 2014, pp. 869-874

Fig. 1 Seven stage of banana [3]

Bananas physical, chemical and mechanical properties changes will change the color of bananas so that if we can
successfully measure the stage of bananas then we can get approximately right information of physical, mechanical
and chemical properties. Skin color changes from green to yellow, firmness is decreased, fruit gets softened and
starch is converted into sugar. A mainly color change in banana during ripening is based on the peel color rather
than the pulp color and hence color of banana peel has been used in the assessment of the stages of ripeness of
banana [3]. With experiment they suggested following table to get the right information about banana properties.
TABLE I CHANGES IN PHYSICAL CHARACTERISTICS IN BANANA FRUITS AT DIFFERENT STAGES OF MATURITY
Parameters
5
2.0
Yellow with Trace of
Green
White

Pulp/Peel Ratio
Peel Color
Pulp Color

Stage of Ripening
6
2.3
All Yellow
White Creamy

7
2.7
Yellow with brown
spots
Yellowish Creamy

As the ripening proceed, pulp to peel ratio was increased from 2.0 in stage 5 to 2.7 in stage 7 when the fruits become
fully ripened. (Table1). This could be due to the osmotic transfer of moisture from the peel to the pulp as sugar content of
pulp increased. It has been suggested that pulp to peel ratio can be considered as a coefficient of ripeness. The intensity
of greenness of the peel also decreased from stage 5 to stage 7.
B. Consumer Characteristics
To examine consumer purchasing behavior five characteristics are important: damage (dents and breaks in skin),
markings (includes russet, waxy build-up, etc), brilliance (degree of shine), maturity/color, and one less used is bruising.
The peel color of bananas is considered as the first quality parameter evaluated by consumers. Final classification after
calculation of measure: All the quality measure values were summed together to create a total quality value. [6].
Development of spots expressed as %BSA (brown spots as a percentage of the total area) and NBS/cm2 (number of
brown spots per cm2 of surface), changes in percentage and number of brown during ripening, etc are measures which
are used in classification process [8].
According to consumer characteristics following scale table is created [6].
TABLE II SCALE RELATED TO CONSUMER PERSPECTIVE

Fruit Appearance (For


bruising, markings, and
damage)
Very shiny looking

Shiny looking

Glossy looking

Dull looking

Scale

2014, IJARCSSE All Rights Reserved

Standard (brilliance)
Less than 10 % of the fruit on display has the negative quality
characteristic present
10 to 30 % of the fruit on display has the negative quality
characteristic present
30 to 50 % of the fruit on display has the negative quality
characteristic present
Greater than 50 % of the fruit on display has the negative
quality characteristic

Page | 870

Chaudhary et al., International Journal of Advanced Research in Computer Science and Software Engineering 4(1),
January - 2014, pp. 869-874
C. Color Spaces
Image processing is able to measure characteristics of bananas and map to the consumer characteristics. In this section
we will discuss on image processing color spaces which will be useful in classification process. To measure
characteristics of bananas to classification factors following three color spaces model of image processing are important.
1) RGB Color Model: The RGB (Red, Green, Blue) color model is an especially important one in digital image
processing because it is used by most digital imaging devices (e.g., monitors and color cameras). In the RGB model,
a color is expressed in terms that define the amounts of Red, Green and Blue light it contains [7].
Defines the transformation from floating point nonlinear R`G`B` values to sRGB:
The nonlinear R`G`B` values are transformed to linear sRGB values by
If R`, G`, B` 0.04045
sR =

R`
12.92

, sG =

G`
12.92

, sB =

B`
12.92

else if R`, G`, B`>0.04045


sR = -(

R`+0.055 2.4
) ,
1.055
G`+0.055 2.4

sG = -(
sB =

) ,

1.055
B`+0.055 2.4
-(
)
1.055

2) CIELAB and CIEXYZ color space: Color plays a major role in the assessment of external quality in food industries
and food engineering research (Segnini et al., 1999; Abdullah et al., 2001). Color is basically specified by the
geometry and spectral distributions of three elements: [i] the light source, [ii] the reflectivity of the sample, and [iii]
the visual sensitivity of observer. CIE specified color space characterized as being less illumination-dependent and
the commonly used L*a*b* or CIELAB (Robertson, 1976) [7].
L* is the luminance or lightness component that goes from 0 (black) to 100 (white), and a* (from green to red)
and b* (from blue to yellow) are the two chromatic components, varying from 120 to +120. The definition of
L*a*b* is based on the intermediate system CIE XYZ which simulates the human perception. The knowledge of
these effects, such as the variations of L*, a*, and b* for a particular shape of the sample could be useful for
developing image processing correction algorithms which can permit a better correlation among product quality [7].
Defines the transformation from sRGB values to CIEXYZ:

0.4124
= 0.2126

0.0193

0.3576
0.7152
0.1192

0.1805
0.0722
0.9505

sR
sG
sB

Defines the transformation from CIEXYZ to CIELAB :

L* = 116 f( ) 16

a* = 500 [f( ) - f( )]

b* = 200 [f( ) - f( )]

Where
1

f(q) =

q3 if q > 0.008856
7.787q +

16
16

otherwise

Xn, Yn, and Zn correspond to the XYZ values of a reference white chart (q{X/Xn, Y/Yn, Z/Zn}).
The total color difference between two color in L*, a* and b* coordinates may be evaluated as
E*ab = [(L*)2 + (a*)2 + (b*)2]1/2
3) HSV color space: The HSV (Hue, Saturation, and Value) color model describes a color in terms of how it is
perceived by the human eye. This is useful when processing images to compare two colors, or for changing a color
from one to another. The HSV model is also a more useful model for evaluating or measuring an object's color
characteristics, such as the "yellowness" of a banana [7].
2014, IJARCSSE All Rights Reserved

Page | 871

Chaudhary et al., International Journal of Advanced Research in Computer Science and Software Engineering 4(1),
January - 2014, pp. 869-874
HSV separates color into three components varying from 0 to 1; H (hue) refers to the dominant wavelength
perceived as different colors, such as red, yellow, green and blue, S (saturation) refers to how much such wavelength
is concentrated and it is equivalent to the concentration of a solute in a chemical solution; and V (value) represents
the total brightness, similar to L* [7]. Some author use intensity (I) instead of value.
Defines the transformation from sRGB to HSV :
V = max(R, G, B)
S=

1+

Vmin
(R,G,B)
V

GB
Vmin
(R,G,B)
BR

H = 2 + Vmin (R,G,B)
3+

RG
Vmin
(R,G,B)

for V = R
for V = G
for V = B

Fernando Mendozaa, Petr Dejmek, and Jose M. Aguilera implemented system to quantify standard color of fruit
and vegetables in sRGB, HSV and L*a*b* color spaces. The results show that sRGB standard (linear signals) was
efficient to define the mapping between R`G`B` (no-linear signals) from the CCD camera and a device-independent
system such as CIE XYZ. L*a*b* system is suggested as the best color space for quantification in foods with curved
surfaces [7].
D. Discriminant power of selected features
The comparison of relationships between the selected features in each set revealed that the average values of L* and
a* color bands and variance of a* color band, in all the sets, presented the highest discriminating power in the predicting
ripening stages. In fact, CIELAB is consider a perceptually uniform color space, and therefore more suitable for direct
comparison with sensory data (Segnini, 1999) [8].
It is of interest to point out that in the three evaluated sets, the most difficult stages to discriminate were between
stages 4 (more yellow than green) and 5 (green tip and yellow) due to the high variability of the color data at these stages.
It is important to mention that in the first stages the detection of spots in some images were due to defects on the surface
of bananas. We observed that the appearance of brown spots was evident from stage 4 onwards [8].
III. EXISTING SYSTEM
A.
Fernando Mendoza and Jos M. Aguilera implemented a computer vision system to identify the ripening stages
of bananas based on color, development of brown spots, and image texture information. Nine simple features of
appearance like: L*a*b* values, brown area percentage, number of brown spots per cm2, extracted from images of
bananas were used for classification purposes. Preliminary tests were performed to calibrate the performance of the
selected parameters (i.e., a* band and threshold of 130) in the identification and quantification of brown spots from
images. Selection of features with the method of Sequential Forward Selection (SFS), Selecting L*, a*, b*, %BSA and
contrast permitted the correct classification of the 49 samples in different ripening stages with an accuracy of 98% [8].
Discriminant functions used for classification of bananas:
Function 1 = -a* - 0.65 b* + 0.09 L* + 0.08 %BSA + 0.15 Contrast
Function 2 = -0.07 a* - 1.35 b* + 0.82 L* + 0.72 %BSA + 0.48 Contrast

Fig. 3: Mapping of function to stage of bananas


B.
Paper presents an identification and classification of different types of bulk fruit images using artificial neural
networks. The color and texture features are extracted considering the whole image for feature extraction. The extracted
features are stored in the form of knowledge base. When a new image is encountered features are extracted from fruit
image sample. The extracted features are used to identify and classify using Neural Network [5].
2014, IJARCSSE All Rights Reserved

Page | 872

Chaudhary et al., International Journal of Advanced Research in Computer Science and Software Engineering 4(1),
January - 2014, pp. 869-874
Algorithm:
Algorithm 1: Identification and classification of fruit image samples
Input: Original 24-bit color image
Output: Classified fruit image of different types
Start
Step1: Read the fruit images.
Step2: Extract color and texture features.
Step3: Use these features to identify and classify the fruit image samples
Stop
Algorithm 1 is takes 24-bit color image as input and extract color and texture features of fruits based on that
classifies fruits.
Algorithm 2: Color feature extraction
Input: Original 24-bit color image.
Output: 18 color features.
Start
Step 1: Separate the RGB components from the original 24-bit input color image.
Step 2: Obtain the HSV components from RGB components.
Step 3: Find the mean, variance, and range for each RGB and HSV components.
Stop.
Algorithm 2 is takes 24-bit color image of fruits as input, and extracts RGB and HSV components and mean,
variance, and range or each RGB and HSV component.
The study reveals that the Classification process best results are obtained by using the combination of both color and
texture features [5].
IV. BANANAS CLASSIFICATION SYSTEM
Bananas classification process contains mainly five steps as follow.

Image
Acquisiti
on

Digital
Image

Classificati
on

Image
Segmentati
on
Feature
Extraction

Fig. 4 Process of classification of banana


A. Image acquisition
Block which contain camera, lights, and stand for banana. Images from one side of the bananas were taken and storage
in JPEG format. The camera was connected to the USB port of a PC to acquire the images directly from the computer.
Image acquisition system setup is shown in below figure.

Fig. 5 Image acquisition system [8]


A Color Digital Camera (CDC) was located vertically over the sample at a distance of 22 cm. The angle between the
camera lens and the lighting source axis was approximately 45 [8]. If we use this image acquisition system for bunch of
bananas than because of camera was located vertically at a small distance over the sample and large size of bananas we
cannot get complete image of bunch of bananas. So that it is important to change distance of camera from sample and
angle of camera.
2014, IJARCSSE All Rights Reserved

Page | 873

Chaudhary et al., International Journal of Advanced Research in Computer Science and Software Engineering 4(1),
January - 2014, pp. 869-874
B. Digital Image
Digital images are one of the most key medium of conveying information. Extracting the information from images and
understanding them such that the extracted information can be used for several tasks is an important characteristic.
Convert image into digital form for the further processing. If we are use digital camera then the image is in digital form
and we did not need conversion otherwise this step is required.
C. Image Segmentation
The techniques that are used to find the objects of interest are usually referred to as segmentation techniques [9].
D.Surya Prabha and J.Satheesh Kumar describes in their research [4]. They have developed a new method for better
segmentation and categorization of banana fruits. Result shows better accuracy of proposed algorithm compared to other
segmentation methods like: Thresoloding, Clustering, color image segmentation. Hybrid segmentation method improves
results by combing edge based and region based segmentation [4].
In this research we successfully segment banana different part like brown sport, dents and breaks in skin, etc, but at
industry level it has no advantage because these are end up with unimportant results means what to do after segment, we
will do not apply any treatment on its and its takes more times compare to Thresoloding method. Thats comparing to
use complex hybrid system for segment; simple Thresoloding method is more suitable for bananas classification.
Fernando Mendoza and Jos M. Aguilera used combination of threshold of 50 with an edge detection technique based on
the Laplacian-of-Gauss (LoG) operator to remove background from grayscale image. The brown spots on the peel of
bananas were segmented from binary images using the combination of a* and b* color bands of the CIELAB color space.
Images were binarized using threshold values of a*<140 or b*>156 (for a* and b* values ranging from 0 to 255) [8].
D. Feature extraction
The RGB components are separated from the original image, and the L* a* b* and HSV components are extracted
from RGB components. The mean, variance and range for all these 6 components are calculated and stored suitably for
later usage [4]. This function identifies and quantifies all features in the image and sends the data to a control program.
E. Classification
Classification is the process of reducing images to usable information. This meant to predict the ripening stages of
bananas previously classified by expert visual inspection using the smaller number of best features extracted from the
images. [8]. Based on all parts factors value bananas are classified into different class or grade. Classification process can
be improved by adding more factors in the process.
V. CONCLUSIONS
Digital image processing can improve the process of classification of bananas. All reviewed and currently available
algorithms can efficiently measure the quality of single banana but when we apply on bunch of bananas then either image
acquisition setup are not suite or performances of algorithm are degrading. Based on review we can say that image
acquisition is important steps over all other step. Mostly fruit classification researcher used common color space and
even features are not change more. Color and texture features combination gives best result for classification process.
Adding more factors for analysis will not always increase the result thats why use of good combination of factors is
important.
REFERENCES
[1] Sally Smith Fairtrade Bananas: A Global Assessment Of Impact April 2010 page 17-18
[2] Bhavesh B. Prajapati Algorithmic Approach to Quality Analysis of Indian Basmati Rice Using Digital Image
Processing IJETAE volume 3, Issue 3, March 2013
[3] Tapre A.R. and Jain R.K Study of Advanced Maturity Stages of Banana IJAERS June 2012
[4] D.Surya Prabha and J.Satheesh Kumar Hybrid Segmentation of Peel Abnormalities in Banana Fruit ICRTCT
and IJCA 2013
[5] Dayanand Savakar Identification and Classification of Bulk Fruits Images using Artificial Neural Networks
IJEIT Volume 1, Issue 3, March 2012
[6] Catherine A. Durham, Marc V. McFetridge, and Aaron J. Johnson The Development of a Quality Scale to
Measure the Impact of Quality on Supermarket Fruit Demand 2005
[7] Fernando Mendozaa, Petr Dejmek, Jose M. Aguilera Calibrated color measurements of agricultural foods using
image analysis 2006
[8] Fernando Mendoza and Jos M. Aguilera Classification Of Bananas During Ripening By Computer Vision
February 2003
[9] Mamta Juneja, Parvinder Singh Sandhu Image Segmentation based Quality Analysis of Agricultural Products
using Emboss Filter and Hough Transform in Spatial Domain, 2009
[10] Anup Vibhute and S K Bodhe Applications of Image Processing in Agriculture IJCA Volume 52 No.2, August
2012
[11] Shiv Ram Dubey, Pushkar Dixit, Nishant Singh, and Jay Prakash Infected Fruit Part Detection using K-Means
Clustering Segmentation Technique IJAI IM, Vol. 2, N 2, Feb 2013
[12] Ms. Jyoti Atwal, Mr. Satyajit Sen Purkayastha Analysis of nutrient contents and quality feature extraction of
clustered seeds using Digital Image Processing Vol. 2 Issue 2, Feb.2012
[13] Reza Fellegari 1, Hosein Navid Determining the orange volume using image processing , ICFEB, IACSIT, and
IPCBEE vol.9, 2011
2014, IJARCSSE All Rights Reserved

Page | 874

Quality Analysis and Classification of Bananas Using Digital Image Processing


Sanjay Chaudhary*
Department of CSE and IT
L.D.College of Engineering
Srchaudharys02@gmail.com

Bhavesh Prajapati
Department of CSE and IT
L.D.College of Engineering
b.b.prajapati@gmail.com

Abstract a quality inspection of banana can be done by mainly two ways: either instrumental tools or human
inspectors. An interesting alternative is image processing can overcome limitations of these two techniques.
Digital Image processing can classify the banana fruit with speed and accuracy. Good algorithms available in
image processing which can classify banana based on their color and texture characteristics, but limitation is
that they can work well on single banana. Bananas is sold in bunch of dozen and thats why it is important to
analyze quality in bunch. This paper proposes the technique of digital image processing to classify the banana
in group or bunch. Features including CIELAB, and HSV colorspaces, k-means clustering a segmentation
method, and decision tree classifier have been used for classification of bananas images. Result shows better
accuracy of proposed algorithm.
Keywords Bananas, Colorspaces, Clustering, Digital image, Instrumental, Segmentation

I. INTRODUCTION

Bananas are the forth most important staple crops in the world and India is the leading country in the production
of banana [1]. With increased expectations for food products of high quality and safety standards, the need for
accurate, fast and objective quality determination of these characteristics in food products continues to grow.
Classification of bananas is important task for banana industry. Classification of bananas can be done by
basically three methods: (1) Human visual inspection; (2) Instrumental techniques; (3) Computerized image
analysis techniques. A human inspection process may be affected by external factors like: tiredness, bias,
revenge or human psychological limitations where instrumental techniques give accurate measurements of
colors but requirement are that the surface color must be quite uniform and removal of peel [8]. Image
processing systems is good alternative for an automated, non-destructive and cost-effective technique to
accomplish these requirements and offer an objective measure for color and other physical factors.
For effective classification of banana it is important to have good information about bananas properties,
consumer properties, image processing ability or methods, image processing limitations, etc. Commercial
standard color charts classifies bananas in following 7 different stages: Stage 1=all green, 2= green with trace of
yellow, 3= more green than yellow, 4= more yellow than green, 5= yellow with trace of green, 6= full yellow,
7= full yellow with brown spots [3].

Fig. 1 Seven stage of banana [3]

Bananas physical, chemical and mechanical properties changes will change the color of bananas so that if we
can successfully measure the stage of bananas then we can get approximately right information of physical,
mechanical and chemical properties. Skin color changes from green to yellow, firmness is decreased, fruit gets
softened and starch is converted into sugar. A mainly color change in banana during ripening is based on the
peel color rather than the pulp color and hence color of banana peel has been used in the assessment of the
stages of ripeness of banana [3].
Today quality inspection of bananas in industry is mostly done by human inspectors, due to limitations of
alternative methods. Mostly image processing is used for classification of other fruits and grain but bananas
characteristics are different from other fruits in such a way likes: bananas always sold in group or bunch of
dozen where are other fruits sold singly; bananas are important at all level, bananas have maturity stage at stage
6 and 7 but people can purchase bananas at different stage for backing use. For effective classification we must
have to concern equally on bananas characteristics and consumer characteristics.
Presents Algorithm implemented on single banana thats why if any bunch contains some degraded bananas and
remain are good then classifier will classify as a good quality due to average of all bananas but consumer will
never goes to purchase such bunch of bananas as good quality. So that it is important to mind characteristics of
consumer and analyse single bananas individually in the bunch without separating physically.
The objectives of this study were: (i) To implement a standardized computer vision system for classification of
bananas by characterize quantitatively color changes during ripening using the sRGB, L*a*b* and HSV color
spaces; (ii) To identify features of interest which can be related with the ripening stages such as color and
textural features of the images, and; (iii) To develop a statistical model using selected features to identify the
seven ripening stages of bananas from samples previously classified by expert visual inspection.

II. M ATERIAL AND EXISTING SYSTEMS

A. Color Spaces
Image processing is able to measure characteristics of bananas and map to the consumer characteristics. In this
section we will discuss on image processing color spaces which will be useful in classification process. To
measure characteristics of bananas to classification factors following three color spaces model of image
processing are important.
1) RGB Color Model: The RGB (Red, Green, Blue) color model is an especially important one in digital

image processing because it is used by most digital imaging devices (e.g., monitors and color cameras). In
the RGB model, a color is expressed in terms that define the amounts of Red, Green and Blue light it
contains.

2) CIELAB color space: CIE specified color space characterized as being less illumination-dependent and the

commonly used L*a*b* or CIELAB (Robertson, 1976) [7]. L* is the luminance or lightness component that
goes from 0 (black) to 100 (white), and a* (from green to red) and b* (from blue to yellow) are the two
chromatic components, varying from 120 to +120.

Figure 2: CIELAB color space[14][15]


The definition of L*a*b* is based on the intermediate system CIE XYZ which simulates the human perception.
The knowledge of these effects, such as the variations of L*, a*, and b* for a particular shape of the sample
could be useful for developing image processing correction algorithms which can permit a better correlation
among product quality. [7]
3) HSV color space: The HSV (Hue, Saturation, and Value) color model describes a color in terms of how it is

perceived by the human eye. This is useful when processing images to compare two colors, or for changing
a color from one to another. The HSV model is also a more useful model for evaluating or measuring an
object's color characteristics, such as the "yellowness" of a banana. HSV separates color into three
components varying from 0 to 1 (when it is calculated using the function rgb2hsv available in Matlab);

The hue (H) of a color refers to which pure color it resembles. All tints, tones and shades of red have
the same hue. Hues are described by a number that specifies the position of the corresponding pure

color on the color wheel, as a fraction between 0 and 1. Value 0 refers to red; 1/6 is yellow; 1/3 is green;
and so forth around the color wheel.

The saturation (S) of a color describes how white the color is. A pure red is fully saturated, with a
saturation of 1; tints of red have saturations less than 1; and white has a saturation of 0.

The value (V) of a color, also called its lightness, describes how dark the color is. A value of 0 is black,
with increasing lightness moving away from black.

Figure 3: HSV color space[16][17]


This diagram, called the single-hexcone model of color space, can help you visualize the meaning of the H, S,
and V parameters.

The outer edge of the top of the cone is the color wheel, with all the pure colors. The H parameter
describes the angle around the wheel.

The S (saturation) is zero for any color on the axis of the cone; the center of the top circle is white. An
increase in the value of S corresponds to a movement away from the axis.

The V (value or lightness) is zero for black. An increase in the value of V corresponds to a movement
away from black and toward the top of the cone.

B. Existing System
Fernando Mendoza and Jos M. Aguilera implemented a system to identify the ripening stages of bananas
based on color, development of brown spots, and image texture information. Nine simple features of appearance
like: L*a*b* values, brown area percentage, number of brown spots per cm2, extracted from images of bananas
were used for classification purposes. Preliminary tests were performed to calibrate the performance of the
selected parameters (i.e., a* band and threshold of 130) in the identification and quantification of brown spots
from images. Selection of features with the method of Sequential Forward Selection (SFS), Selecting L*, a*,
b*, %BSA and contrast permitted the correct classification of the 49 samples in different ripening stages with
an accuracy of 98% [8].
F. Mendoza, P. Dejmek, J.M. Aguilera implemented a computer vision system for Predicting Ripening Stages
of Bananas. Two simple color features from each image (mean value and variance of the intensity histogram of

image) were extracted and analyzed using the RGB, HSV and CIELAB color spaces with classification
purposes. Results show that the three evaluated sets were able to correctly predict with more than 94% the
ripening stages of bananas as professional visual perception [8].
Dayanand Savakar describe in their paper of Identification and Classification of Bulk Fruits Images using
Artificial Neural Networks. The study reveals that the Classification of Chikoo is about 94% and Mango and
Orange is 92% using color and texture feature sets. Classification using texture analysis is better than
classification using color analysis. Best results are obtained by using the combination of both color and texture
features [5].
They implemented system to predict ripening stage of bananas finger. But we have to classify bananas bunch
thats why if any bunch contain multi stage bananas like some bananas at stage 4 and some at stage 5 then
average of all will misclassifies to either stage 4 or stage5 based on quantity of respective stage bananas finger.
According to expert if any bananas finger from bunch is in heired stage from other bananas finger than we have
to classify that bananas bunch to heired stage.
III. METHODOLOGY

The algorithm of Bananas Classification as per given below.


Algorithm: Classification of bananas
Input: RGB color image of bananas
Output: Stage of bananas image
Start
Step 1: Read the fruit images.
Step 2: Apply segmentation methods to remove background from bananas image.
Step 3: Divides image into 8 equal parts.
Step 4: Apply below steps A to D on each parts of input RGB color image.
A. Obtain the L*a*b* components for part of the input RGB color image.
B. Obtain the HSV components for part of the input RGB color image.
C. Find the mean value of each components of L*a*b* and HSV.
D. Find %Green, %Yellow, and %Brown colors in each part of input color image based on above
components.
Step 5: Classify a bananas image part in to specific stage of bananas using %Green, %Yellow, and %Brown
components values.
Step 6: Find maximum stage from 8 parts classified by previous step.
Stop

Above algorithm takes an image with proper size and resolution as input. Bananas are segmented from
background of image for good accuracy. After that divides image into 8 equal parts and then measures
parameter for every parts and compare with scale. Finally it classifies bananas based on results of all parts into
different categories. Graphical representation of algorithm and methodology are discussed in next section.
Bananas classification system contain following part.
A. Image acquisition
Block which contain camera, lights, and stand for banana. An image captured under following criteria will
improve result. A camera connected to PC was located vertically over the background at a distance of 40cm. A
black cover was used over the sample illuminators and the Color Digital Camera (CDC) to avoid the external
light and reflections. Samples were illuminated using two parallel lamps were situated 45 cm above the sample
and at an angle of 45 to the sample. The angle between the camera lens and the lighting source axis was
approximately 45. An image has a resolution of 1024 x 768 pixels and storage in JPEG format. The CDC was
connected to the USB port of a PC to acquire the images directly from the computer.
B. Image Segmentation
The techniques that are used to find the region of interest (ROI) are usually referred to as segmentation
techniques. We were extracting ROI of yellow, green and brown part from original image. ROI was extracted
from the color image using combination of a* and b* components of CIELAB colorspace. Mean value of a*
and b* for each color yellow, green and brown was calculated from some testing image. We were performing
segmentation of those colors using mean value of respective colors. We were converting input RGB image into
L*a*b* image and then calculate distance of mean value of a* and b* of input image from identical values of
three colors. Based on distance from those colors we were extracting ROI. Mean value of a* and b* used for
segmentation are given in below table.
Color

Mean value of a*

Green

93.2115

178.3605

Yellow

126.9776

172.5000

Brown

141.5233

153.6703

128.00

128.00

White(Background)

Mean value of b*

Table 1: Mean value Segmentation Table


C. Features Extraction
For classification we are using following seven features: L*a*b* and HSV (Hue, Saturation and values)
and %BSA. L*a*b* components extracted from RGB components using the function applycform of Matlab.
Mean value of a* and b* for each part of RGB color image are shown in above figure. HSV components are
extracted from RGB components using the function rgb2hsv of Matlab. The mean for all those 6 components
are calculated and stored suitably for later usage. The brown spots on the peel of bananas were segmented from
input RGB images using the combination of a* and b* color bands of the CIELAB color space, since the

combination of these two color bands best represented the appearance and development of brown spots during
ripening.
Once segmentation of each color performed we were divide each color image into eight equal parts and
calculate %Green, %Yellow, and %Brown colors for each part of each color partition or image using a* and b*
component which calculated previously in same step. In this step we create input for classifier, and classifier
take matrix given below as input. Below table show the matrix created at feature extraction stage and provided
as input to classifier based on segmentation given in figure 12.
%Green

%Yellow

%Brown

94.70

5.20

0.09

91.65

4.11

4.23

87.55

8.88

3.56

3.94

94.06

1.98

6.77

83.17

10.05

3.25

94.41

2.33

1.03

94.42

4.53

Table 2: Matrix as input for classifier


D. Classification
Classification is the process of reducing images to usable information. This meant to predict the ripening stages
of bananas previously classified by expert visual inspection using the smaller number of best features extracted
from the images. [8]. Classifier given in below figure 4 takes matrix developed in previous step and represented
as table 4, as input and output is stage of bananas or part of bananas image. According to expert we analyse
bananas bunch of different stages and developed table which contain %Green, %Yellow, and %Brown for
different stages. Classifier is containing set of rules of type If..Then..Else.
Stage

Green (G)

Yellow (Y)

G 85%

Y 10%

85% > G 75%

10% < Y 15%

75% > G 50%

15% < Y 40%

20% G < 50%

40% < Y 50%

B <= 5%

10% < G < 20%

50% < Y 75%

B <= 5%

5% < G 10%

75% < Y 90%

B <= 5%

G 5%

Y 75%

B > 5%

Table 3: Classification Criteria Table

Brown (B)

Classifier root node is testing, green part is greater than yellow part or not, if yes then bananas belongs to first
three stages of ripening, otherwise bananas belongs to remain stages of bananas. After that for classification of
bananas of first three stages we check difference between %Green and %Yellow. For classification of bananas
which are in stages from 4 to 7 are done using difference between %Yellow and %Green, and %brown color in
part of bananas images. Classifier for proposed scheme is given below figure.
Input
Matrix

D1 = G Y
D2 = Y G
G = %Green
Y = %Yellow

True

False

D2<35
& %BSA <10

False

D1 > 75

B = %Brown

False

G >Y

True

True
D1 > 60

True

False

D2 <60
& %BSA <10

True

False

%BSA <10

True
False

Stage 1

Stage 2

Stage 3

Stage 4

Stage 5

Stage 6

Figure 4: Classifier for Proposed Scheme

Stage 7

IV. RESULTS AND DISCUSSION

A. Classification Performance
Bananas set are first classified by expert and based on that we create table which contain %green, %yellow,
and %brown color for different stage and we compare it with input color image of bananas.
Results show that using three features: L*, a*, b* we can classifies more than 92% bananas hand. Results vary
for different stages. Conclusion of performance is given in table.
Stage

No. of sample

Performance

20

94%

15

92%

10

91%

15

90%

20

91%

30

95%

25

94%

Table 4: Performance Index Table


V. CONCLUSIONS AND FUTURE WORKS

Digital image processing can improve the process of classification of bananas. All reviewed and currently
available algorithms can efficiently measure the quality of single banana but when we apply on bunch of
bananas, performances of all algorithms are degrading. Proposed algorithm can overcome this limitation by
division of image into parts. If single banana from bunch of bananas is at different stage from other than
proposed algorithm can efficiently identify the stage of that banana. Selected features are able to predict change
of color on curved surface of bananas. In this research some factor play major role and they are like: image
acquisition system and resolution of image which is given as input to algorithm, selection of segmentation
method, selection of classifier.
Sometimes objectives and industry you are targeting may help you to select parameter. Adding more parameter
is not good for all schemes means selection of right number of parameter is important task. Some limitations of
system and characteristics of object you are analyse play major role and performance of system also depends on
it.
Thus, in the future, we can improve performance of proposed scheme by using different segmentation methods
and different classifier. Segmentation of bananas is first important things for bunch of bananas so that we can
improve performance by changing setting of image acquisition system and resolution of image.

REFERENCES

[1] Sally Smith Fairtrade Bananas: A Global Assessment Of Impact April 2010 page 17-18
[2] Bhavesh B. Prajapati Algorithmic Approach to Quality Analysis of Indian Basmati Rice Using Digital
Image Processing IJETAE volume 3, Issue 3, March 2013

[3] Tapre A.R. and Jain R.K Study of Advanced Maturity Stages of Banana IJAERS June 2012
[4] D.Surya Prabha and J.Satheesh Kumar Hybrid Segmentation of Peel Abnormalities in Banana Fruit
ICRTCT and IJCA 2013

[5] Dayanand Savakar Identification and Classification of Bulk Fruits Images using Artificial Neural
Networks IJEIT Volume 1, Issue 3, March 2012

[6] Catherine A. Durham, Marc V. McFetridge, and Aaron J. Johnson The Development of a Quality Scale to
Measure the Impact of Quality on Supermarket Fruit Demand 2005

[7] Fernando Mendozaa, Petr Dejmek, Jose M. Aguilera Calibrated color measurements of agricultural foods
using image analysis 2006

[8] Fernando Mendoza and Jos M. Aguilera Classification Of Bananas During Ripening By Computer
Vision February 2003

[9] Mamta Juneja, Parvinder Singh Sandhu Image Segmentation based Quality Analysis of Agricultural
Products using Emboss Filter and Hough Transform in Spatial Domain, 2009

[10]

Anup Vibhute and S K Bodhe Applications of Image Processing in Agriculture IJCA Volume 52

No.2, August 2012

[11]

Shiv Ram Dubey, Pushkar Dixit, Nishant Singh, and Jay Prakash Infected Fruit Part Detection using

K-Means Clustering Segmentation Technique IJAI IM, Vol. 2, N 2 Feb 2013

[12]

Ms. Jyoti Atwal, Mr. Satyajit Sen Purkayastha Analysis of nutrient contents and quality feature

extraction of clustered seeds using Digital Image Processing Vol. 2 Issue 2, Feb.2012

[13]

Reza Fellegari 1, Hosein Navid Determining the orange volume using image processing , ICFEB,

IACSIT, IPCBEE vol.9 2011

[14]

John A. Molino, Jason F. Kennedy Daytime Color Appearance of Retroreflective Traffic Control Sign

Materials

Citing

Sources:

[http://www.fhwa.dot.gov/publications/research/safety/13018/002.cfm]:

Chapter. 2: [Oct 3, 2013]

[15]

A Practical Guide and Tutorial to Digital Color Management for Photographers Section I:

ColorModels [http://www.booksmartstudio.com/color_tutorial/colortheory4.html] [Oct 13, 2013]

[16]

Introduction to

color theory Section: 4.3

The hue-saturation-value(HSV) color

model

[http://infohost.nmt.edu/tcc/help/pubs/colortheory/web/hsv.html] [Oct 29, 2013]

[17]

Converting

Color

Data

Between

Color

Spaces

Section

HSV

color

space

[http://www.mathworks.in/help/images/converting-color-data-between-color-spaces.html] [Nov 12, 2013]

S-ar putea să vă placă și