2,721
Views
25
CrossRef citations to date
0
Altmetric
Original Articles

Modeling of volume and surface area of apple from their geometric characteristics and artificial neural network

, &
Pages 762-768 | Received 06 Jan 2016, Accepted 16 Apr 2016, Published online: 13 Oct 2016

ABSTRACT

Geometric parameters and physical properties of agricultural products are widely used in designing and manufacturing of harvesting devices. These features are highly useful for drying and sorting processes. This can lead to determine the major and minor diameters in this regard. As such, the current study applied machine vision, and image processing technology to identify the major and minor diameters of the Golden Delicious apple. Through applying apple diameters, the actual surface area and real volume of apples were measured by peeling method and water displacement method, respectively. Finally, mathematical modeling, and feed-forward artificial neural network allowed for estimation of the surface area and volume of Golden Delicious apple. The results revealed that the correlation coefficient (R2) of the mathematical model, for the volume and surface area were 0.9394 and 0.9291, respectively. In the neural network, R2-values for the volume and surface area in the most appropriate topology were 0.99991 and 0.99995, respectively. Moreover, study findings indicate that predicting the volume and surface area of fruit can be determined better using artificial neural network than using mathematical model. The proposed artificial neural network procedure applied in this study even minimized the complex calculations for estimating volume and surface area of fruit.

Introduction

In post-harvest processes, the physical properties of agricultural productions, such as volume, surface area, density, and mass, have wide applications. For instance, one of the critical factors in determining respiratory rate, evaluating color in separation, heating in heat transfer rate, cooling, and freezing processes is the surface area of fruits and vegetables. The other crucial element that plays a role in packaging design and storing agricultural products is the volume. Given the importance of evaluation process in fruit industry, hand evaluation is challenging, costly, and inefficient. To tackle this issue, machine vision-based image processing techniques have been extensively utilized. In 1960, a relatively new technological tool known as Computer Vision developed.[Citation1] Since 1970, the application of this technological tool has considerably increased in terms of theory and practice. The extant literature has witnessed over 1000 papers which emphasized various aspects of this technology including medical diagnostics, automated production, guidance robot, remote sensing, etc.[Citation2] It has been long known that image processing methods have possible applications in the food industry. Image processing methods and using them have benefitted the food industry immensely. This has allowed for the successful, objective, and non-destructive assessment of food products.[Citation3] To enhance the quality and efficiency of evaluating and sorting systems, using artificial neural networks (ANNs) with Computer Vision can be helpful. ANNs possess high learning ability, and competency in handling complex non-linear relationships between input and output of a system.[Citation4] One of the most frequently used ANN architecture is multi-layer perception (MLP) networks. The MLP has been generally used in agricultural and food products for sorting, grading, and forecasting to classify and estimate functions.[Citation5Citation7] A Machine Vision system was developed by Soltani et al.[Citation8] to anticipate egg volume. They validated the mathematical and ANN models. The model demonstrated a good performance of the two methods based on the validation results. For the mathematical model, the correlation coefficient (R2), mean absolute error (MAE), and maximum absolute error values were 0.99, 0.59, and 1.69cm3, respectively. Additionally, for the best feed-forward ANN, correlation coefficient (R2test), and test root mean square error (RMSEtest) were 0.66 and 0.992 cm3, respectively.[Citation8] To model the mass of cantaloupe varieties based on geometric properties, Seyedabadi et al.[Citation9] first measured fruit sizes. Then, they designed a regression model for cantaloupe mass and utilized a water displacement method to measure its actual volume. It was concluded that the relationship between the mass and measured volume of two varieties of cantaloupe was good with a high correlation coefficient of R2 = 0.986.[Citation9] Additionally, with the help of geometric features after physical estimation, Tabatabaeefar et al.[Citation10] developed a regression model for the apple mass that used small-, medium-, and large-sized diameter. Besides, Damavand apples possessed the highest ranking in terms of dimensions, mass, and volume among red apples while Semirom apples had the lowest values. It was also confirmed that mass and volume measurements had a good relationship in all types of apples with a correlation coefficient of R2 = 0.98.[Citation10] To evaluate mass and volume of citrus fruits with image processing technique, Omid et al.[Citation11] calculated product volume by dividing the image into some elliptical pieces. The test results indicated correlation volume R2-values of 0.962, 0.970, 0.985, and 0.959 for lemons, limes, oranges, and tangerines, respectively. It was also shown that there was a high association between volume and mass for different types of citrus fruits.[Citation11]

Furthermore, ANNs and linear discriminant analysis (LDA) methods were applied by Khazaei et al.[Citation12] to identify paddy seeds. They used seven varieties of paddy (Tarom Hashemi, Tarom Molaei, Fajr, Neda, Kados, Sahel, and Shiroudi) in their study. Based on the results obtained, applying ANN classifier led to a high level of prediction accuracy over 91.5%. This illuminates the higher predictive accuracy of ANN model than LDA method. According to the number of morphological features analyzed, the error values ranged from 1.5 to 32.0% in ANN analysis.[Citation12]

Joardder et al.[Citation13] conducted a study to investigate the impact of several cell wall properties including moisture distribution, stiffness, thickness, and cell dimension on porosity and shrinkage of dried products. Their study findings revealed that cell wall features were significantly related to heat and mass transfer characteristics. In addition, it was found that the nature of cell wall during convective drying plays a crucial role in evolution of porosity and shrinkage. Their study findings provided a better understanding about dried food porosity and shrinkage at microscopy (cell) level. It can also offer fresh insights on how to attain energy-effective drying processes and improve dried foods quality.[Citation13]

The current study estimated volume and surface of Golden Delicious apples varieties and considered them as the function of the major and minor diameters. This can be a useful approach to determine thermal properties and respiratory patterns, design warehouses, and springhouses of foodstuff, and optimize atmosphere settings. Specifically, this study aims to apply simple tools to determine an appropriate and efficient model for predicting the volume and product surface area.

Materials and methods

Sample preparation

The first step included preparing 100 Golden Delicious apples with different sizes from a local market of the City of Gorgan (a city located in north of Iran). Then, by placing the fruits in front of a CCD camera, attached to a base, the lateral view of the apples was photographed. The RGB image of apples was changed to binary and the background of image was isolated with edge detection in ImageJ software. This software has a ruler function which allowed us to convert images from pixels to inches. Therefore, by applying ImageJ software, we determined apples major and minor diameters in the images. . In the next step, a two-layer feed-forward network was developed in MATLAB R2012b (8.0.0.783) software and different topologies were examined. depicts a photograph of the apples.

Figure 1. Photography of Apple 1: Camera, CCD 2: Sample, 3: camera holding frame.

Figure 1. Photography of Apple 1: Camera, CCD 2: Sample, 3: camera holding frame.

Mathematical modeling size

After specifying the apples major and minor diameter sizes based on the photos taken, water displacement method was utilized to determine the actual volume of apples.[Citation14] Given the fact that the density of apples is less than water, apples were stuck in the base with a thin wire, and immersed in water. Weight of apples (M1) and the Beaker weight with the water inside (M2) were measured. Then, the Beaker, water (25°C), and apples weights were measured (M3) to determine apples volume according to Eq. (1).

Since apples do not have a regular and geometric shape, high-grade terms were required to create mathematical models. As such, polynomials of degree 4 and 5 were utilized for the coefficients a and b with the help of MATLAB R2012b (8.0.0.783) software.

Mathematical modeling of surface

For the purpose of simulating mathematical model, after specifying the length of major and minor diameters using ImageJ software, the fruits were peeled. This allowed for actual determination of surface area using grid paper. In the next step, data were transferred to MATLAB R2012b (8.0.0.783) software and the mathematical relationship between surface area and apples diameter was assessed.

ANNs

ANN is an approach adapted from biological neural networks. Indeed, ANN as a learning algorithm is able to predict the system outputs in exchange for specific inputs with adjusted weight and biases. In particular, the importance and value of information that reach neurons are determined by weights. The biases are numerical values that are added at a later stage. During the learning process, algorithm is predicted with increased error which results from the discrepancies between the target and output. Since it is a learning algorithm, it repeatedly attempts to modify and improve the weights and biases in order to offer the best output. It is worth noting that function approximation is considered as one of the most crucial applications of ANNs. Thus, this study through applying the major and minor diameters could estimate the volume, and surface area of apples. The normalization of data was first ensured using MATLAB R2012b (8.0.0.783) software. Then a two-layer feed-forward network was created so that the prepared data were entered into the network. illustrates a schematic representation of the created network.

Figure 2. A schematic design of an artificial neural network.

Figure 2. A schematic design of an artificial neural network.

Using MATLAB R2012b (8.0.0.783) software helped to create an ANN, and transfer functions, algorithms and different number of neurons used in the network. In this study, the two transfer functions of Tan-sigmoid and log-sigmoid were used. Their prevalent feature is calculating ex which can be estimated through various methods. Equations (2–4), respectively present the hyperbolic equation of ex, tan-sigmoid, and log-sigmoid transfer function.

Additionally, algorithms such as Conjugate gradient back propagation with Levenberg-Marquardt (LM), gradient descent back propagation (GD), and Fletcher-Reeves updates were applied. Calculated values of R2, RMSE, and MAE and their corresponding functions are illustrated in .

Table 1. Variation of MSEtest and R2 and mean absolute error for different configurations of the learning algorithms and transfer functions and neurons using ANN for volume approximation.

Results and Discussion

Mathematical Model of Volume

The mathematical model of volume was determined using MATLAB software and Eq. (5) presents this model. and Eq. (5) both depict the irregular and non-geometric relationship between the diameters and volume of apples. As shown in Eq. (5) and , due to the irregular geometric shape of apple, it is difficult to find a mathematical relationship between the length of major and minor diameters with the apple volume. Equation (5) is the “surface equation” in which “a” is of degree 5 and “b” is of degree 4. R2, RMSE, and SSE values in this equation are 0.9394, 9.91, and 982.1, respectively. demonstrates a schematic view of this surface.

Figure 3. Relationship between volume and diameters of the apple.

a: Major diameter and b: minor diameter.

Figure 3. Relationship between volume and diameters of the apple.a: Major diameter and b: minor diameter.

Mathematical Model of Surface

The relationship between large and small diameters with the apples surface area is shown in Eq. (6). In Eq. (6), “a” is the major diameter and “b” is the minor diameter and both are of degree 5. and Eq. (6) illustrate a non-geometric and irregular relationship between the apples surface and diameter. As such, predicting the apple surface area postulate area complex mathematical equation. In Eq. (6) the amount of R2, RMSE, and SSE are 0.9291, 6.528, and 383.5, respectively. depicts the schematic view of this surface.

Figure 4. Relationship between apple surface area and diameters. a: The major diameter and b: minor diameter.

Figure 4. Relationship between apple surface area and diameters. a: The major diameter and b: minor diameter.

Forecasting Volume with ANNs

As illustrated in , and topology (15) (2–15–2), the hyperbolic tangent sigmoid transfer function and the LM algorithm were utilized. This indicates 15 neurons had the highest accuracy and the R2, RMSEtest, and MAEtest values were 0.99995, 0.6959, and 0.5908, respectively. This topology very similar to topology (9)(2–10–2), is highly accurate. It can be concluded that to enhance the accuracy, it is suggested to simultaneously use this algorithm and the transfer function.

Forecasting surface with ANN

The topologies applied to predict apples surface based on the data obtained from images are shown in . Observation of the results reveals that the best performing topology is the topology (15) (2–15–2). This is evident from anticipating the best results including R2, RMSEtest, and MAEtest values of 0.99991, 0.6546, and 0.5537, respectively. Overall, the results confirm that this topology is very suitable for predicting apples volume and surface area.

Table 2. Variation of MSEtest and R2 and mean absolute error for different configurations of the learning algorithms and transfer functions and neurons using ANN for area approximation.

Conclusion

Since a trained neural network possesses a parallel processing structure, it is faster and more efficient than the regular mathematical models. Also, is does not require lengthy calculations for solving differential equations. Another benefit of neural network is its ability in concurrently predicting two or more variables. ANNs are highly powerful in analyzing large and complex data, while regression models and mathematical models use assumptions and constraints in their analysis. It is evident from the study results that complex and sometimes high-grade equations are needed for modeling volume and surface of agricultural products due to their irregular geometric shapes. As supported in this study, an appropriate feed-forward ANN combined with Machine Vision technology can be suitable to determine the surface area and volume of apple fruits. This can also be useful for designing warehouses and springhouses of foodstuffs in order to optimize atmosphere setting. Furthermore, the study findings confirmed the higher capability of ANN in predicting volume and surface area of fruit than mathematical models. It also reduced complicated mathematical calculations. As such, it is recommended this tool has high potential in estimating volume and surface area of apple.

References

  • Baxes, G.A. Digital Image Processing Principles and Applications; Willy: New York, NY 1994.
  • Sonka, M.; Hlavac, V.; Boyle, R. Image Processing, Analysis, and Machine Vision. Chapman and Hall Publishers: London - New York, 1993, 555 p.
  • Du, C.J.; Sun, D.W. Recent Developments in the Applications of Image Processing Techniques for Food Quality Evaluation. Trends in Food Science and Technology 2004, 15, 230–249.
  • Hashimoto, Y. Applications of Artificial Neural Networks and Genetic Algorithms to Agricultural System. Computers and Electronics in Agriculture 1997, 18(71), 72.
  • Omid, M.; Baharlooei, A.; Ahmadi, H. Modeling Drying Kinetics of Pistachio Nuts with Multilayer Feed-Forward Neural Network. Drying Technology 2009, 27, 1069–1077.
  • Omid, M.; Mahmoudi, A.; Omid, M.H. Development of Pistachio Sorting System Using PCA Assisted Artificial Neural Networks of Impact Acoustics. Expert Systems with Applications 2010, 37, 7205–7212.
  • Mollazade, K.; Omid, M.; Arefi, E. Comparing Datamining Classifiers for Grading Raisins Based on Visual Features. Computers and Electronics in Agriculture 2012, 84, 124–131.
  • Soltani, M.; Omid, M.; Alimardani, R. Egg Volume Prediction Using Machine Vision Technique Based on Pappus Theorem and Artificial Neural Network. Journal of Food Science Technology 2015, 52(5), 3065–3071.
  • Seyedabadi, E.; Khojastehpour, M.; Sadrnia, H.; Saiedirad, M.H. Mass Modeling of Cantaloupe Based on Geometric Attributes: A Case Study for Tile Magasi and Tile Shahri. Journal of Scientia Horticulturae 2011, 130, 54–59.
  • Tabatabaeefar, A.; Rajabipour, A. Modeling the Mass of Apples by Geometrical Attributes. Journal of Scientia Horticulturae 2005, 105, 373–382.
  • Omid, M.; Khojastehnazhand, M.; Tabatabaeefar, A. Estimating Volume and Mass of Citrus Fruits by Image Processing Technique. Journal of Food Engineering 2010, 100, 315–321.
  • Khazaei, J.; Golpour, I.; Ahmadi Moghaddam, P. Evaluation of Statistical and Neural Network Architectures for the Classification of Paddy Kernels Using Morphological Features. International Journal of Food Properties 2016, 19(6), 1227–1241.
  • Joardder, M.U.H.; Richard, J.B.; Kumar, C.; Karim, M.A. Effect of Cell Wall Properties on Porosity and Shrinkage of Dried Apple. International Journal of Food Properties 2015, 18(10), 2327–2337.
  • Mohsenin, N.N. Physical Properties of Plant and Animal Materials; Gordon and Breach Science Publishers: New York, NY, 1986; 498 p.

Reprints and Corporate Permissions

Please note: Selecting permissions does not provide access to the full text of the article, please see our help page How do I view content?

To request a reprint or corporate permissions for this article, please click on the relevant link below:

Academic Permissions

Please note: Selecting permissions does not provide access to the full text of the article, please see our help page How do I view content?

Obtain permissions instantly via Rightslink by clicking on the button below:

If you are unable to obtain permissions via Rightslink, please complete and submit this Permissions form. For more information, please visit our Permissions help page.