American Journal of Applied Sciences 7 (3): 390-394, 2010
© 2010Science Publications
A Back Propagation Neural Networks for Grading Jatropha curcas Fruits Maturity
Z. Effendi, R. Ramli and J.A. Ghani
Department of Mechanical and Materials Engineering,
Faculty of Engineering, 34600 UKM Bangi, Selangor, Malaysia
Abstract: Problem statement: Jatropha curcas has the potential to become one of the world’s key
energy crops. Crude vegetable oil, extracted from the seeds of the Jatropha plant, can be refined into
high quality biodiesel. Traditional identification of Jatropha curcas fruits is performed by human
experts. The Jatropha curcas fruit quality depends on type and size of defects as well as skin color and
fruit size. Approach: This research develops a back propagation neural networks to identify the
Jatropha curcas fruit maturity and grade the fruit into relevant quality category. The system is divided
into two stages: The first stage is a training stage that is to extract the characteristics from the pattern.
The second stages is to recognize the pattern by using the characteristics derived from the first task.
Back propagation diagnosis model is used to recognition the Jatropha curcas fruits. It is ascertained
for the developed system is used in recognizing the maturity of Jatropha curcas fruits. This study
presents a pattern recognition system of Jatropha curcas using back propagation. Results: By using
back propagation, it gave an accuracy of about 95% based on our samples which used the twenty-
seven images. The results produced by neural network were found to be more accurate due to its
capability to distinguished complex decision regions. Conclusion: The training data set for back
propagation had 4 levels of grading i.e., raw, fruit-aged, ripe and over ripe with twenty-seven images
of Jatropha curcas fruits. At the end of the training, the neural network achieved its performance
function by testing with a selected set of different images. The performance of the back propagation
was satisfactory when incorporated with the software tool, since there were number of errors arising in
Key words: Jatropha curcas fruit, back propagation, maturity, grading, neural networks
Carbon dioxide (CO2) which in turn causing global
warming. Therefore seed oil from Jatropha curcas
Jatropha grows in tropical and subtropical regions
offers an excellent alternative for the source of energy
in a band around the earth between latitudes 30° north
(Jatropha World, 2007). Here one of the most important
and south of the Equator. Jatropha is hardy and
tasks in the overall domain known as Image Processing
relatively drought resistant. Trees have a lifespan of up
(IP) is the task of image classification (Gonzalez and
to 30 years. Jatropha grows on a wide range of land
Woods, 2002). Color grading is an important process
types, including non-arable, marginal and waste land
for the Jatropha curcas fruit that often used to
and need not compete with vital food crops for good
determine quality. Color image processing based
agricultural land. As Jatropha curcas seeds and green
systems have more recently been used in color grading.
leaves are poisonous that works as a very effective
Color grading applications are implemented by using
barrier. Long qualified as an interesting but color image processing (Blasco et al., 2003). Since food
"underutilized" crop, it is now being increasingly used
products can be graded by their color, color grading for
in reforestation programs in tropical countries because
apples (Unay and Gosselin, 2004; 2007; Nakano, 1997),
it thrives on poor soils and on land that is suffering
strawberry (Nagata et al., 1997), tomato (Choi et al.,
under erosion (Giovanni, 2007). The good news for the
1995) and other fruits have been developed
world which is facing significant reduction in fossil fuel
(Njoroge et al., 2002). Two main characteristics that
availability as main source of energy because from
are decisive for visual inspection and classification of
Jatropha curcas fruits, a biofuel can be extracted. The
fruits are color and shape. For Jatropha curcas fruit, the
use of fossil fuel also polluting the environment with
estimation of quality cannot be done just by its shape
Corresponding Author: Z. Effendi, Department of Mechanical and Materials Engineering, Faculty of Engineering,
34600 UKM Bangi, Selangor, Malaysia
Am. J. Applied Sci., 7 (3): 390-394, 2010
because a fruit may have a different shape but the same
(Nakano, 1997), the classification of logs for defects
level of quality (Jain and Vailaya, 1996).
using computed tomography imagery can be 95%
The classification of Jatropha curcas fruit is used
accurate (Schmoldt et al., 1997) and the accuracy for
for the purpose of identifying the class labels for
the classification of wheat kernels by color can be 98%
Jatropha curcas fruit on a set of target features. The
or more (Wang et al., 1999). Generally, neural
classification of Jatropha curcas fruit can be networks can efficiently model various input and output
represented by external appearance such as color. For
relationships with the advantage of requiring less
example, Jatropha curcas fruit with green, yellow and
execution time than a procedural model (Yang et al.,
black color that represent raw, ripe and overripe can
analyze surface color of the Jatropha curcas fruit from
In this study, we present a development of pattern
their images. Learning classifiers from pre-classified
recognition system of Jatropha curcas fruit using
Jatropha curcas fruit are used in a pattern recognition
neural networks that focused on the Jatropha curcas
system. Neural network have proven to be a promising
fruit classification problem. All features are extracted
paradigm for intelligent systems. Neural network have
from digital data of Jatropha curcas fruits. We adopt
been trained to perform complex functions in various
back propagation algorithm neural network for its fast
fields of application including pattern recognition,
speed and simple structure. The whole algorithm is easy
identification and classification (Johnson and Picton,
to implement, using common approaches (Rumelhart
and McClelland, 1987). The back propagation algorithm
Pattern recognition is the human ability to see
is used in layered feed-forward neural network. This
regularities in observations. From the early means that the artificial neurons are organized in layers
development of computers, scientist and engineers tried
and send their signal “forward” and then errors are
to imitate this ability by mechanical means, either
propagated backwards. The network receives inputs by
partially or in its entirety. The four best approaches for
neurons in the input layer and the output of the network
pattern recognition are template matching, statistical
is given by neurons on an output layer.
classification, syntactic or structural recognition and
MATERIALS AND METHODS
artificial neural networks (Theodoridis and
Koutroumbas, 1998; Bishop, 2000; Ripley, 1996;
This research was initially planned to be completed
Fukunaga, 1990; Friedman and Kandel, 1999). The
in two stages. The first stage is to extract the
latter approach attempts to use some organizational
characteristics from the pattern being studied. The
principles as learning, generalization, adaptively, fault
second stages is to recognize the pattern by using some
tolerance and distributed representation and characteristics derived from the first task. A neural
computation in order to achieve the recognition. Among
network diagnosis model is used to recognition the
all approaches, neural network has the fastest speed and
Jatropha curcas fruits. The flow diagram of pattern
best accuracy for classification work (Du et al., 2005).
recognition system is shown in Fig. 1.
The main characteristics of neural network are that they
have ability to learn complex nonlinear input-output
relationships, use sequential training procedures and
adapt themselves to data. Some popular modules of
neural network have been shown to be capable of
associative memory and learning (Schurmann, 1996;
Kohonen, 1997; Fausett, 1994). The learning process
involves updating the network architecture and
modifying the weights between the neurons so that the
network can efficiently perform a specific
classification/ clustering task.
There have been many application of neural
networks reported for interpretation of image in the
agri-food industry. Studies have shown that for the
interpretation of image neural networks can be as
accurate as procedural model (Deck et al., 1995;
Timmermans and Hulzebosch, 1996). For example, the
accuracy of classification of potted plants can be greater
than 99% (Timmermans and Hulzebosch, 1996), apples
can be graded by color with an accuracy of 95%
Fig. 1: Flow diagram processing
Am. J. Applied Sci., 7 (3): 390-394, 2010
Fig. 2: Background purification (top: Original image;
bellow: After background purification)
Fig. 3: Back propagation neural network structure
Stage 1: Training Stage: A digital camera is used to
capture Jatropha curcas fruit images from the Jatropha
curcas plants in University Kebangsaan Malaysia
(UKM). The Jatropha curcas fruit images are
transfered to a personal computer and were converted
from jpeg to bitmap format (BMP). The image size
Jatropha curcas fruit images was 756504 pixel. These
Jatropha curcas images is cropped to a size of 100100
pixels. The Jatropha curcas fruit images separated from
the background. The result is shown in Fig. 2.
Later the images are segmented to 100100 pixel
so that it can be used as a training data set. The size of
100100 pixel was to make sure that back propagation
neural networks was kept to the smallest possible size
Fig. 4: Display GUI of trained process
in order to achieve easier training. Each pixel of a
Jatropha curcas fruit image is classified into one of 256
In the training process, the network obtain 45
categories, represented by an integer in the range from
essential training data parameters. The weights of 45
0 (black)-255 (white). Each assigned color indices the
node-layer altered and then the parameters are passed to
only inputs used in this study, others features, such as
the hidden layer respectively. Figure 3 shows the back
shape, are expected to be taken into account by neural
propagation neural network structure.
networks since information about them is implicit in the
relationships between the pixel colors.
Stage 2: Analyzing Jatropha curcas fruits: In the
Back propagation neural networks architecture
second stage an analyzing process is carried out
developed is chosen as it was a simple and one of the
software tool. In this process has been developed
most commonly used neural networks (Demuth et al.,
incorporating the back propagation that was trained,
2009). Another reason to chose back propagation due to
which display the Jatropha curcas fruit image to the
it’s ability to perform pattern classification on data
user in a Graphical User Interface (GUI). Figure 4 show
where the input and the output had no linear
the GUI that has been developed
relationship, as in the case of this application
The result of the GUI analysis window is displayed
(Valluru et al., 1996). The back propagation neural
after analyzing the Jatropha curcas fruit image. The
networks is as represented weighted sum:
Jatropha curcas fruit image segments with the grading
(raw, ripe and over ripe) are shown on the analysis
A (x, )
x w (1)
A (x, )
= Back propagation
Our database consists of twenty-seven images. A
set of fifteen images were used for training the network
and twelve were used for testing the performance.
Am. J. Applied Sci., 7 (3): 390-394, 2010
Table 1: Result matched pattern of object recognition
its performance function but the time taken to achieve it
was significantly high. When tested with a selected set
of different image other than that used for training the
back propagation neural network was able to categorize
When incorporated into the software tool the
performance of the back propagation neural network
was satisfactory as there were not substantial number of
errors in categorizing. This was expected as the back
propagation neural networks had not been trained with
data directly from the tool. Training with live data from
the tool itself is the next goal and the use of different
learning algorithms and learning rates with learning
Parameters selected for the classification of images as
optimization techniques are yet to be undertaken.
raw, fruit-aged, ripe and over ripe are, color and shape.
These parameters were extracted for the images shown
in Fig. 2. The preliminary results of the four classifiers
are shown in Table 1.
The researchers would like to Government of
Raw, fruit-aged, ripe and over ripe status images
Malaysia and University Kebangsaan Malaysia for their
were used in the training. In the back propagation
financial support under UKM-GUP-BTT-07-25-025
neural network, it gave an accuracy of about 95%,
based on our samples used of the twenty-seven images.
For the self-organizing network, it gave almost perfect
results but because of the small sample size used,
confirmation can only be given with further testing. The
Bishop, C.M., 2000. Neural Networks for Pattern
results produced by neural network were found to be
Recognition. Oxford University Press, ISBN: 0-19-
more accurate due to its capability to distinguished
complex decision regions.
Blasco, J. N. Aleixos and E. Molt´o, 2003. Machine
vision system for automatic quality grading of
fruit. Biosyst. Eng: 85: 415-423.
Choi, K.H. G.H. Lee, Y.J. Han and J.M. Bunn, 1995.
Tomato maturity evaluation using color image
The system captures the images of various
analysis. Trans. ASAE, 38: 171-6.
Jatropha curcas samples for analyzing those samples
Deck, S.H., C.T. Morrow, P.H Heinemann and H.J. Sommer,
using color matching technique to provide a pixel color
1995. Comparison of a neural network and
value more precisely and reliably. It also finds a
traditional classifier for machine vision inspection
suitable match from the previously created image
of potatoes. Applied Eng. Agric., 11: 319-326.
database. Grading will be done based on color. Others
Demuth, H., M. Beale and M. Hagan, 2009. User
feature such as shape was expected to be taken into
Guide, Neural Networks ToolboxTM 6. The
account by neural networks since information about
MathWorks, Inc., ISBN: 0-9717321-0-8, pp: 155-266.
them is implicit in the relationships between the pixel
Du, J., D. Huang, X. Wang and X. Gu, 2005. Shape
colors Color image is analyzed using RGB (Red, Green,
recognition based on radial basis probabilistic
and Blue) model because human perception is closely
neural network and application to plant species
matched with this classification system. A suitable
identification. Lecturer Notes Comput. Sci.,
color-matching algorithm with soft computing
3497: 281-285. DOI: 10.1007/b136478
technique has been utilized to determine the nearest
Fausett, L., 1994. Fundamental of Neural Networks.
match from this image database.
Prentice Hall, ISBN: 0-13-334186-0, pp: 461.
Friedman, M, and A. Kandel, 1999. Introduction to
Pattern Recognition, Statistical, Structural, Neural
and Fuzzy Logic Approaches. World Scientific,
The training data set for back propagation neural
Vol. 32, ISBN: 978-9810233129.
networks had 4 level of grading (raw, fruit-aged, ripe,
Fukunaga, K., 1990. Introduction to Statistical Pattern
over ripe) with twenty-seven images of Jatropha curcas
Recognition. 2nd Edn., Academic Press, ISBN: 0-
fruits. At the end training the neural network achieved
Am. J. Applied Sci., 7 (3): 390-394, 2010
Giovanni, D.G., 2007. The Jatropha energy system: An
Schmoldt, D.L., P. Li and A.L. Abbott, 1997. Machine
integrated approach to decentralized and
vision using artificial neural networks with local
sustainable energy production at the village level.
3D neighborhoods. Comput. Elect. Agric., 16: 225-271.
Schurmann, J., 1996. Pattern Classification, a Unified
View of Statistical and Neural Approaches. John
Gonzalez, R.C. and R.E. Woods, 2002. Digital Image
Wiley and Sons, New York, ISBN: 0-471-13534-8.
Processing. 2nd Edn., Addison-Wesley, ISBN:
Theodoridis, S. and K. Koutroumbas, 1998. Pattern
Recognition. Academic Press, USA., ISBN-
Jain, A.K. and Vailaya, 1996. A image retrieval using
color and shape. Patt. Recogn., 29: 1233-1244.
Timmermans, A.J.M. and A.A. Hulzebosch, 1996.
Jatropha World, 2007. Biodiesel: The next generation
Computer vision system for on-line sorting of pot
plants using an artificial neural network classifier.
Comput. Electronics Agric., 15: 41-55.
Unay, D, and B. Gosselin, 2004. A quality sorting
Johnson, J. and P. Picton, 1995. Concepts in Artificial
method for ‘Jonagold’ apples. Proceedings of
Intelligence. Butterworth-Heinemann LTD, ISBN:
AgEng Leuven 2004-Engineering the Future
0-7506-2403-5, pp: 95-96.
(International Conference of Agricultural
Kohonen, T., 1997. Self-Organizing Maps. Springer,
Engineering), Sept. 12-16, Leuven, Belgium, pp: 1-8.
Unay, D. and B. Gosselin, 2007. Stem and calyx
Nagata, M., O. Kinoshita and K. Asano et al., 1997.
recognition on ‘Jonagold’ apples by pattern
Studies on automatic sorting system for strawberry
recognition. J. Food Eng., 78: 597-605.
(Part 3). J. Jap. Soc. Agric. Mach., 59: 43-48.
Valluru, B. Rao, Hayagriva and V. Rao, 1996. C++
Nakano, K., 1997. Application of neural networks to
Neural Networks and Fuzzy Logic. 2nd Edn., BPB
the color grading of apples. Comput. Elect. Agric.,
Publication, ISBN: 81-7029-694-3, pp: 102-105.
Wang, D., F.E. Dowell and R.E. Lacey, 1999. Single
Njoroge, J.B., K. Ninomiya, N. Kondo and H. Toita,
wheat kernel color classification using neural
2002. Automated fruit grading system using image
networks. Trans. ASAE, 42: 233-240.
processing. Proceedings of SICE 2002, Osaka,
Yang, C.C., S.O. Prasher, R. Lacroix, S. Sreekanth and
Japan, pp: 1346-51.
A. Madani et al., 1997a. Artificial neural network
Ripley, B.D., 1996. Pattern Recognition and Neural
model for subsurface-drained farmlands. J. Irrig.
Networks. Cambridge University Press,
Drainage Eng., 123: 285-292.
Cambridge, ISBN: 0-521-46086-7.
Yang, C.C., S.O. Pasher and G.R. Mehuys, 1997b. An
Rumelhart, D and J. McClelland, 1987. The Appeal of
artificial neural network to estimate soil
Parallel Distributed Processing. In: Parallel
temperature. Can. J. Soil Sci., 77: 421-429.
Distributed Processing: Explorations in the
Microstructure of Cognition, Rumelhart, D.E. and
J.L. McClelland (Eds.)., Vol. 2. MIT Press,
Cambridge, MA., ISBN: 0262631121.