A Neural Network Based Recognition and Classification of Commonly Used Indian Non Leafy Vegetables

Автор: Ajit Danti, Manohar Madgi, Basavaraj S. Anami

Журнал: International Journal of Image, Graphics and Signal Processing(IJIGSP) @ijigsp

Статья в выпуске: 10 vol.6, 2014 года.

Бесплатный доступ

A methodology to characterize the commonly used Indian non-leafy vegetables’ images is developed. From the captured images of Indian non-leafy vegetables, color components, namely, RGB and HSV features are extracted, analyzed and classified. A feed forward backpropagation artificial neural network (BPNN) is used for the classification. The results show that it has good robustness and a very high success rate in the range of 96-100% for eight types of vegetables. The work finds usefulness in developing recognition system for super market, automatic vending, packing and grading of vegetables, food preparation and Agriculture Produce Market Committee (APMC).

Еще

Machine vision, Digital image processing, Neural Networks classifier, Color features, Vegetable Recognition, Agricultural/horticultural produce

Короткий адрес: https://sciup.org/15013441

IDR: 15013441

Текст научной статьи A Neural Network Based Recognition and Classification of Commonly Used Indian Non Leafy Vegetables

Vegetables form a major produce in Indian agriculture as these provide food and nutrients to us. Vegetables give economic security to farmers and more importantly, help produce higher returns per unit area and time. In addition, vegetables have higher productivity, shorter maturity cycle, high value and provide greater income leading to improved livelihoods. The present is the Robotic era. Robots have been deployed in varieties of applications like aerospace, automotive, consumer goods, food, medical, agriculture and in many other industries. The robots carry pre-defined tasks efficiently with embedded computer vision systems. Computer vision systems have many applications such as performing agricultural tasks, object recognition etc. Computer vision systems developed for agriculture/horticulture applications, namely, weed detection, disease identification, classification of grains, identification of medicinal plants, classification of crops and weeds etc. In all these systems, the images are processed to extract useful features that are necessary for further recognition and classification.

The majority of activities in the real world can be carried out automatically by the development of robotics. One such application envisaged is the automatic identification of images of non leafy vegetables. There are many types of non leafy vegetables found in market. Some common vegetables are shown in Fig. 1.

A machine vision system to identify and classify leafy vegetables, a substantial work dealing with the use of reduced color features set for classification of different types of vegetables is proposed [1]. Automatic fruits and vegetables classification methodology from images using histograms, colors and shape descriptors with an unsupervised learning method is given [2]. Identification and classification of medicinal plants based on edge and color descriptors are described [3]. Identification and classification of boiled food grains based on the level of boiling using two color models HSV and L*a*b* are given. Food classification system to grade six types of fresh produce using average CIE L*a*b* and Bayesian interface technique to classify food ripeness are described [4, 6, 14]. Automatic produce ID system, intended to ease the vegetable checkout process is introduced. A variety of features, namely, color, texture and shape are used [5]. Automated classification system of pizza sauce spread using color vision and support vector machines (SVM) to characterize pizza sauce spread with low dimensional color features is developed. The image is transformed from red, green, and blue (RGB) color space to hue, saturation, and value (HSV) color space [7]. The algorithm to characterize target features in color space from a set of training data for the color classification accurately and efficiently is presented [11]. Fruit detection using improved multiple features based algorithm is discussed. It helps to locate the fruit on the tree. The algorithm is designed for calculating different weights for features like intensity, color, orientation and edge of the input test image. Fruit recognition using color and texture features an efficient fusion of color and texture features for fruit recognition is proposed in [10, 13]. To classify potato chips using pattern recognition from color images is presented [12]. An image analysis algorithm based on color and morphological features for identifying different varieties of rice seeds. Seven color features and fourteen morphological features are used for the discrimination of analysis is described [15].

Fig. 1. Images of common Indian non leafy vegetables (a) Beans (b) Bitter gourd (c) Brinjal (d) Capsicum (e) Carrot (f) Cucumber (g) Ladies Finger (h) Tomato

From the literature survey, it is observed that the identification and classification tasks are carried out on different data, like fruits, medicinal plants, pizza etc. The accuracies of recognition are varying. In the case where there is a high similarity among groups to be discriminated, the classification accuracies are not high.

In this paper, an approach based on color features is proposed for identification of non leafy vegetables, which are grown and used in India. A back propagation neural network (BPNN) is deployed for classification. The images are obtained by a color camera and then 18 features are extracted from the images. These features are reduced to 12 and further to nine using principal component analysis (PCA). The nine features are input to a neural network.

The paper is organized into five sections. Section II contains image acquisition and proposed methodology. Section III describes feature extraction and analysis. Results and discussions are presented in section IV. Section V gives the conclusion of the work.

Table 1. Details of common Indian non leafy vegetables

English Name

Botanical Name

Common name in India

Hindi

Kannada

Beans

Phaseolus vulgaris L.

Beans

HuraLikaayi

Bitter gourd

Momordica charantia

Karela

Hagalkaayi

Brinjal

Solanum melongena

Baingan

Badanekaayi

Capsicum

Capsicum annuum

Simla Mirch

Dhodda Menasinakayi

Carrot

Daucus carota

Gaajar

Gajjari

Cucumber

Cucumis sativus

Kakdi

Southekaayi

Ladies Finger

Abelmoschus esculentus

Bhindi

Bendekaayi

Tomato

Solanum lycopersicum

Tamatar

Tomato

II. Proposed Methodology

The current work on non leafy vegetable classification comprises of four tasks, namely, image acquisition, feature extraction, feature reduction and classification. The block diagram shown in Fig. 2 depicts the proposed methodology.

Vegetable type

Fig. 2. Block diagram of proposed methodology

  • III.    Feature Extraction and Analysis

Non Images of non leafy vegetables appear in different colors, shapes and sizes. Vegetables have dominant colors and hence are differentiated from one another by color feature.

  • A.    Image Acquisition

    A Sony digital camera with an image resolution of 10 mega pixels is used to capture the images. We have considered eight different types of fresh non leafy vegetables such as Beans, Bitter gourd, Brinjal, Capsicum, Cucumber, Carrot, Ladies Finger and Tomato. The images are acquired in a day light using a digital camera placed at a distance of 40 centimeters. The images obtained are of size 3264 x 2448 pixels. The images are cropped and resized to 150 x 150 pixels for computational reasons. Fig. 1 shows the image samples acquired from the camera.

  • B.    Feature extraction

An algorithm is developed in Windows environment using MATLAB 7.8 programming language to extract features. RGB color model is adopted to extract color features. The values of R, G and B color components from vegetable images are normalized so as to have the values in the range [0, 1]. The HSV color features are obtained from the RGB components.

Table 2. 18-RGBHSV color features

Sl. No. Feature Sl. No. Feature 1 Red mean 10 Hue mean 2 Red variance 11 Hue variance 3 Red range 12 Hue range 4 Green mean 13 Saturation mean 5 Green variance 14 Saturation variance 6 Green range 15 Saturation range 7 Blue mean 16 Value mean 8 Blue variance 17 Value variance 9 Blue range 18 Value range with

H = ^

'0       if B < G

360 - 0 if B > G

„     1'      R - G/2 - B/2

0 = cos

[ [( R - G )2 + ( R - B )( G - B )]1/2

5 = 1--[mn( R, G, B)]

R + G + B

Fig. 3. RGBHSV color features histogram of non leafy vegetables

V = max( R , G , B )            (3)

Table 3. Confusion Matrix of non leafy vegetables for 18 color features

The mean, variance and range values of R, G, B, H, S, V are calculated for an image after resize. The 18 color features, obtained from the equations (4), (5) and (6) are used to characterize an image. The 18 color features for non leafy vegetables are listed in Table 2 and their respective histograms are shown in Fig. 3.

Mean ц = ^ xP ( x , y )

x,y

Variance ст = ^ ( x - ц )2 P ( x , y )     (5)

x , y

Range = Max( p ( x , y )) - min( p ( x , y ))      (6)

O

I

BN

BG

BR

CA

CR

CU

LF

TO

BN

48

1

1

BG

50

BR

50

CA

50

CR

50

CU

1

47

2

LF

3

47

TO

50

Legend: BN-Beans, BG-Bitter gourd, BR-Brinjal, CA-Capsicum, CR Carrot, CU-Cucumber, LF-Ladies Finger, TO-Tomato

Fig. 4. Classification accuracy of non leafy vegetables based on 18 color features

  • 1)    Image analysis

All the 18 color features used for classification of non leafy vegetables do not contribute significantly for the classification. If there are too many redundant features, the classifier performance declines. To minimize the number of features that contributed to the classification, feature reduction is used. The first level of feature reduction based on the level of contribution to the process of classification is listed in Table 4 and the corresponding histogram of these features is show in Fig. 5.

Table 4. Reduced 12 color features

Fig. 5. Reduced RGBHSV color features histogram of non leafy vegetables

Sl. No.

Feature

1

Red mean

2

Red range

3

Green mean

4

Green range

5

Blue mean

6

Blue range

7

Hue mean

8

Hue range

9

Saturation mean

10

Saturation range

11

Value mean

12

Value range

Table 5. Confusion Matrix of non leafy vegetables for 12 color features

I   O

BN

BG

BR

CA

CR

CU

LF

TO

BN

49

1

BG

50

BR

50

CA

50

CR

50

CU

1

47

2

LF

3

47

TO

50

Legend: BN-Beans, BG-Bitter gourd, BR-Brinjal, CA-Capsicum, CR-Carrot, CU-Cucumber, LF-Ladies Finger, TO-Tomato

Fig. 6. Classification accuracy of non leafy vegetables based on 12 color features

  • 2)    Principal component analysis (PCA)

The second level of feature reduction is carried out using Principal Component Analysis. The nine features obtained are shown in Table 6. These nine principal components together accounted for an accuracy of 99% of the twelve-feature dataset of 98.25%. Within these components, mean and range are the important features whose histograms are shown in Fig. 7.

Table 6. PCA reduced color features

Sl. No.

Feature

1

Red mean

2

Red range

3

Green mean

4

Green range

5

Blue range

6

Saturation mean

7

Saturation range

8

Value mean

9

Value range

Fig. 7. PCA reduced color features histogram of non leafy vegetables

Table 7. Confusion Matrix of non leafy vegetables for PCA reduced color features

I O

BN

BG

BR

CA

CR

CU

LF

TO

BN

49

1

BG

50

BR

50

CA

50

CR

50

CU

1

49

LF

2

48

TO

50

Legend: BN-Beans, BG-Bitter gourd, BR-Brinjal, CA-Capsicum, CR-Carrot, CU-Cucumber, LF-Ladies Finger, TO-Tomato

A. Neural network

Fig. 8. Three layer feed-forward back-propagation artificial neural network (BPNN)

Fig. 9. Classification accuracy of non-leafy vegetables based on color features

The number of neuron in the input layer is nine, and the number of neurons in the hidden layers is twenty eight, which is fixed by trial and error. The number of neuron in the output layer is eight corresponding to the number of the vegetable types. The architecture of feedforward backpropagation neural network (BPNN) is shown in Fig. 8. The output of the classifier is an 8-bit vector. The network is trained to output a 1 in the corresponding position of the output vector for the given type of the vegetable and the rest of the output vector is filled with 0. For example, (10000000) corresponds to the vegetable type “Beans”.

  • IV.    Results And Discussion

  • 100.00%, 100.00%, 98.00%, 96.00% and 100.00%

The developed methodology is tested with 800 images of non-leafy vegetables of 8 types. 400 images (50 images from each type) are used to train the neural network classifier; the remaining 400 images are used for testing.

The accuracies are obtained for the images of different vegetables. For Beans, Bitter gourd, Brinjal, Capsicum, Carrot, Ladies Finger and Tomato, the classification accuracies obtained are 98.00%, 100.00%, 100.00%,

respectively. The accuracies are shown in Fig. 9. The average classification accuracy is 99%.

  • V.    Conclusion

A methodology is developed to classify the different types of vegetables based on color features. The RGB and HSV color models are deployed. Eighteen color features are extracted from each image and reduced to nine features were selected from the 18 features by principal component analysis. A feed-forward backpropagation artificial neural networks (BPNN) is used as classifier. The classification accuracies are observed as 98.00%, 100.00%, 100.00%, 100.00%, 100.00%, 98.00%, 96.00% and 100.00% for Beans, Bitter gourd, Brinjal, Capsicum, Carrot, Ladies Finger and Tomato respectively. The classification accuracy of Bitter gourd, Brinjal, Capsicum, Carrot, Ladies Finger and Tomato found to be high because their colors are different from the others. The classification accuracy is decreased for Beans, Cucumber and Ladies Finger because of similarity in color. The work is useful in real world applications such as automatic identification of the different vegetable types, their grading, packing, sales in the supermarket and food preparation etc.

Список литературы A Neural Network Based Recognition and Classification of Commonly Used Indian Non Leafy Vegetables

  • Ajit Danti, Manohar Madgi & Basavaraj S. Anami, “Mean and Range Color Features Based Identification of Common Indian Leafy Vegetables”. In: International Journal of Signal Processing, Image Processing and Pattern Recognition, 2012, 5(3): 151-160.
  • Anderson Rocha, Daniel C. Hauagge, Jacques Wainer & Siome Goldenstein, “Automatic fruit and vegetable classification from images”. In: Computers and Electronics in Agriculture 70, 2010: 96-104.
  • Basavaraj S. Anami, Suvarna S. Nandyal, A. Govardhan, “A Combined Color, Texture and Edge Features Based Approach for Identification and Classification of Indian Medicinal Plants”, In: International Journal of Computer Applications (0975-8887), 2010, 6(12): 45-51.
  • Basvaraj S. Anami, Vishwanath C. Burkpalli, “Color Based Identification and Classification of Boiled Food Grain Images”. In: International Journal of Food Engineering, 2009, 5(5):1-19.
  • Bolle, R.M., Connell, J.H., Haas N., Mahon, R. and Taubin, G., “VeggieVision: A Produce Recognition System”. Technical Report forthcoming, IBM, 1996.
  • B. S. Anami, D.G. Savakar, A. K. Kannur, M. V. Karali1, “Classification of Grapes Using Artificial Neural Network”, Proceedings of the International Conference on Cognition and Recognition, 2008, 436-442.
  • Cheng-Jin Du, Da-Wen, “Pizza sauce spread classification using color vision and support vector machines”. Journal of Food Engineering, 2005, 66(2): 137-145.
  • Fernandez C, Suardiaz J, Jimenez C, Navarao P. J, & Toledo A, Iborra A., “Automated Visual Inspection System for the Classification of Preserved Vegetables”, in Proc. of the IEEE International Symposium, 2002(1): 265-269.
  • Gonzalez, R. C. and Woods, R. E., “Digital Image Processing”, Third Edition, Pearson Education Inc., 2008.
  • Hetal N. Patel, Dr. R.K. Jain, Dr. M.V. Joshi, “Fruit Detection using Improved Multiple Features based Algorithm”, In: International Journal of Computer Applications (0975-8887), 2011, 13(2): 1-5.
  • Kok-Meng Lee, Qiang Li, Wayne Daley, “Effects of Classification Methods on Color-Based Feature Detection With food Processing Applications”, In: IEEE Transactions on Automation Science and Engineering, 2007, 4(1): 40-51.
  • Pedrerschi .F, D. Mery, F.Mendoza & J.M. Aguilera, “Classification of Potato Chips Using Pattern Recognition, Journal of Food Science”, 2004 ( 69): E264-270.
  • S. Arivazhagan, R.Newlin Shebiah, S.Selva Nidhyanandhan, L.Ganesan, “Fruit Recognition using Color and Texture Features”, In: Journal of Emerging Trends in Computing and Information Sciences, 2010, 1(2): 90-94.
  • S. Somatilake, A.N. Chalmers, “An Image-Based Food Classification System”, In: Proceedings of Image and Vision Computing, New Zealand, 2007: 260-265.
  • Zhao-yan Liu, Fang Cheng, Yi-bin Ying, & Xiu-qin Rao, “Identification of rice seed varieties using neural network”. Journal of Zhejiang University SCIENCE B, 2005, 6(11):1095-1100.
Еще
Статья научная