• Tidak ada hasil yang ditemukan

Providing an automatic Sorting system with low error percentage to Golden delicious apple helping image processing and ANFIS

N/A
N/A
Protected

Academic year: 2025

Membagikan "Providing an automatic Sorting system with low error percentage to Golden delicious apple helping image processing and ANFIS"

Copied!
10
0
0

Teks penuh

(1)

Providing an automatic Sorting system with low error percentage to Golden delicious apple helping image processing and ANFIS

Sajad. Sabzi 1, Juan Ignacio Arribas†2, Yousef Abbaspour-Gilandeh1, Javad Jannatkhah1

1Department of Biosystems Engineering, College of Agriculture, University of Mohaghegh Ardabili, Ardabil, Iran [email protected]

†2Department of Electrical Engineering, University of Valladolid, 47011 Valladolid, Spain, [email protected]

Abstract

In order to prevent damage to the fruit during transportation and help to fruit marketing, the fruits have to place in suitable package. There are several methods for sorting by weight such as the indirect, the mechanical and electrical methods. If data of fruit that are gotten using image processing are analysed by the suitable method, the indirect method has higher accuracy than other methods and is less expensive. In this study, 100 samples of Golden delicious apples were randomly selected from an orchard in Kermanshah – Iran (longitude: 7.03ºE; latitude: 4.22ºN). The algorithm that was developed in MATLAB was able to measure Area, Eccentricity, Perimeter, Length/Area, B_ave, G_ave, R_ave, Wide, contrast, texture, Wide/Area, Wide/Length, roughness, Length. In ANFIS model, samples were divided into two sets, with 70% for training set and 30% for testing set. In the best model for ANFIS and linear regression R2, SSE, MSE were 0.995, 119.42, 6.28 and 0.884, 14532.7, 151.38 respectively.

So it can be concluded that if the data analysis be done using ANFIS method, indirect sorting system can be launched with low error percentage.

Keywords: Sorting system, Mass modelling, Golden delicious apple, ANFIS.

Introduction

In order to classification of agricultural products based on its mass are used the direct methods and the indirect methods. The direct methods are divided into mechanically and electrically methods. The indirect method estimate the mass of the product based on image processing. The indirect method when effective that the data that is extracted with image processing is analysed using appropriate method. The appropriate have to lower error percentage for mass model. Some researchers provided studies on agricultural products, image processing and sorting of products.

Omid et al (2010) determined volume of citrus fruits such as lime, lemon, tangerine and orange. They used an image processing method for this work. Zheng et al (2010) developed an approach for the automatic sorting of jujube fruit based on chlorophyll fluorescence and C-SVM. Khojastehnazhand et al (2009) developed and tested machine vision and image processing for computing surface area and volume of axi- symmetrical agricultural products. Rashidi et al (2009) used water displacement and image processing methods to estimate volume Cantaloupe fruits. Koc et al (2007) conducted a study on watermelon fruits to determine its volume using image processing method. Khoshnam et al (2007) presented an equation to estimate the mass of pomegranates as a function of the small diameter. Tabatabaeefar et al (2005) determined volume and surface area of axi-symmetric agricultural products using image processing techniques. Moshou et al (2005)developed a mass-size correlation to predict volume of apple fruit. Moshou et al (2005) argued that with the newest sorting machines it is possible to separate apples according to size, colour and clearly visible blemishes such as scab, hail damage and older bruises, simply and solely based on imaging with color cameras. Kavdir et al (2004) worked on apple sorting using textural features. For this purpose, they compared artificial neural networks and statistical method. Mehl et al (2004) developed a hyperspectral imaging technique to detection of apple surface defects and contaminations. Brusnan et al (2004) argued that sorting according to size, color, shape and blemishes has recently been applied. They believed that in future will develop in the areas of machine vision and computer science. Sabliov et al (2004) proposed that image processing can be used to determine volume and surface area of axisymmetric

(2)

agricultural products. Aydin et al (2002) studied on terebinth fruits to get some physico-mechanic properties. Guyer et al (1996) developed a sorting system for automated sweet cherry using tissue reflectance and machine vision. The aim of this study is present an indirect method to sorting of Golden decision apple using image processing and helping ANFIS method and also comparison of ANFIS with SPSS statistical method.

2 Materials & Methods

Apple fruits (cv. Golden delicious) (Fig.1) were got from an orchard in Kermanshah - Iran (longitude:7.03°E; latitude:4.22°N). 100 sample were randomly selected. Its mass was measured by electronic balance with accuracy of ±0.01g [16].

2.1 Image processing

The image processing system consisted of an image acquisition system, a digital camera with USB connection (made in Germany) and a personal computer (PC) that is equipped with MATLAB (Version R2014a), and Microsoft excel (Version 2013) programs. The image acquisition system consisted of three type lamps Fluorescent, Tungsten, LED and has a Dimmer. Dimmer adjust the light intensity (Fig.2). The best image acquisition conditions and the best background were selected using a developed algorithm in MATLAB software.

Fig.1. Photograph of Golden delicious apple sample Fig.2. Chamber special image acquisition

(3)

2.2 Work algorithm

The images were taken in various conditions (distance of the position camera, type of lamp: LED, Tungsten and Fluorescent and different intensities of light). Then, images were converted to red, green and blue values to Histogram drawing. Peaks from left to right are about the maximum frequency count of colour pixels from apple and background, respectively. According to distance of apple and background pixel values, the red image was selected (Fig.3).The diameter, area, centre of mass, roughness, RGB, fruit texture and edge detection to get the best condition of photography were determined. The camera resolution was set on 352 × 288. Fluorescent lamp with light intensity of 320 lx was selected. The distance between the measurement table surface and the camera was set to 10cm. Canny and laplacian filter were used for Noise removal. Canny filter: by this method, Edges with local maximum gradient f(x, y) are diagnosed. Gradient is calculated using a derivative of Gaussian filter. In this method, two thresholds are used to identify strong and weak edges. Laplacian filter: In this method, after filtering f (x, y) by using a Gaussian filter, edges is diagnosed with find the passing of zero. In the second stage, image was captured from 100 samples and were extracted 14 parameter included: Area, Eccentricity, Perimeter, Length/Area, B_ave, G_ave, R_ave, Wide, contrast, texture, Wide/Area, Wide/Length, roughness, Length and then were transferred to Excel.

2.3 ANFIS

An ANFIS system is a fuzzy inference system whose parameters are trained by means of neural-network algorithms. The system can be viewed as a particular neural-network that is functionally equivalent to a fuzzy inference system. As long as the fuzzy system is represented as a neural-network, it is straight forward to train the system by means of any of the well-known neural-network learning algorithms. This training process adjusts the parameters of the network which in fact are the parameters of the fuzzy system, such as membership functions, strength of the rules, consequents, etc [17]. In this study, the ANFIS Toolbox in MATLAB is used and also m-file is used to programming. Important options that have been considered include: the type of input fuzzy sets - the number of fuzzy sets - the type of output fuzzy set - the type of optimization techniques and the number of epochs.

(4)

3 Results and discussion

Tables 1 and 2 shows seven different mass models of Golden delicious apples that getting by ANFIS and SPSS methods. These models were evaluated using three statistic parameters such as sum squared error (SSE), mean squared error (MSE) and coefficient of determination (R2). In the best model for ANFIS and SPSS R2, SSE, MSE were 0.995, 119.42, 6.28 and 0.884, 14532.7, 151.38 respectively. By comparing the statistical parameters of these two models, it is clear that the ANFIS has higher precision than SPSS.

Because the percentage of error obtained by the ANFIS model is low, so using of image processing and helping obtained ANFIS model an automatic Sorting System of mass with low error percentage can be launched (Fig.4).

Table1. Summary of properties from some ANFIS mass models for Golden delicious apple different types of inputs

No MF

input

MF number

MF output

input 1 Input2 Input3 R2 SSE MSE

1 trimf 3 3 3 constant Area Length Width 0.995 119.42 6.28

2 trimf 3 3 3 linear Length Width Perimeter 0.979 882.39 2241

3 dsigmf 3 3 3 constant Length Texture perimeter 0.956 1524.06 50.80 4 gbellmf 5 5 5 linear Texture contrast roughness 0.950 1973.49 65.78

5 gussmf 7 7 7 constant R G B 0.892 3261.77 148.26

6 pimf 3 3 3 constant eccentrisit perimeter Area 0.886 3955.05 131.83

7 dsigmf 3 3 3 constant Texture R contrast 0.789 4350.72 207.18

Table2. Summary of properties from some SPSS mass models for Golden delicious apple different types of inputs

No Input1 Input2 Input3 Regression equation 𝑅2 SSE MSE

1 Area Length Width M=0.436 A +0.071 L+ 0.003 W -50.18 0.884 14532.7 151.38 2 Length Width Perimeter M=0.9 L– 0. 63 W- 0.965 P – 121.52 0.688 45683.8 475.87 3 Length Texture Perimeter M=0.237 L - 0.002 T+ 0.497 P- 90.46 0.589 54313.54 565.77 4 Texture Contrast roughness M=389.54 T+ 1143.86 C+ 0.00 r- 209.64 0.856 17826.83 185.7

5 R G B M=5.15 R- 5.68 G +.065 B+ 268.48 0.512 54850.27 571.36

6 Eccentrisit Perimeter Area M=0.006 E – 0.073 P +16.37 A +17.144 0.707 42286.21 440.48 7 Texture R Contrast M=-6180.86 T +0.114 R +0.013 C +185.83 0.781 25576.39 256

A= Area, L= Length, W= Width, P= Perimeter, T= Texture, C= Contrast, r= roughness, E= Eccentrisit

(5)

Fig.4. A layout of sorting system

The sorting system that is shown in Fig. 4 has various components. 1 - Conveyer belt 2 - Camera 3 - PC 4 – main line 5 - three lines of sub. Their duties were products transfer, take an image of the product, the analysis of images taken from the production, transmission product to sub lines and products transfer according to the dimensions of them from main line to the package respectively. The images taken with a camera are analysed by algorithms that written in MATLAB and based on fruits are divided into three categories: small, medium and large groups. So, using three lanes 1, 2 and 3, corresponding to fruit size (small, medium and large) the fruits are sent to the packet machine. Fig.5 shows type inference system, number of inputs and output. It can be seen that type inference system is sugeno. This model has three inputs (Area, Length and Width) and one output (Mass).

Fig.5. Structure of inference system for Predicting mass of Golden delicious apple

The relation between training error and epochs is shown in fig.6. Error is decreased as epoch’s rises and finally levels off. Fig.7 shows the structure of ANFIS model with three input variables. By using of Fig.7 can be understood that this model has 27 rules and logical operations are done with and.

Fig.6. The relation between training error and the number of epochs in ANFIS

(6)

Fig.7. Schematic diagram of ANFIS model with three input variables

Fuzzy inference diagram is shown in fig.8. The numerical range for Width, Length, Area and mass were (134.5533-224.5538), (144.6374-245.4806), (1.5266-4.3063) ×104 and (106-146) respectively. If Width, Length, Area be 180, 195 and 29200 then mass will be 109.

Fig.8: Fuzzy inference diagram for mass modelling

There is initial membership function for each input in ANFIS. Types of initial membership functions are:

trimf, trapmf, gbellmf, gaussmf, gauss2mf, pimf, dsigmf, psigmf. Membership function map each member of the input set to the degree of membership which is a value between 0 and 1. Fig.9 shows initial membership function for three inputs.

Width Length Area Mass

(7)

Fig.9. Initial membership functions

Figs.10 and 11 depicts the variations in the values predicted by ANFIS networks against two inputs (a):

Width-Length, (b): Area-Length, (c): Width-Area. Fig.10(a) shows that The mass value rises with rising in Length up to 200 and widths between 130 up to 155 also widths between 170 up to 220 and Lengths between 140 up to 180. From fig.10 (b) it can be seen that the mass value rises with rising in Length. Fig.11 shows Mosaic mapping of Width, Area for mass modelling Golden delicious apple. The maximum mass is in the range of 140 up to 155 for Length.

(8)

Fig.10. Mosaic mapping of (a) Width, Length (b) Area, Length for mass modelling Golden delicious apple

(a)

(b)

(9)

Fig.11. Mosaic mapping of Width, Area for mass modelling Golden delicious apple

4 Conclusions

1- To base on the results of this study using image processing and ANFIS method can be designed an automatic sorting system for mass sorting of Golden delicious apple.

2- The advantage of this system compared with the mechanical and electrical systems are: 1- it is easier to recalibrate the machine for different size groups 2- The indirect method mass grader can reach a more accurate mass measurement 3- higher operating speeds are possible.

3- In the best model for ANFIS and SPSS R2, SSE, MSE were 0.995, 119.42, 6.28 and 0.884, 14532.7, 151.38 respectively.

References

Aydin, C. Ozcan, M. “Some physico-mechanic properties of terebinth (Pictacia terebinthus L.) fruits”, J Food Eng, 53, pp. 97–

101, (2002).

Aydın, C., Özcan, M.M. “Determination of nutritional and physical properties of myrtle (Myrtus communis L.) fruits growing wild in Turkey”, Journal of Food Engineering, 79, pp. 453-458, (2007).

Brosnan, T., Sun, D.W. “Improving quality inspection of food products by computer vision––a review”, Journal of Food Engineering, 61, pp. 3-16, (2004).

Echanobe, J., Campo, I.D., Bosque., G. “An adaptive neuro-fuzzy system for efficient implementations”, Information Sciences, 178, pp. 2150–2162, (2008).

Guyer, D. “Uthaisombut P and Stockman G, Tissue reflectance and machine vision for automated sweet cherry sorting. . In:

Proceedings of the SPIE”, optics in agriculture, forestry, and biological processing II, 2907, pp. 152–165, Boston, USA (1996).

Kavdir, I,. Guyer, D.E. “Comparison of artificial neural networks and statistical classifiers in apple sorting using textural features”, Biosystem Engineering 89 (3), pp. 331–344, (2004).

Khojastehnazhand, M,. Omid, M,. Tabatabaeefar, A. “Determination of orange volume and surface area using image processing technique”, Int Agrophysics, 23, pp. 237-224, (2009).

Khoshnam, F., Tabatabaeefar, A., Varnamkhasti, M.G., Borghei, A. “Mass modeling of pomegranate (Punica granatum L.) fruit with some physical characteristics”, Scientia Horticulturae, 114, pp. 21-26, (2007).

Koc, A. B. “Determination of Watermelon Volume Using Ellipsoid Approximation and Image Processing”, J Postharvest Biol Technol, 45, pp. 366-371, (2007).

Mehl, P. Chen, M., Kim, M.S. Chan, D.E. “Development of hyperspectral imaging technique for the detection of apple surface defects and contaminations”, Journal Food Engineering, 61, pp. 67–81, (2004).

(10)

Moshou, D., Wahlen, S., Strasser, R., Schenk, A., J.D. Baerdemaeker, H. Ramon. “Chlorophyll Fluorescence as a Tool for Online Quality Sorting of Apples”, Biosystems Engineering, 91 (2), pp. 163–172, (2005).

Omid, M., Khojastehnazhand, M., Tabatabaeefar, A. “Estimating volume and mass of citrus fruits by image processing technique”, Journal of Food Engineering, 100, pp. 315-321, (2010).

Rashidi, M., Gholami, M., Abbassi, S. “Cantaloupe Volume Determination through Image Processing”, J Agr Sci Tech, 11, pp.

623-631, (2009).

Sabliov, C.M., Boldor, D., Keener, K.M., Farkas. B.E. “Image Processing Method to Determine Surface Area and Volume of Axisymmetric Agricultural Products”, Int J Food Prop, 5, pp. 641-653, (2002).

Tabatabaeefar, A. Rajabipour, A. “Modeling the mass of apples by geometrical attributes”, Sci Hortic, 105, pp. 373–382, (2005).

Wang, T.Y., Nguang, S.K., “Low Cost Sensor for Volume and Surface Area Computation of Axisymmetric Agricultural Products”, J Food Eng, 79, pp. 870-877, (2007).

Zheng, H., Lu, H., Zheng, Y., Lou, H., Chen, H. “Automatic sorting of Chinese jujube (Zizyphus jujuba Mill. cv. ‘hongxing’) using chlorophyll fluorescence and support vector machine”, Journal of Food Engineering, 101, pp. 402–408, (2010).

Referensi

Dokumen terkait