Classification of Fruits Based on Shape, Color and Texture using Image Processing Techniques

DOI : 10.17577/IJERTV6IS120057

Download Full-Text PDF Cite this Publication

Text Only Version

Classification of Fruits Based on Shape, Color and Texture using Image Processing Techniques

Deepika Bairwa Gaurav Sharma

M.Tech. Scholar Assistant Professor

Department of ECE, Department of ECE,

Mewar University, Chittorgarh (India) Mewar University, Chittorgarh (India)

Abstract: Food processing industry in any developing nation like India has been always a rough estimate.Food depans on agriculture and horticulture .Agriculture plays an important role in economic development of India. Food processing is need to come up with some new technology so this will make forefront the food sector with best quality .Grading fruits is necessary in evaluating agriculture produce ,meeling quality standards and increasing market value.This paper (envisages ) proposes an system methology for fruits classification based on the shape,color,and texture.This work particulary focused on improving the automation by successfully increasing the detection accuracy of fruits to be processed .This system methology will syccessfuly identifying the different types of fruits by categorizing them into type of category they belong.System involved application of nural network to start with high resolution images of fruits was captured using camera then for faster processing resizing, after the images were resize then shape,colour,texture features were extracted. After the features were extracted the artifical neural network ware used for testing purpose the unclassified images were then fed into ANN system to extract all specified feature and these extracted feature were compared with stored features in neural network on the basis of comparision the fruits are classified.This methodology demonstrates improvement in the classification accuracy using matlab softwear from the previous research work.

Fig.1 Block diagram of Proposed Methodology

  1. Image Capture

    A digital camera is used for capturing image of fruits. five fruits such as apple, orange, banana, mango and pomegranate are captured as shown in figure 2.

    Fig.2. Image of different fruits

    Keywords: Shape,Color,Texture,Artifical neural network, Gray level co-occurrence matrix .

    1. INTRODUCTION

      India ranks second in the world in the production of fruit

      [1] The quality of fruits plays a crucial role since they are been used in variety of applications like export, producing fruit jam,fruits juice, etc.The fruit industry plays a vital role in a countrys economic growth. Now a days fruits classification and quality evaluation is a major research area in mechanization world . In this paper, main focus has been laid on an economic way is used to analyze the fruits quality which is based on colour, shape and size.

    2. PROPOSED METHODOLOGY

      The developed methodology is consisting of three steps. In the first step digital camera is used to capture an image followed by preprocessing of image. In the second step feature is extracted from fruits image. In this we proposed a texture feature to enhance the classification accuracy. In the last step classification of fruit take place on the basis of knowledge gain during training phase.

  2. Preprocessing

    Pre processing refers to the initial processing of input image to eliminate the noise and correct the distorted or degraded data. First the captured image is too big in size so a program is developed to resize an image without affecting the quality of image. Image is representing in the form of RGB pixels. Edge detection is used for the enhancement of the image. Desired fruit image is obtained after filtering and this image can be used for features extraction

  3. Feature Extraction

The image obtained after image preprocessing can be use for feature extraction. The features that can be extracted from an image of any fruit are its shape, color and texture. These features help the user to classify the fruits in different categories.

i. Shape feature

There are several techniques which can be used to extract the morphological features from an image. For size/shape, five edge detection techniques are used[2] Shape modeling is the foundation for object recognition under change of pose, deformation, and varying lighting conditions[3]Shape based

classification of fruits takes care of various features like area, perimeter, major axis length and minor axis length. The image generally consists of pixels which includes RGB (Red,Green and blue) components. For calculating these shape features RGB image is converted into gray scale image.[4] . When the image is converted into gray scale image then it represents a different intensity value. There is a difference in intensity value of an object to be classified and the background. A threshold value is decided to separate an object from its background. With the help of this threshold value a gray scale image is converted into binary image in which the value greater than the threshold is 1 and the value lower than the threshold is 0. With the help of this binary image different shape features are calculate. The most common shape features calculated from the image are area, perimeter, major axis length and minor axis length.[11,12]

II COLOR FEATURE

An image generally consist of RGB components (red, green and blue) which represents three planes M*N*3.[5] Fruits classified on color bases consist of these three color space RGB. RGB color space is converted into another color space such as HIS, HSV etc [6].HSI stand for hue, saturation and intensity. Pure color attribute of image is described by hue and the amount by which pure color image is diluted by white color is described by saturation. The RGB components are separated from the original image, and the Hue (H), Saturation(S) and Intensity (I) components are extracted from RGB components [7].

iii. Texture feature extraction

Texture is calculated by the outer part of an object which measures the roughness, coarseness and smoothness of an image. Texture is classified by the spatial distribution of gray levels in a neighborhood.It also helps in surface determination and shape determination. Gray level co- occurrence matrix is used to calculate different texture features[8].Gray level co-occurrence matrix(GLCM) is used to extract texture features of an image. The Grey Level Co- occurrence Matrix, GLCM is also called as Grey Tone Spatial Dependency Matrix. It represents the image in the form of tabulation which contains different combinations of pixel brightness value (gray levels) that occurs in an image.[9] To calculate different texture feature like entropy,energy,homogeneity and dissimilarity a gray level co-occurrence matrix is created[14,15].

  1. PROPOSED SCHEME Methodology for the fruit classification is mention as above whose operation divided into two phase .Neural network is used to classify the fruit in different categories. Neural

    network is consist of three layer are input layer, hidden layer and output layer. Working of neural network is divided into

    two phase are Training phase and testing phase. 100 image of each fruit is taken out of which 50 are used for training and remaining 50 images are used for testing.

    Training phase: 50 images are used to train the neural network and it gained information about each image. During training phase neural network is trained to identify the fruit on shape, color and texture bases.

    Testing Phase: neural network identified the image of unknown fruit on the bases of earlier information that it gained about. Neural network analyses the various shape, color and texture features for unknown image and comared with that are store in the data base and classified the unknown imaged to desired known fruit image on the basis of knowledge gained by neural network during training.

    Fig.3 Block Diagram for Classification of Fruits on Texture bases

  2. IMPLEMENTATION PHASE

    Shape Feature Extraction-Using the i = rgb2gray matlab command RGB image is converted into gray scale image Different shape features(area, perimeter, major-axis length and minor-axis length) [11]are calculated for different fruits shape features calculated are shown in Table 4.1.[10]

    Table 4.1 Shape Features Calculated for Different Fruits

    Images

    Shape feature

    Apple

    Orange

    Banana

    Mango

    Pomegranate

    Area

    53035

    38059

    60593

    98729

    81640

    Perimeter

    10.2426

    806.222

    1403.5

    1328.2

    1487.68

    Major-axis length

    5.56553

    233.843

    549.187

    420.059

    328.759

    Minor-axis lenth

    2.53211

    208.356

    160.216

    304.27

    320.387

    Color Feature Extraction-After the images capturing and resized the RGB image of different fruits are converted into different color space like HSV,HIS, L×a×b ,YCbCr etc.with the help of MATLAB command. After the images wear converted in different color space mean and standard deviation is calculated for each color space and Sixteen color features are extracted as shown in Table 4.2[10,13]

    Table 4.2 Sixteen Color Feature Extracted for Five Fruit

    Images Color feature

    Apple

    Orange

    Banana

    Mango

    Pomegrana te

    Red mean

    0.16250

    0.06653

    0.049865

    0.0466

    0.042253

    9

    5

    77

    Red standard

    0.03662

    0.02340

    0.01427

    0.0202

    0.009642

    deviation

    5

    3

    03

    Blue mean

    0.13995

    0.11237

    0.188167

    0.2091

    0.20816

    6

    23

    Blue standard

    0.04244

    0.03702

    0.054137

    0.0898

    0.093184

    deviation

    5

    81

    Green mean

    0.12793

    0.01847

    0.027767

    0.0436

    0.084059

    4

    8

    64

    Green standard

    0.25891

    0.24488

    0.243238

    0.2311

    0.215012

    deviation

    1

    3

    06

    Hue mean

    0.13995

    0.11237

    0.188167

    0.2091

    0.20816

    6

    23

    Hue standard

    0.04244

    0.03702

    0.054137

    0.0898

    0.093184

    deviation

    5

    81

    Saturation

    0.09780

    0.14932

    0.11631

    0.1432

    0.109527

    mean

    1

    5

    17

    Saturation standard

    deviation

    0.09134

    6

    0.11235

    7

    0.094047

    0.1198

    76

    0.108023

    Cb mean

    0.01397

    0.02142

    0.036676

    0.0380

    0.017633

    4

    3

    23

    Cb standard

    0.49852

    0.49464

    0.491718

    0.4862

    0.494115

    deviation

    3

    7

    94

    Cr mean

    2.12973

    2.77117

    1.461737

    0.7511

    5.904745

    8

    5

    03

    Cr standard

    0.49970

    0.94829

    0.422866

    0.2054

    2.618134

    deviation

    4

    5

    75

    a* mean

    4.55713

    6.81226

    10.88757

    11.709

    5.971108

    5

    9

    79

    a* standard

    1.12550

    2.32685

    3.073394

    4.8828

    2.654861

    deviation

    8

    3

    13

    Texture features Extraction-In Texture features Extraction RGB image is converted into Gray scale image.By this

    image GLCM matrix is determined.[10,13] Using this

    Table 4.3 22 Texture features extracted for five fruits

    Images Texture feature

    Apple

    Orange

    Banana

    Mango

    Pomegranat e

    Energy

    2.0900

    2.4900

    5.0600

    3.3500

    2.5300

    Entropy

    0.0128

    0.0090

    0.0247

    0.0116

    0.0116

    Contrast

    0.9900

    0.9950

    0.9950

    0.9950

    0.9920

    Variance

    0.9900

    0.9950

    0.9950

    0.9950

    0.9920

    Correlation

    192.512

    1

    293.388

    6

    815.562

    8

    233.588

    7

    92.4434

    Homogeneit y

    19.1649

    30.3257

    81.2426

    30.5873

    14.2692

    Dissimilarit y

    0.0128

    0.0089

    0.0226

    0.0116

    0.0116

    Max. probability,

    0.8095

    0.8484

    0.7261

    0.7201

    0.7095

    Sum of squares

    0.5231

    0.4546

    0.7708

    0.7213

    0.7048

    Sum average

    0.9936

    0.9955

    0.9890

    0.9942

    0.9942

    Sum variance

    0.9936

    0.9955

    0.9889

    0.9942

    0.9942

    Sum entropy

    0.8983

    0.9206

    0.8503

    0.8460

    0.8383

    D V

    2.0600

    2.4513

    5.0223

    3.3067

    2.4991

    D E

    2.4300

    2.4992

    3.1990

    2.8721

    2.6741

    M CC

    6.1400

    7.9117

    16.0193

    9.8056

    6.9099

    IMC1

    0.5140

    0.4483

    0.7516

    0.7132

    0.6968

    IMC2

    0.0128

    0.0090

    0.0247

    0.0116

    0.0116

    I D

    0.0686

    0.0512

    0.1080

    0.0633

    0.0631

    I DN

    0.8894

    0.9085

    0.8756

    0.9199

    0.9159

    IDMN

    0.7532

    0.7290

    0.8360

    0.8410

    0.8340

    CS

    0.9986

    0.9990

    0.9975

    0.9987

    0.9987

    CP

    0.9998

    0.9999

    0.9996

    0.9998

    0.9998

  3. RESULT

    For the best classification of fruits.classification accuracy should be high.it is calculated by the equation .

    (Number of inputs given No of misclassified)

    GLCM matrix 22 texture features are extracted are shown in Table 4.3.

    Classification accuracy =

    Number of Inputs given

    × 100

    Graph 1,2,3,4 shows the result of classification of

    percentages accuracy on shape,color, texture and both color and texture. Graph 1 show the fruits are classified on the basis of shape. By graph it finds that only 72 % of apples are accurately classified. This occurs because most of the time shape of an apple resembles to the shape of Orange and pomegranate. This is the main drawback of shape basis classification. To overcome this drawback a new feature is used that is color. Graph 2 shows the classification percentage on color basis. As the classification accuracy is improved to 94% for apple because apple and orange have different color. But colour basis classification also faces problem when two fruits have same color. Many a times apple and pomegranate have same red color so this will affect the classification and only 84% of pomegranates are accurately classified[14,15]. Graph 3 show texture features is also included to perform the classification but it also does not improve the classification because most of the fruits have smooth surface. But the classification accuracy is efficiently improved when color and texture feature are amalgamated. Classification accuracy is improved for all fruits and 97.2 % pomegranates are accurately classified.

    SHAPE BASED CLASSIFICATION

    COLOR BASED CLASSIFICATION

    COLOR+TEXTURE BASED CLASSIFICATION

  4. CONCLUSION

    This paper proposes that when color and texture features are amalgamated, it gives better result over the all other previous method such as shape, color and texture. From the result we can find that shape based classification gives83.2% accuracy, Color basis gives 90%,Texture basis give 89.60%and results are improved to 97.2% when the color and texture features are amalgamated. Hence it can be concluded that color and texture together give better result

    OVERALL CONCLUDED

    CLASSIFICATION shape base

    TEXTURE BASED CLASSIFICATION

    100

    ACCURACY PERCENTAGE

    90

    80

    70

    60

    50

    40

    30

    20

    10

    0

    FRUITS

    classification

    color base classification

    texture base classification

    color and texture based classification

  5. ACKNOWLEDGMENT

The authors would like to acknowledgement to P.G. Coordinator, Faculty of Engineering Mewar University for his valuable suggestions & guides.

REFERENCES

  1. IndiaRankinAgriculturehttp://www.apeda.gov.in/apedawebsite/six_he ad_product/FFV.htm

  2. Kyaw, M.M., Ahmed, S.K., Sharrif, Z.A.M. Shape-based sorting of agricultural produce using support vector machines in a MATLAB/SIMULINK environmentIEEE: pp. 135-139, 2009

  3. Rao, P.S., Renganathan, S. New approaches for size determination of apple fruits for automatic sorting and grading Iranian Journal of Electrical and computer engineering, 1,2002.

  4. Riyadi, S., Rahni, A.A.A., Mustafa, M.M., Hussain, A. Shape characteristics analysis for papaya size classification IEEE: pp. 1-5, 2007

  5. Buzera, M., Groza, V., Prostean, G., Prostean, O. Techniques of analysing the colour of produces for automatic classification IEEE. pp. 209-214, 2008.

  6. Gonzalez, R.C., Woods, R.E., Eddins, S.L. Digital image processing using MATLAB Pearson Education India, 2004

  7. Feng, G., Qixin, C. Study on color image processing based intelligent fruit sorting system IEEE. pp. 4802-4805, 2004.

  8. Clausi, D.A. An analysis of co-occurrence texture statistics as a function of grey level quantization. Canadian Journal of remote sensing, 28(1): pp. 45-62, 2002

  9. Mustafa, N.B.A., Arumugam, K., Ahmed, S.K., Sharrif, Z.A.M. Classification of fruits using Probabilistic Neural Networks- Improvement using color feat ures IEEE: pp. 264-269, 2011.

  10. Jitarwal,Yashpal,Khan T.A,Mangal Pawan,An Enhanced Technique for Classification of Fruits using Shape Color andTexture Features,International Journals of Advanced Research in Computer Science and Software Engineering,ISSN: 2277-128X (Volume-7, Issue-7),pp.408-411, 2017.

  11. Mustafa, N.B.A., Fuad, N.A., Ahmed, S.K., Abidin, A.A.Z., Ali, Z., Yit, W.B., Sharrif, Z.A.M. Image processing of an agriculture produce: Determination of size and ripeness of a bananaIEEE: pp. 1- 7,2008

  12. P.Deepa, S.N.G. A Comparative Analysis of Feature Extraction Methods for Fruit Grading Classifications International Journal of Emerging Technologies in Computational and Applied Sciences, 138(13): pp. 221-225,2013.

  13. Gatica, G., Best, S., Ceroni, J., Lefranc, G. Olive Fruits Recognition Using Neural Networks Procedia Computer Science, 17,2013

  14. Sakhare, S.V., Nasre, V.G. Design of feature extraction in content based image retrieval (CBIR) using color and texture International Journal of Computer Science & Informatics, 1: pp. 57-61,2011

  15. Anami, B.S., Suvarna, S.N., Govardhan, A. A combined color, texture and edge features based approach for identification and classification of indian medicinal plants International Journal of Computer Applications, 6(12): pp. 45-51,2010.

Leave a Reply