Image Processing
A. Jahanbakhshi; K. Kheiralipour
Abstract
Introduction Carrot is one of the most important agricultural products used by millions of people all over the world. Quality assessment of agricultural products is one of the most important factors in improving the marketability of agricultural products. In the market, carrots with irregular shapes ...
Read More
Introduction Carrot is one of the most important agricultural products used by millions of people all over the world. Quality assessment of agricultural products is one of the most important factors in improving the marketability of agricultural products. In the market, carrots with irregular shapes are not commonly picked by customers due to their appearance. This causes to remain those carrots in the market for a long time and then decay. Therefore, adopting an appropriate method for sorting and packaging this product can increase its desirability in the market. Packaging and sorting of carrots by workers bring about many problems such as high cost, product waste, etc. Image processing systems are modern methods which have different applications in agriculture including sorting of different products. The aim of this study was to implement a machine vision system to classify carrot based on their shape using image processing. Materials and Methods In this study, 135 carrot samples with different shapes (56 regulars and 79 irregulars) were selected and their images were obtained through an imaging system. First, an expert divided the carrots into, two categories according to their shapes. The carrots which had irregular shape were those with double or triple roots, cracked carrots, curved carrots, damaged carrots, and broken ones and those with upright shapes were considered as regular shape carrot. After imaging, image processing was started by an algorithm programmed in Matlab R2012a medium. Then some shape features such as length, width, breadth, perimeter, elongation, compactness, roundness, area, eccentricity, centroid, centroid non-homogeneity, and width non-homogeneity were extracted. After the selection of efficient features, artificial neural networks and support vector machine were used to classify the efficient features. Results and Discussion The number of neurons in the hidden layers of artificial neural network models were varied to find the optimal model. The highest percentage of the correct classification rate (98.50%) belonged to the structure of 2-10-16, which in fact has 16 neurons in the input layer, 10 neurons in the hidden layer and 2 neurons in the output layer. This model has also the lowest mean squared error and the highest correlation coefficient of the test data, 0.90 and 2.52, respectively. This network was a feed forward back propagation error type and the activation functions in hidden and output layers were Tansig and Perlin, respectively. The correct classification rate of the support vector machine method was 89.62%. The confusion matrix of support vector machine method showed that out of 56 usual samples, 42 specimens were correctly identified but 14 samples were mistakenly classified as unusual carrots. All 79 carrots with unusual shapes were correctly classified. The results obtained from the comparison of the performance of the two methods, the neural network method has a good superiority than the support vector machine for classification. Conclusion In this research, the classification of carrots was based on its appearance. At first the physical characteristics and appearance attributes of the carrot samples were extracted and processed using image processing. Image analysis was included the classification of samples into two usual and unusual shapes, which to classify the extracted properties two methods were used: the artificial neural network (ANN) and support vector machine (SVM). The classification accuracy of the ANN method was higher than SVM. It can be said that the image processing method can be used to improve the traditional method for grading the carrot product in new ways. So, the marketability of the product will be increased, and thus its losses will be reduced. Also, the image processing technique can be used as a simple, fast and non-destructive alternative to other methods of extracting geometric properties of agricultural products. Finally, it can be stated that image processing method and machine vision are effective ways for improving the traditional sorting techniques for carrots.
S. M. Mir-ahmadi; S. A. Mireei; M. Sadeghi; A. Hemmat
Abstract
Introduction: Iran is one of the main producers of kiwifruit in the world. Unfortunately, the sorting and grading of the kiwifruits are manual, which is a time consuming and labor intensive task. Due to the lack of appropriate devices for sorting and grading of kiwifruit based on the quality parameters, ...
Read More
Introduction: Iran is one of the main producers of kiwifruit in the world. Unfortunately, the sorting and grading of the kiwifruits are manual, which is a time consuming and labor intensive task. Due to the lack of appropriate devices for sorting and grading of kiwifruit based on the quality parameters, only 10% of total production is exported (Mohammadian & Esehaghi Teymouri, 1999).
One of the main quality attribute for evaluating the kiwifruits is weight. Based on the standards, the minimum weight for an excellent kiwifruit is 90 g, while these values for the first and second classes should be 70 and 65 g, respectively (Abedini, 2003). Therefore, developing a device for fast weighing of fruits in the sorting lines can be useful in packaging, storage, exporting and distributing kiwifruit to the consumer markets.
In the past, the mechanical-based systems were commonly used for online weighing of the agricultural materials, but they did not lead to the promising accuracy and speed in sorting lines. Today, electrical instruments equipped with the precise load cells are substituted for fast weighing in the sorting lines. The dropping impact method, in which a free falling fruit drops on a load cell, is one of the suitable techniques for this purpose.
Different studies have addressed the application of dropping impact for fast weighing of agricultural materials (Rohrbach et al., 1982; Calpe et al., 2002; Gilman & Bailey, 2005; Stropek & Gołacki, 2007; Elbeltagi, 2011). The aim of this study reported here was to develop an on-line system for fast weighing of kiwifruit and compare the accuracy of different methods for extracting the weight predictive models.
Materials and Methods:
Sample selection: A total of 232 samples with the weight range of 40 to 120 g were selected. Before conducting the main experiments, the weight and dimensions of the sample were measured using a digital balance and caliper, with the precisions of 0.001 g and 0.01 mm, respectively.
Impact measuring system: The impact signals of kiwifruits in an online situation were acquired using a system, including conveying and ejecting unit, a load cell and data acquisition unit (Fig.1). The load cell was a single point load cell with 5 kg capacity. The load cell was connected to the data acquisition unit (Fig.2) in order to record the impact signal of the device in time domain of 0-5 s.
Before performing the main experiments, the load cell was calibrated using 100, 200, 500 and 1000 g standard masses. All the tests were carried out on three different forward speeds of conveyor, including 1, 1.5 and 2 m s-1 in order to obtain the optimum forward speed.
Data Analysis: In this study, two different methods were applied to build the weight predictive models. In the first method, the main components of the impact signal, including the force value at the first peak Fp, time required to peak force Dp, and the impulse or area under the first peak Ip were calculated and used as independent variables to develop the weight predictive models. In the second method, the impact components were calculated for the 40 successive peaks. Multiple linear regression (MLR) analyses were used to correlate the independent (impact components) and dependent (weight) variables.
Results and Discussion: The weight statistical characteristics of the samples, including the maximum, minimum, average, standard deviation and coefficient of variability in total data, calibration and test sets are shown in Table 1. As depicted, almost the same range and variability were observed for calibration and test data sets, indicating the proper distribution of the samples.
Table 2 summarizes the results of simple and multiple linear regressions for predicting the weight from the signal components (Fp, Dp, Ip) of the first peak at different speeds of 1, 1.5 and 2 m s-1. As shown, at the forward speeds of 1 and 2 m s-1, the multiple regression models based on all three signal components, and at forward speed of 1.5 m s-1, the model based on the combination of Fp and Ip, resulted to the best prediction powers. Among different forward speeds, the forward speed of 1 m s-1 gave the best model with SDR value of 2.180. Fig.4 depicted the predicted versus true values of weight obtained from the best linear regression models using components of Fp, Dp, Ip, Fp-Ip, and multiple of the first peak of impact signal.
The results of simple and multiple linear regression for predicting the weight from the signal components (Fp, Dp, Ip) of the first forty peaks at different speeds of 1, 1.5 and 2 m s-1 are summarized in Table 3. The best models were obtained by multiple combination of all three impact signals at the forward speed of 1 and 2 m s-1, and combination of Fpi-Ipi (i=1,...,40) at 1.5 m s-1 speed. Compared with the first peak results, the accuracy of prediction reached to 84%, 60% and 52% at forward speeds of 1, 1.5 and 2 m s-1, respectively. The best results were obtained at a forward speed of 2 m s-1, in which the SDR reached to a satisfactory value of 2.857 by applying the Ipi (i=1,...,40) values. The predicted versus true values of weight obtained from the best linear regression models using components of Fp, Dp, Ip, Fp-Ip, and multiple of the first forty peaks of impact signal are illustrated in Fig.5.
Conclusions: The results of this study revealed that among different impact component, Ip was the best predictor of the kiwifruits weight. Moreover, the developed models based on impact components of the first forty successive peaks gave the best accuracy with respect to the first peak components.