Grading of Tomatoes into Different Classes Using Digital Image Processing

DOI : 10.17577/IJERTCONV3IS04054

Download Full-Text PDF Cite this Publication

Text Only Version

Grading of Tomatoes into Different Classes Using Digital Image Processing

Hasmath Naseera, Diana, R. Mahendran, G. Mary Amirtha Sagayee

Parisutham Institute of Technology and Science, Thanjavur

A. Santhakumaran

Indian Institute of Crop Processing Technology, Ministry of Food Processing Industries,

Government of India, Thanjavur

Abstract:- Grading of fruits into different sizes is one of the important steps in transporting, marketing as well as reduction of losses. Sizes are the most preferable measure in the market while purchasing fruits and it helps consumers to get a right value for right fruits based on their acceptance. Tomatoes have been considered for this study and digital image processing technology is used to measure the external features of the tomatoes. Using Walter Shewhart control charts technique, the tomatoes are sorted out as small, medium and large based on warning, specification and control limits respectively. Results shows that grading of tomatoes meets market flexibility of the consumers, increase the economic value of producers and ultimately leads to wastage reduction. Further the feasibility of digital image process based grading system is also physically verified. The combination of digital image processing and Walter Shewhart control provides a rapid, consistent and objective inspection technique, which can be expanded into many diverse food processing industries.

Keywords: Tomato, image, surface area, control chart, sorting, food image processing.

1. INTRODUCTION

The tomato is the edible, often red fruit/berry of the nightshade Solanum lycopersicum, commonly known as a tomato plant. The species originated in the South American Andes and its use as a food originated in Mexico, and spread throughout the world following the Spanish colonization of the Americas. Its many varieties are now widely grown, sometimes in greenhouses in cooler climates.

The tomato is consumed in diverse ways, including raw, as an ingredient in many dishes, sauces, salads, and drinks.

The fruit is rich in lycopene, which may

have beneficial health effects.The tomato belongs to the nightshade family, Solanaceae. The plants typically grow to 13 meters (310 ft) in height and have a weak stem that often sprawls over the ground and vines over other plants. It is a perennial in its native habitat, although often grown outdoors in temperate climates as an annual. An average common tomato weighs approximately 100 grams.

According to FAO, global tomato production amounted to

    1. million tonnes in 1961.

      The threshold of 50 million tonnes was reached in 1978, and 100 million tonnes in

      1999. Considering an annual growth rhythm of 3.5 %, global tomato production

      which can be roughly assimilated to global consumption amounted to 141 million

      tonnes in 2009. Finally it can be considered that total tomato consumption increased from 109 million

      tonnes in 1999 to 141 million tonnes in 2009.

      Digital image processing analysis and computer visions have exhibited an impressive growth in the past decade in term of theoretical and applications. The most popular analysis techniques that have been used for both recognition and classifications of two dimensional (2D) fruit images are colour-based and shape-based analysis methods. However, different fruit images may have similar or identical colour and shape values. Hence, using colour, size and shape features analysis methods are still not robust and effective enough to identify and distinguish fruits images

      1. MATERIALS AND METHODS:

        Tomatoes are classified into wide range across the world.The classification is based on the characteristic feature of tomato.Bangalore tomato is one among the varieties and widely used.Thirty fruits/samples were selected carefully from Bangalore variety of tomato after washing and cleaning.Individual fruits were numerically marked from one to thirty. Individual fruits weight were measured using digital weighing machine and the diameter have been determined.Dimensions of the fruit were taken manually using vernier calipers.

      2. CONTROL CHARTS FOR SORTING

        Usually companies use control charts as successful devices to study the pattern of variation in the units inspected. Here the use of control chart aid in sorting sizes of Tomato based on process shifts. They depends on sub groups of a fixed numbers (n) of data points. The process shifts are considered 2 and 3 for the satisfactory choice of sorting sizes of Tomato.

        For construction of control chart, 30samples of tomato have been taken.Control chart presents a graphic display of process stability or instability over time. As described by Chris Baumen et al., 2007, one more important reason for using control chart is to get the process stability, it is the state in which a process has displayed a certain degree of consistency in the past and is expected to continue to do so in the future. In quality control chart 2 and 3 limits were used to find the upper control limits (UCL) and lower control limits (LCL). They are

        UCL/LCL = mean ± 3( /n)

        2 limits of the quality control chart are known as specification limits. They are upper specification limit (USL) and lower specification limit (LSL).

        USL/LSL =

        mean ± 2( /n)

        Where n is the sub group sample size.

        The sorting of Tomato cultivars depends on the quality control chart performance measures. They are 3 limits and 2 limits and Tomato are sorted into three groups such as small, medium and large based on less than LSL, LSL to mean, mean to USL and more than USL respectively.

        A.Features Extraction

        MATLAB®7.7.0.47(R2008b) has been used as the platform for writing program in image processing, image analysis developing the algorithms and interfaces.Matlab® is a high level technical computing language and interactive environment for algorithm development,data visualization, data analysis and numeric computation.

        It provides Image processing tool box which extends the capability of MATLAB® environment for the solution of Image processing problems.

        1. RESULTS AND DISCUSSION

          IBM software SPSS version 20.0 was used for statistical sorting of the fruits. The results obtained from the statistical analysis shows that the tomato variety contains the minimum fruit weight of 48g and the maximum fruit weight of 134.57 g and the mean weight of the fruits are 82.409g. In the commercial point of view, in the market big fruits fetch more money. Thus,the work was concentrated on cirumfernce sorting. The small circumference of tomato variety is 17.3432 cm and the largest circumference of the fruit is 23.5987 cm and the mean circcufernce of the fruit is 20.3213cm.

          1. Program coding:

            1. clc;

            2. close all;

            3. clear all;

            4. % Read image

            5. image = imread('E:\matlab\18.02.15\1.jpg'

              )

            6. figure,

            7. imshow(image);

            8. title('Original image')

            9. % guassian filter

            10. filter=fspecial('gaussian');

            11. gray=imfilter(image,filter);

            12. figure,

            13. imshow(gray);

            14. title('Filtered gray image')

            15. % binary image

            16. T = graythresh(gray); 17 BW = im2bw(gray,T); 18 figure,

            1. imshow(BW);

            2. title('Binary image')

            3. % edge detection

            4. e=edge(BW,'sobel',[]);

            5. figure,

            6. imshow(e);

            7. title('Edge detected imge') 26 % cleaning of noise regions 27 mylabel = bwlabel(BW);

            1. tam = zeros(1,max(max(mylabel)));

            2. for (i = 1:max(max(mylabel)))

            3. tam(i) = size(find(mylabel==i),1);

            4. end

            5. mayort = max(max(tam));

            6. posic = find(tam==max(tam)); 34 BW(find(mylabel~=posic)) = 0; 35 BW1 = BW;

            1. figure,

            2. imshow(BW1);

            3. title('Denoised binary image');

            4. % Edges detection for denoised image

            5. e1=edge(BW1,'sobel',[]);

            6. figure,imshow(e1)

            7. title('Denoised Edge detected image');

            8. %size determination using circular method

            9. figure,imshow(e1)

            45

            1. imtool(e1);

            2. % circular method

            3. px1=input('enter the value of x1 pixel value=');

            4. py1=input('enter the value of y1 pixel value=');

            5. px2=input('enter the value of x2 pixel value=');

            6. py2=input('enter the value of y2 pixel value=');

            7. px3=input('enter the value of x3 pixel value=');

            8. py3=input('enter the value of y3 pixel value=');

            9. a=[px1 py1 1;px2 py2 1;px3 py3 1

              ];

            10. del=4*det(a);

            56 x4=px1^2+ py1^2;

            57 x5=px2^2+ py2^2;

            58 x6=px3^2+ py3^2;

            59 del1=-2*det([x4 py1 1;x5 py2 1;x6 py3 1 ]);

            60 del2=-2*det([px1 x4 1;px2 x5 1;px3 x6 1 ]);

            1. del3=-4*det([px1 py1 x4;px2 py2 x5;px3 py3 x6 ]);

            2. g=del1/del;

            3. f=del2/del;

            4. c=del3/del;

            65 pc=[-g ,-f]

            66 r=(sqrt(g^2+f^2-c))/100

            67 CIRCUMFERENCE=2*3.14*r

          2. Output

            s.no

            weight(g)

            Circumference (cm)

            1

            93.61

            19.8496

            2

            76.14

            19.8671

            3

            81.47

            20.6988

            4

            76.43

            19.942

            5

            61.48

            17.3432

            6

            78.21

            19.905

            7

            66.58

            18.6329

            8

            48

            17.7197

            9

            55.37

            17.915

            10

            81.18

            20.4221

            11

            53.1

            17.4577

            12

            95.77

            20.7578

            13

            134.57

            22.9736

            14

            84.66

            22.106

            15

            78.81

            19.6866

            16

            73.95

            20.4412

            17

            123.85

            22.3492

            18

            94.88

            21.7022

            19

            71.88

            19.133

            20

            71.95

            20.7912

            21

            90.41

            23.5987

            22

            111.84

            22.548

            23

            98.05

            22.0234

            24

            74.53

            18.2588

            25

            95.69

            21.5769

            26

            77.3

            20.4857

            27

            94.92

            21.7761

            28

            85.85

            21.3817

            29

            52.14

            18.1624

            30

            89.65

            20.1331

            s.no

            weight(g)

            Circumference (cm)

            1

            93.61

            19.8496

            2

            76.14

            19.8671

            3

            81.47

            20.6988

            4

            76.43

            19.942

            5

            61.48

            17.3432

            6

            78.21

            19.905

            7

            66.58

            18.6329

            8

            48

            17.7197

            9

            55.37

            17.915

            10

            81.18

            20.4221

            11

            53.1

            17.4577

            12

            95.77

            20.7578

            13

            134.57

            22.9736

            14

            84.66

            22.106

            15

            78.81

            19.6866

            16

            73.95

            20.4412

            17

            123.85

            22.3492

            18

            94.88

            21.7022

            19

            71.88

            19.133

            20

            71.95

            20.7912

            21

            90.41

            23.5987

            22

            111.84

            22.548

            23

            98.05

            22.0234

            24

            74.53

            18.2588

            25

            95.69

            21.5769

            26

            77.3

            20.4857

            27

            94.92

            21.7761

            28

            85.85

            21.3817

            29

            52.14

            18.1624

            30

            89.65

            20.1331

            TABLE 1 OITPUT VALUES

            Fig1. Output screen

            Fig 2. Output screen

            enter the value of x1 pixel value=974 enter the value of y1 pixel value=292 enter the value of x2 pixel value=1112 enter the value of y2 pixel value=770 enter the value of x3 pixel value=562 enter the value of y3 pixel value=702

            pc = 855.6585 585.0861

            r = 3.1608

            CIRCUMFERENCE = 19.8496

          3. TABULATION

            Manual classification is considered as a standard grade for the image processing of tomato fruits. Algorithm and the programme was developed using MATLAB and the captured images were run through the MATLAB software the circumference value obtained for different grades were mentioned.

          4. Flowchart

          The processing is shown in the following flow chart and the separation of tomato into different grades based on the circumference of the fruit was done through the MATLAB program.

          TABLE 1: PHYSICAL MEASURE FOR TOMATO BASED ON WEIGHT

          N

          Minimu m

          Maximu m

          Mean

          Std.

          Deviation

          Statistic

          Statistic

          Statistic

          Statistic

          Std. Error

          Statistic

          weight(g)

          30

          48.00

          134.57

          82.4090

          3.61059

          19.77601

          N

          Minimu m

          Maximu m

          Mean

          Std.

          Deviation

          Statistic

          Statistic

          Statistic

          Statistic

          Std. Error

          Statistic

          weight(g)

          30

          48.00

          134.57

          82.4090

          3.61059

          19.77601

          Image processing

          Read the image Filter the image

          \

          \

          Binary Image Edge detection

          Cleaning of the noise

          Edge detection of denoised image

          Size determination using circular method

          TABLE 2: PHYSICAL MEASURE FOR TOMATO BASED ON CIRCUMFERENCE

          N

          Minimu m

          Maximu m

          Mean

          Std.

          Deviation

          Statistic

          Statistic

          Statistic

          Statistic

          Std. Error

          Statistic

          Circumference (cm)

          30

          17.34

          23.60

          20.3213

          .31119

          1.70444

          Classify based on circumference

          Small

          <20.54

          Medium 20.54-20.94

          Small

          <20.54

          Medium 20.54-20.94

        2. STATISTICAL ANALYSIS:

          Using SPSS software the mean weight, maximum weight,minimum weight and standard deviation of the 30 tomatoes were tabulated in Table 1. Similarly the mean circumference,maximum circumference,minimum circumference and standard deviation of the 30 tomatoes were tabulated in Table2.

          Large

          >20.94

          Large

          >20.94

          Fig.1: Control chart for Tomato variety based on weight

          Fig.2: Control chart Tomato variety based on Cirumference

          Control chart was used to classify the fruits with the help of 3 level and obtained the upper control limit and lower control limit for Tomato variety for weight sorting that is

          122.5 and 86.01 respectively. Similarly for cirumference of tomato variety also calculated the upper control and lower control limits are 23.11and 20.54 respectively.Based on the obtained results, fruits were classified into three categories namely small, medium and large. The results are given below.

          Parameter

          Size

          Range

          Number of fruits

          Weight (gm)

          Small

          82.4-86.01

          19

          Medium

          86.02-89.62

          1

          Large

          >89.63

          10

          Circum-ference (cm)

          Small

          20.32-20.54

          17

          Medium

          20.55-20.94

          3

          Large

          >20.95

          10

          Parameter

          Size

          Range

          Number of fruits

          Weight (gm)

          Small

          82.4-86.01

          19

          Medium

          86.02-89.62

          1

          Large

          >89.63

          10

          Circum-ference (cm)

          Small

          20.32-20.54

          17

          Medium

          20.55-20.94

          3

          Large

          >20.95

          10

          TABLE 3: SORTING RESULTS OF TOMATO VARIETY

        3. CONCLUSION

The sorting of Tomato fruits based on weight and circumference into three groups were developed through statistical quality control chart. While getting the good results and to achieve the objective of sorting fruits, difference in various attributes of fruits has been found. Equivalence sorting of Tomato can be seen Table 3 using weight as well as circumference of the Tomato. This method of control charts can also apply for different fruits and can efficiently be used to develop sorting and grading machines.

ACKNOWLEDGEMENT

On the occasion of completion and submission of project we would like to express our deep sense of gratitude to HOD of ECE department Dr.G. Mary Amirtha Sagayee for providing us the Platform of Application of Electronics in Image Processing.We thank Prof.Arokia Magdaline, and other faculty members of ECE department for their moral support during the project.

We are too glad to give our special thanks to our project guide Er.Mahendran for providing us an opportunity to carryout project on food processing and also his help and tips whenever needed.Without his co-operation it was impossible to reach up to this stage.

REFERENCES

  1. Santhakumaran, G, Saguna Mary. Research Methodology. First Edition, Anuradha Publications, Kumbakonam, 2008.

  2. http://en.wikipedia.org/wiki/Tomato

Leave a Reply