388
Views
0
CrossRef citations to date
0
Altmetric
Research Article

A geometric modelling approach to estimate apple fruit size by means of LiDAR 3D point clouds

, , &
Pages 566-583 | Received 07 Sep 2023, Accepted 09 Mar 2024, Published online: 09 Apr 2024

ABSTRACT

Remote sensing in agriculture aims to search new methods to monitor fruit at the tree, thus improving the estimation of yield-related variables. Light detection and range (LiDAR) scanning was introduced to obtain geometric and radiometric information from fruit surfaces by means of 3D point clouds. A geometric model to estimate apple size by means of segmented 3D point cloud of fruit is proposed in the present study. The model consists in the approximation of 3D point clouds to a reference shape given by 2D Fourier series expansion. Each point cloud was approximated to its reference shape using an iterative error minimization routine. The geometric model was applied to laboratory and field data of spheres and apples during fruit growth, ranging from 60 to 151 days after full bloom (DAFB). An overall RMSE between measured and predicted fruit radius of 20.1, 76.8, and 119.1% was found for the geometric model, mean, and maximum Euclidean distance approaches, respectively, including all studied growth periods in field conditions. Moreover, the linear regression on measured and predicted values showed considerably improved coefficient of determination (R2) of the geometric model in comparison to Euclidean distance calculations with R2 values of 0.76 and 0.49 for laboratory and field scanned apples, respectively. The data processing method enables fruit monitoring and their application of terrestrial LiDAR sensing in precise orchard management.

Introduction

Research in precision horticulture has been contributing in the pursuit of new strategies to build up resilience of food production to climate change. Particularly, the recent technological advances in the fields of robotics, optical sensing methods, and modeling capabilities for crop monitoring at the tree and in postharvest processes can provide tools to guide harvest and postharvest managers.[Citation1] Thereof, diverse methods for 3D spatially resolved fruit identification and size estimation had been studied, including RGB-D and thermal imaging, together with RGB-based structure from motion approaches.[Citation2–4] However, such imaging technologies are often influenced by environmental conditions such as lighting and temperature, in detriment of image quality, temporal availability, and prediction performance.[Citation5,Citation6] Additional complexity in the incorporation of such approaches is given by the mathematical processing time in analyzing large sets of data, making models time consuming for most commercial computational capabilities.

Among newly studied fruit recognition and analysis methods, light detection and ranging (LiDAR) has been proven reliable in the acquisition of geometric and radiometric information in orchards by means of 3D point clouds.[Citation7–9] By having its own light source, LiDAR systems are able to function in different instant and within canopy lighting conditions, adding flexibility of use considering the time of the day and feasibility in orchard applications. Crop managing-related variables such as soil variability, crop load, plant protection, and water needs had been studied by means of LiDAR technology.[Citation10,Citation11] Furthermore, mathematical transformation of point clouds was investigated for the identification of apple point clouds in canopies. Using a fruit segmentation algorithm based on geometric features of point clouds and return signal strength intensity, apples were segmented and distinguished from leaves, and woody parts in foliated and defoliated apples trees.[Citation12,Citation13] The thresholds to distinguish fruit and other tree parts were described in similar ranges depending of raw data[Citation3] or calibrated return signal strength intensity pre- and postharvest.[Citation13,Citation14] The feasibility of the method in comparison to RGB and RGB-D fruit segmentation approaches was pointed out.[Citation3,Citation15]

Despite the advances using 3D point clouds, fruit size estimation by means of LiDAR 3D point clouds remains a difficult task, mostly due to occlusion by other tree parts and varying geometric and radiometric attributes of specific horticultural produce. Typically scanned fruit data capture only a certain percentage of the produce surface, making it difficult to obtain a full apple geometry. Recent methods to estimate apple size consist in fitting a sphere of known size, or using an assumed complete fruit geometry as a template to which a given point cloud is fitted.[Citation13] The most common approach is to estimate apple size by means of the largest distance between points within a point cloud, namely largest segment approach, which consider the Euclidean distance between extremely located points within a fruit point cloud.[Citation15] However, such approach ignores the specific shape of fruit, which is subject to change during fruit growth.

The description of detailed fruit geometry for digital process simulation in the supply chain was studied for diverse horticultural produce.[Citation16] Among the most promising approaches to model shape of spherical produce is the Fourier series expansion, where shape features are modeled by means of a set of Fourier descriptors.[Citation17] First approaches on Fourier series considered the modeling of 2D contours of fruit and other spherical produce by converting 2D Cartesian contours to 1D polar functions – resembling a radial signal as a function of a phase angle.[Citation18] Additionally, variations of Fourier series expansion had been developed for the description of 2D contours using elliptical approaches.[Citation19] More recently, complex geometrical features have been described by incorporating a 2D Fourier series expansion, where the complete geometry of apples and pears was characterized as 2D surface in the spherical plane, thus aiding a dimensional reduction with enhanced mathematical and computational efficiency.[Citation20] Such approach appears promising in apple size estimation based on fruit 3D point clouds.

The objectives of this study were to develop and validate a geometric modeling approach to estimate apple size by means of LiDAR derived 3D point clouds. Thereof, an automated algorithm to approximate a segmented fruit point cloud to a reference shape geometry based on a Fourier series expansion is proposed. The efficiency of the proposed model was evaluated in terms of precision on apple size estimation and solving time. The proposed model was compared to standard Euclidean distance calculation.

Material and methods

Data acquisition and pre-processing

3D point cloud acquisition

All point clouds were obtained by means of a mobile 2D LiDAR sensor system (LMS-511, Sick AG, Waldkirch, Germany) emitting at wavelength of 905 nm with angular resolution of 0.1667° and 25 Hz scanning frequency. This sensor system captured geometric and radiometric information of the scanned environment. Point clouds were analyzed considering ideal (spheres) and complex (apples) spherical objects, each at laboratory and field conditions. For the monitoring in the laboratory, the LiDAR sensor was mounted on a rigid linear tooth belt conveyor of 2 m length (Module 115/42, IEF Werner, Germany) on an aluminum frame at 1.2 m height. The linear conveyor was adjusted to move the sensor horizontally at a speed of 20 mm s−1, with distance between LiDAR and object of 1.0 m (). Each point cloud was manually segmented using CloudCompare (2.10, GPL software, Paris, France) from the raw point cloud of the LiDAR scan ().

Figure 1. a) Experimental set-up for scanning apples in indoor conditions, b) Raw point cloud of scanned apples in indoor conditions.

Figure 1. a) Experimental set-up for scanning apples in indoor conditions, b) Raw point cloud of scanned apples in indoor conditions.

For the monitoring in field conditions, the measurements took place in the experimental apple orchard (Field Lab for Digital Agriculture) located in Potsdam-Marquardt, Germany, at the Leibniz Institute for Agricultural Engineering and Bioeconomy (ATB). The LiDAR sensor system was mounted on a circular conveyor that moves the sensors around a tree row (). The circular conveyor was made of a stainless-steel chain system with mechanical suspension according to the plant sensors configuration, and connected to an electrical engine with a working frequency of 50 Hz (DRN71, SEW Eurodrive, Germany). The moving speed was 10 mm s−1 and apparent distance between the LiDAR and the middle of trees row was 2.0 m.

As reference, the size of spheres and apples was measured manually by averaging the diameter at two perpendicular points along the equatorial length. This was done either in the laboratory or directly in the field with an electronic caliper (Type 1108, INSIZE, Suzhou, China).

Point cloud processing of LiDAR scan in laboratory conditions

The size estimation based on 3D point clouds was assessed in laboratory conditions providing same lighting conditions, temperature and relative humidity during the measurements. Ideal shaped spheres of 60 and 80 mm size (n = 3) were scanned individually. Additionally, apples were scanned at 60, 74, 90, 104, 132, and 151 days after full bloom (DAFB) (n = 10) ().

Figure 2. Randomly selected apple point cloud for each measuring date, recorded in the laboratory.

Figure 2. Randomly selected apple point cloud for each measuring date, recorded in the laboratory.

Point cloud processing of LiDAR scanning in field conditions

Twenty spheres of 60 and 80 mm size evenly distributed on a metallic frame were located within the tree rows in the experimental field. In addition to the spheres, trees were scanned on their right and left side. The effect of apple location in relation to the position of LiDAR sensor was assessed by studying apples grown at three tree heights with respect to the central moving line of the LiDAR sensor (). Apples were scanned consistently at five dates during fruit development: 67, 81, 117, 132 and 136 DAFB. As a result, 72 apples were measured, identified, and segmented for this study.

Figure 3. a) Field experimental sensor frame set-up, b) Outline of one tree with apples marked (red) and tree simulator with spheres of small (green) and large (orange) size. Heights of in-field scanned objects are marked.

Figure 3. a) Field experimental sensor frame set-up, b) Outline of one tree with apples marked (red) and tree simulator with spheres of small (green) and large (orange) size. Heights of in-field scanned objects are marked.

General description of geometric model

Each point cloud was expressed in the Cartesian space as Pxi,yi,zi. Thereof, the LiDAR sensor measures as it moves at constant speed in front to the scanned object – along the x direction – while it captures at each step a 2D slice of points of depth and height of the object in y and z direction, respectively (). For each point cloud P centered on the origin, a transformation into spherical coordinates was performed. Each point was thus described as a vector with an angular position in the spherical plane as Rθi,ϕi, where θ and ϕ are the angles of azimuth and elevation, respectively. The elevation angle ϕ starts either from the top of a sphere or stem in the case of apples to its calix, from ϕ=0 to ϕ=π, respectively. The angle of azimuth θ has a period of 2π, starting and ending at the back of the point cloud, thus locating the measured face of the objects in the middle of the spherical plane, where θ=π.

Figure 4. Diagram of an ideal sphere and its corresponding localization in Cartesian and spherical space in relation to the LiDAR position and measuring configuration.

Figure 4. Diagram of an ideal sphere and its corresponding localization in Cartesian and spherical space in relation to the LiDAR position and measuring configuration.

The concept of minimizing the error between the point cloud (R) and a reference shape (Rref) is given by a projection of the point cloud using spherical coordinates (Rfourier). Thereof, the direction in which each point cloud is projected is given by an Eigen analysis, in which a given eigenvector captures most of the object curvature given by its variance (maxney). However, typical LiDAR derived point clouds capture geometrical outliers due to reflected beams at curved edges at the objects surface. Moreover, the presence of outliers within the point cloud lowers the sphericity of the local centroid of the point cloud, thus obscuring the quality of the eigenvector ney, in detriment of an accurate approximation procedure.[Citation21] Therefore, an iterative Gaussian filter was applied on the initial point cloud in the spherical space (R) using the reference Fourier shape (Rfourier). By using an interquartile range approach, all points laying above the upper tail of the error of all points with respect to the Fourier reference shape were deleted.

Each point cloud was centered on the origin and the Gaussian filter performed again in order to look for newly detected outliers after centering, until no new outlier was detected. Subsequently, by applying an iterative step algorithm based on the direction of the eigenvector of the Fourier shape projection ney, a given point cloud is therefore approximated to its reference shape (Rref) – towards the space location where the error between the point cloud and its reference shape is minimum (Ropt) (). Finally, each approximated point cloud has an approximated radius with respect to its centroid, aiding fruit size estimation by means of a projected radius.

Figure 5. Flow diagram of the geometric model algorithm.

Figure 5. Flow diagram of the geometric model algorithm.

Fourier projection using spherical reference shape

Firstly, a 2D reference contour in Cartesian coordinates was estimated for each point cloud to obtain a reference 2D surface shape of the object in spherical coordinates. An ideal 3D point cloud of a sphere was generated in Blender (Blender Foundation, 2017), which represents the reference shape of spheres of 60 and 80 mm diameter in the present work. As for the apples, the 2D Cartesian contour for each point cloud in laboratory conditions was used as a reference to calculate an individual 2D Fourier reference shape (Rfourier) for each measuring date (DAFB). An Alphashape algorithm was used to obtain the outer contour of each point cloud,[Citation22] where an alpha value of 0.5 was arbitrary selected after image exploration (). All obtained edge contours were transformed to polar coordinates of the form Rϕ, where ϕ is the rotation angle with a period of 2π starting at the top of each point cloud ( and Equationequation 1). The approximation of Rϕ was performed using a 1D Fourier series expansion (Equationequation 1).

Figure 6. Fourier reference shape calculation of an example apple. a) 2D Cartesian reference point cloud, b) 1D Fourier series expansion of angular transformation of reference contour, and c) Interpolated 2D reference shape of this apple in spherical space.

Figure 6. Fourier reference shape calculation of an example apple. a) 2D Cartesian reference point cloud, b) 1D Fourier series expansion of angular transformation of reference contour, and c) Interpolated 2D reference shape of this apple in spherical space.

(1) Rϕ=A0+i=1kAkcoskϕ+Bksinkϕ(1)

where the Fourier coefficients A0, Ak, and Bk are characteristical of the size and shape of object as a 1D period within the 0 –2π range. As sin and cosine functions are orthogonal in the linear space, the Fourier coefficients were calculated (Equationequations 2Equation4). The resulting set of Fourier coefficients were obtained for the k number of harmonics of the Fourier expansion. For apples at all measuring dates, an arbitrary number of harmonics were used (k = 7) for all studied point clouds.

(2) A0=12π02πRϕ  (2)
(3) Ak=1π02πRϕ cos  (3)
(4) Bk=1π02πRϕ sin  (4)

As this contour line represents two lines within the spherical domain (at θ=π/2 and θ=3π/2) two segments of the 1D Fourier shape were obtained, for ϕ π and ϕ >π, respectively (). Additionally, an interpolation at θ=π and θ=0 was performed, allowing for a signature shape that is quasi-symmetric considering its reference contour. Finally, a linear interpolation algorithm was used to obtain a 2D reference shape of the form Rrefθ,ϕ ().

Typically, a Fourier series expansion is applied over a function that is continuous at the surface boundary. Any discontinuity is reflected in large signal peaks at the boundary, also known as Gibbs phenomena.[Citation23] Thus, the interpolated 2D surface must relate to the offset of a typical 1D Fourier series, rather to an individual 2D shape. Moreover, a given 2D Fourier surface is then described by a 1D (reference contour) and 2D (offset respect to the 1D contour) Fourier series. A 1D contour at θ=0 was used as reference for all studied point clouds. The offset shape was described as 2D Fourier series expansion (Equationequation 5).

(5) Rθ,ϕ=n=1m=1Cn,msinnπθ2πsinmπϕπ(5)

Similarly by orthogonality, the Fourier coefficients were calculated (Equationequation 6).

(6) Cn,m=42π20π20πRθ,ϕsinnπθ2πsinmπϕπdθdϕ(6)

Where Cn,m are the Fourier descriptors for the harmonics n and m. An arbitrary number of 10 harmonics were chosen for this analysis.

By having a Fourier signature shape (Rfourier) determined by a set of 1D and 2D Fourier coefficients within a continuous domain, a projection in the spherical space for each point cloud of spheres and apples was performed. The error associated to the reference Fourier projection was calculated (Equationequation 7).

(7) Errorref=Rcloudθi,ϕjRfourierθi,ϕj(7)

Thus, this error describes the difference between a point cloud and its own reference projection using 1D and 2D Fourier series expansion. Ultimately, such reference function serves as the spatial location, which an actual point cloud should fit. Furthermore, by minimizing this error function, an estimation of a reference ideal object in space can be somewhat mimicked, and the apple point clouds were approximated without losing the specific shape features at each measuring day during fruit development.

Eigen analysis and Fourier approximation algorithm

Once Rref was calculated, in order to approximate the individual point cloud, it is necessary to determine the direction onto which the point cloud shall be projected. Thereof, a singular value decomposition (SVD) algorithm was performed on the covariance tensor of the projection of each point cloud in the Cartesian space (Pfourier). As previously indicated (), the LiDAR sensor moves along the x direction, capturing at each step geometric information on the width and height (given by the z direction) of the scanned object. Thus, each point cloud was projected towards its depth, given by the eigenvector that contains the major absolute magnitude in the y axis, neyfourier (). Having a projected direction of approximation, each point cloud of fruit was translated towards its projected shape given by its Fourier series expansion.

Figure 7. Eigenvector neyfourier of the Fourier projection (blue) of a point cloud (grey) for a) random sphere of 80 mm size, and b) random apple at 151 DAFB.

Figure 7. Eigenvector neyfourier of the Fourier projection (blue) of a point cloud (grey) for a) random sphere of 80 mm size, and b) random apple at 151 DAFB.

An iterative error minimization algorithm was performed over the cloud projection, defined by a step function (Equationequation 8).

(8) Padj=P±neyfourierδ(8)

where at each step, a given point cloud P is approximated by a step coefficient δ into the direction given by neyfourier. At each iteration, the Fourier projection is recalculated, thus obtaining a new value of neyfourier, accounting for the previous iteration and new position of the point cloud in space (). Ultimately, the overall point cloud error reflected by the root mean squared error with respect to Rfourier (RMSEref) can thus be minimized. Moreover, when the iteration steps go beyond the minimum root found in the iteration, the RMSEref of point cloud would increase as the point cloud is translated beyond its reference shape ().

Figure 8. Diagram of a point cloud optimization results considering a randomly selected apple measured at 151 DAFB in the laboratory: a) RMSEref curve, b) initital point cloud underestimating the curvature, c) optimal point cloud, d) increased, over-estimating error as a result of projecting the point cloud beyond its reference Fourier shape. Three marked dots in a.) are related to point cloud appearance shown in b), c) and d).

Figure 8. Diagram of a point cloud optimization results considering a randomly selected apple measured at 151 DAFB in the laboratory: a) RMSEref curve, b) initital point cloud underestimating the curvature, c) optimal point cloud, d) increased, over-estimating error as a result of projecting the point cloud beyond its reference Fourier shape. Three marked dots in a.) are related to point cloud appearance shown in b), c) and d).

Model performance, comparison and validation

The computational efficiency of the model was assessed by comparing the processing time of the approximation algorithm for each processed point cloud considering the point cloud density. The model was entirely coded in Python (64-bit version 3.9.7) using a processor Intel(R) Core(TM) i3–2100 CPU @ 3.10 GHz with 8 GB RAM.

Each point cloud was evaluated by merits of its root mean square error compared to its reference Fourier shape (RMSEref) and the empirically measured object radius (RMSEexp). The RMSE of each point cloud to its reference 2D Fourier signature was calculated (Equationequation 9).

(9) RMSEref=i=1nRiRifourier2n(9)

where the radius of each point Ri (mm) is contrasted to its own projection using the Fourier shape signature Rifourier (mm) at the same location θ and ϕ, for all total amount of points of the point cloud (n). Considering the optimized point cloud, the assessment of the model performance considering the measured size of apple was performed by calculating an averaged radius of the projected apple using its 3D point cloud. For the laboratory scanned apples, the n points located within the boundary of ϕ=π/2 ±5% were considered for apple radius estimation. As for the field scanned apples, Ri (mm) of all points of the point clouds (n) were considered. The RMSEexp with respect to the measured apple radius was calculated (Equationequation 10).

(10) RMSEexp=i=1nRiRexp2n(10)

where the radius of all n points of the point cloud Ri (mm) and the manually recorded radius of the apple Rexp (mm) were considered. The shape of apple changed during fruit development and as the measuring dates in the laboratory and field readings were different, a spline interpolation algorithm was performed on all set of Fourier coefficients obtained from the laboratory data, and subsequently, the interpolated coefficients for each growing period studied in the field were estimated. Thereof, the geometric model was applied on collected field data using indoor obtained Fourier reference shapes. By using the indoor Fourier coefficients as reference shape, it was ensured to have close to real geometry of the scanned object, avoiding the presence of occlusions due to other tree parts or angular inclinations due to stem location in the tree structure.

Considering the field data, all fruit data are available open access already segmented as fruit point clouds. However, as a source of measuring uncertainty, the occlusion problem in the canopy can affect the quality of the segmented point clouds, where fragments of points belonging to curve-shaped leaves and branches can be included within the occluded apple, in detriment of the segmented point cloud and model performance. Therefore, a filter was applied to the population of segmented apple point clouds, where an Eigen decomposition of the covariance tensor was performed and their geometric features such as linearity (Ln) and curvature (C) were calculated.[Citation13,Citation24] Prior to filtering, all data of the geometric features from all measured growing periods were standardized by setting their mean value at zero and subsequently scaling to unit variance. Thus, point clouds that presented the conditions Ln<1 and C<1 were eliminated.

The geometric model performance was assessed by comparison to two standard 2D approaches; the mean and maximum Euclidean distances of each point cloud along the x and z axis – width and height, respectively. Moreover, the performance of each model was evaluated over the entire time series of apples after filtering, accounting for predicted and expected, measured values. The model comparison was performed by means of a linear regression between predicted and measured data – for both laboratory and field conditions. Values of coefficient of determination (R2), root mean squared error (RMSEexp) and mean bias error (MBEexp) were calculated for each model regression using the sklearn Python library.

Results and discussion

Computational performance

The model performance by means of computational efficiency was estimated for each analyzed point cloud (). The solving time to reach its minimum RMSEref was found to be directly linked to the density of each point cloud. Thereof, as the angular distance between the LiDAR and the scanned objects is minor in the laboratory conditions, the corresponding point clouds were consistently denser. As a consequence, larger solving times were found in the laboratory, ranging from 10 to >100 seconds. On the contrary, the objects scanned in the fields were solved at a considerably lesser time, ranging from 6·10−3 up to 6 seconds. At larger distance between the LiDAR and the scanned objects, the angular distance between the beams of the LiDAR increase, thus diminishing the point cloud density of the segmented object. Additionally, the occlusion by other tree parts diminished the scanned region in the case of apples. The decision on where to place the LiDAR in an integrated scanning system is thus directly linked to the speed of the solving algorithm. However, such decision must be considered with regard to the overall performance of the model with respect to the accuracy of size estimation of the horticultural produce.

Figure 9. Computational efficiency of the geometric algorithm for the scanned spheres in laboratory (n = 6) and field conditions (n = 20), and scanned apples in laboratory (n = 60) and field conditions (n = 283).

Figure 9. Computational efficiency of the geometric algorithm for the scanned spheres in laboratory (n = 6) and field conditions (n = 20), and scanned apples in laboratory (n = 60) and field conditions (n = 283).

Centroid approximation of LiDAR point clouds in laboratory conditions

The approximated optimal point clouds were calculated in Spherical and Cartesian coordinates (). Changes in the 2D surface shape of each point cloud before and after approximation were observed for all scanned spheres (), where each point approached to its reference shape at minimumRMSEref. Additionally, estimated scanned region of the spheres in the Cartesian space were identified (). Resulting average RMSEref values of 6.09 and 3.77 mm were found for the spheres of 60 and 80 mm, respectively. Minor overestimation of the approximated point clouds with respect to the Fourier shape of MBEref = 1.27 and 0.56 mm were obtained, respectively (). Moreover, the model showed to be sensible to potential undetected outliers, where each point within the point cloud is accounted for within the model, increasing its sensibility to error given by location in space. Thereof, areas of error beyond 15 mm were observed (), thus increasing the overall error. Additionally to the model performance, differences in relative RMSEexp up to 1.96 and 5.27% were found when comparing the geometric model to the mean and maximum Euclidean distance approaches, respectively.

Figure 10. Optimal point cloud of indoor-measured spheres of 60 (a-c) and 80 (d-f) mm in spherical coordinates. Point clouds before approximation are shown in grey, while error is given in false colour scale.

Figure 10. Optimal point cloud of indoor-measured spheres of 60 (a-c) and 80 (d-f) mm in spherical coordinates. Point clouds before approximation are shown in grey, while error is given in false colour scale.

Figure 11. Optimal point cloud of spheres of 60 (a-c) and 80 (d-f) mm in Cartesian coordinates, where error is provided in false colour scale.

Figure 11. Optimal point cloud of spheres of 60 (a-c) and 80 (d-f) mm in Cartesian coordinates, where error is provided in false colour scale.

Table 1. Averaged values of root mean squared error (RMSE) and mean bias error (MBE) of point clouds measured in laboratory conditions.

The overall performance of all size estimation approaches by means of their RMSEexp was found higher for the spheres of 60 mm, in comparison to the spheres of 80 mm size. Additionally, average values of MBEexp of 4.24 and 1.41 % were found for the spheres of 60 and 80 mm, respectively. The Euclidean distance methods showed a MBEexp up to 10.51 and 14.57 % for mean and maximum Euclidean distances, respectively. As the laser hits an object, it scatters its beams according to the optical and geometrical properties of the object – such as size – thus influencing the overall error magnitude and bias of the standard approaches. The sensor configuration used in this study showed a high uncertainty considering the depth data as well as along the scanning trajectory. Resulting variation of sensor speed and distance to objectives can lead to low-quality point cloud density, in detriment of accurate size estimation.[Citation12,Citation25]

The model performance and validation were benchmarked against mean and maximum Euclidean distance methods assessed for each measuring date during fruit growth of apples (). Values of RMSEref of the geometric model ranged from 7.33 to 4.22 mm for all studied time series of apples. Additionally, average MBEref values of −0.61 mm and RMSEref of 5.12 mm were found between the approximated point clouds compared to their Fourier reference shapes, assessing the accuracy of the geometric model approximation procedure during fruit development. Highest RMSEref values were observed at DAFB60. Largest source of error was generally located near the stem region of the apples, where an accurate estimation of a Fourier reference is difficult due to potential apple angle of inclination and resulting asymmetry in the hanged apples. Furthermore, as the Fourier reference shape is based on the outer 2D contour extraction, it does not account for the actual shape variability of the point cloud as the apple is rotated.

In comparison, the geometric model accuracy was higher than the Euclidian distances methods. Average RMSEexp values of 21.2, 29.8 and 43.9 % were obtained for the geometric model, and the mean and maximum Euclidean distance, respectively when predicting the size of apples. Overall, all approaches had their lowest performance at the earliest measured growing stage (DAFB60), due to a high point cloud density of scattered beams, affecting the model accuracy on small objects – shown also in the RMSEref values of the 60 mm spheres (). However, in these conditions the Fourier-based approach showed tremendously lower errors, being able to account for the shape of the fruit at different growing periods (). Similar approaches for apple size estimation in laboratory conditions were observed earlier,[Citation3] where RMSE values of 2.47 and 2.74 mm were found when fitting a sphere of known size and a reconstructed apple shape template using structure from motion approach (SfM), respectively.

Figure 12. Averaged reference Fourier shapes for all monitored dates during fruit development, a) 1D Fourier shape in Cartesian coordinates, b) Interpolated 2D Fourier reference shape in spherical coordinates.

Figure 12. Averaged reference Fourier shapes for all monitored dates during fruit development, a) 1D Fourier shape in Cartesian coordinates, b) Interpolated 2D Fourier reference shape in spherical coordinates.

Centroid approximation of LiDAR point clouds in field conditions

The interpolation of previously obtained Fourier coefficients successfully aided the geometric model computation on field obtained data, as indicated by their RMSEref, for all measuring dates during fruit development (). Additionally, the error of each point cloud with respect to its Fourier reference shape before and after approximation was assessed for all studied fruit growth stages and vertical locations within the tree canopy (). Average RMSEref of 6.43, 6.35 and 7.41 mm were found for the apples located within the regions ΔH1, ΔH2 and ΔH3, respectively for all the measured dates during fruit development. Higher average values of RMSEref were found at DAFB67, in comparison with the rest of the monitored growing stages. All other measured dates after DAFB67 showed increased error at enhanced angular distance between the LiDAR and the location of the apples (ΔH1 and ΔH3). Moreover, at these locations the appearance of outliers notably increased in comparison with the apples located at ΔH2. Additionally, values of MBEref decreased from minor over estimation to under estimation between DAFB67 and DAFB136. Similarly, previous work on apple size estimation found the largest RMSE values ranging from 7.7 to 14.5 % at the most distant locations considering the LiDAR position in defoliated trees, where point clouds appear less dense due to the angular beam trajectory.[Citation13]

Figure 13. Performance of model approximation and error associated to the Euclidean distance calculation capturing all fruit from three canopy heights with respect to the LiDAR. Boxplots represent the point clouds before (red) and after approximation (blue). Maximum (green) and mean (blue) Euclidean distance calculations are represented by scattered points for: a) metal tree with spheres, b) 67 DAFB, c) 81 DAFB, d) 117 DAFB, e) 132 DAFB, and f) 136 DAFB.

Figure 13. Performance of model approximation and error associated to the Euclidean distance calculation capturing all fruit from three canopy heights with respect to the LiDAR. Boxplots represent the point clouds before (red) and after approximation (blue). Maximum (green) and mean (blue) Euclidean distance calculations are represented by scattered points for: a) metal tree with spheres, b) 67 DAFB, c) 81 DAFB, d) 117 DAFB, e) 132 DAFB, and f) 136 DAFB.

Table 2. Averaged reference values of root mean squared error (RMSEref), mean bias error (MBEref) and number of samples (n) at all vertical locations within scanned trees.

The geometric model validation and comparison on field collected data were calculated for the metal tree and for each time series separately (). For the metal tree, differences up to 2.97 % in RMSEexp were found between all the studied approaches. Furthermore, the geometric model presented considerable minor values of MBEexp, in comparison with the standard Euclidean distance approaches. Additionally, the spheres mounted on the metal tree showed minor error in comparison to the apples. The known size of spheres, the uniform spherical shape and the absence of leaves increased the overall accuracy of the geometric model, compared to the apples with more complex shapes and occurrence of occlusion within the canopy, affecting the capture of geometric features by the LiDAR sensor. Thereof,[Citation3] obtained coefficients of determination up to 0.81, 0.91 and 0.95 for apples with visibility > 20, > 40 and > 70 %, respectively using a RGB-D camera.

Table 3. Field application of the geometrical model and comparison by means of RMSEexp (%) and MBEexp (%) for spheres (n = 20) and apple measuring dates (n = 283).

For the apples monitored at different dates during fruit development, the geometric model performed consistently better than the Euclidean distance methods. Average RMSEexp values of 20.1, 76.8 and 119.1 % were found for the model, the mean and maximum Euclidean distances, respectively. Similarly, averaged MBEexp values of 19.3, 47.9 and 98.4 % were found for the model, the mean and maximum Euclidean distances, respectively. Additionally, RMSEexp and MBEexp of 33.2 and 33.0 % were found at DAFB67, respectively for the geometric model. Generally, large errors were reported using the mean and maximum Euclidean distances approach, where both RMSEexp and MBEexp values surpassed the 100 % at various growing stages (). Given that these methods are based on distances between extreme points in a reference plane, the potential occlusion of the apples – which is typically the case in field conditions – affected the size prediction. Thereof, the geometric model uses previously obtained Fourier coefficients, which partially accounts for the occlusion problem by giving a more accurate reference shape in which the point clouds are projected. However, the error of the geometric model increased at the earliest monitored date, where occluded apples are hard to approximate due to a more complex shape towards the stem of the produce (). On the other hand,[Citation2] achieved coefficients of determination from 0.68 to 0.70 using thermal imaging, and[Citation26] obtained coefficient of determination of 0.95 using RGB-D imaging. However, these are limited to specific temperature and lighting conditions, as well as being typically a 2D approach, neglecting any in depth shape features.

Time series regression and model performance

Overall, all approaches performed considerably better for laboratory scanned data, in comparison to the field obtained data (). The geometric model presented a better coefficient of determination for both laboratory and field conditions, in comparison to the Euclidean distance approaches (). However, the performance of the model in field conditions, given by its coefficient of determination reached only 0.49. The occlusion of the scanned apples due to the presence of leaves affected the model performance. Additionally, poor point cloud density is an indicator of scarcely visible regions where curvature is not entirely captured. Moreover, the linear behavior of all the studied approaches was indicated by the overall lower values of MBE (<11014 mm).

Figure 14. Linear regression between calculated and measured data for all growing periods and for all the studied models for: a) Laboratory and b) Field collected data.

Figure 14. Linear regression between calculated and measured data for all growing periods and for all the studied models for: a) Laboratory and b) Field collected data.

Table 4. Goodness of fit comparison between studied approaches using a linear regression for laboratory and field data.

Differences up to 77.9 and 97.1 mm on RMSE between the geometric model and the Euclidean distances approach were found for laboratory and field conditions, respectively. The Euclidean distance methods showed consistently lower performance respect to other proposed models that do not consider largest segments approaches. Similarly, mean absolute percentage error of 23.6 % was found in previous study[Citation3] when comparing a large segment method – Euclidean-like approach, showing the typically poor performance of such methods in comparison to some more complex direct models.

Future work for the robust application of the approach presented, would be the development of a database for increasing the number of indoor scanned fruit. A larger amount of Fourier coefficients should accumulate different fruit populations at different growing season, capturing fruit shape variability in real-world scenario. In field conditions, more work on data quality should capture various sensors as well as oriented measurements using mobile platform such as short distance linear conveyors for tree scanning.

Conclusion

A geometric modeling approach to predict apple size by means of LiDAR 3D point clouds was developed in python environment. The proposed model presented solving times up to 5.9 and 0.7 seconds for scanned spheres and apples in field conditions, respectively. The applicability of the geometric model in laboratory and field conditions was assessed for scanned spheres of known size and apples at different growing stages during fruit development. Averaged RMSEexp of 21.2, 30.0 and 43.9 % were found for the geometric model, mean, and maximum Euclidean distances, respectively. Additionally, the geometric model approximation algorithm performed on 283 segmented apples and 20 spheres in field conditions. Averaged RMSEexp of 15.1 and 20.1 % was found for the scanned spheres and apples, respectively. The large error difference between the spheres and the apples was found due to the large presence of occluded apples, which affected the geometric model performance. Moreover, RMSEexp of 20.1, 76.8 and 119.1 % were obtained for the geometric model, the mean and maximum Euclidean distance approaches, respectively. Finally, a linear regression between predicted and measured apple radius showed R2 values of 0.76 and 0.49 for the laboratory and field scanned apples, respectively. Overall, the model performed better than the Euclidean distance approach, where R2 values of 0.49, 0.2·10−2 and 0.1·10−2 were found for the geometric model, mean and maximum Euclidean distance methods.

Disclosure statement

No potential conflict of interest was reported by the author(s).

Additional information

Funding

The work was supported by the Bangladesh Agricultural Research Institute Bundesministerium für Ernährung und Landwirtschaft. The project SHEET is part of the ERA-NET Cofund ICT-AGRI-FOOD, with funding provided by national sources [BLE] and co-funding by the European Union Horizon 2020 research and innovation program, Grant Agreement number 862665.

Unknown widget #5d0ef076-e0a7-421c-8315-2b007028953f

of type scholix-links

References

  • Zude-Sasse, M.; Fountas, S.; Gemtos, T. A.; Abu-Khalaf, N. 2016. ‘Applications of Precision Agriculture in Horticultural Crops’, Europ. J. hortic. sci, 81: 78–90. DOI: 10.17660/eJHS.2016/81.2.2
  • Stajnko, D.; Lakota, M.; Hočevar, M. Estimation of Number and Diameter of Apple Fruits in an Orchard During the Growing Season by Thermal Imaging. Comput. Electron. Agric. 2004, 42(1), 31–42. DOI: 10.1016/S0168-1699(03)00086-3.
  • Jordi, G.-M.; Sanz-Cortiella, R.; Rosell-Polo, J. R.; Escolà, A.; Gregorio, E. 2021. ‘In-field Apple Size Estimation Using Photogrammetry-derived 3D Point Clouds: Comparison of 4 Different Methods Considering Fruit Occlusions’, Comput. Electron. Agric., 188: 106343. DOI: 10.1016/j.compag.2021.106343
  • Ge, Y.; Xiong, Y.; From, P. J. 2020. ‘Symmetry-Based 3D Shape Completion for Fruit Localisation for Harvesting Robots’, Biosyst. Eng., 197: 188–202. DOI: 10.1016/j.biosystemseng.2020.07.003
  • Fu, L.; Gao, F.; Wu, J.; Li, R.; Karkee, M.; Zhang, Q. Application of Consumer RGB-D Cameras for Fruit Detection and Localization in Field: A Critical Review. Comput. Electron. Agric. 2020, 177, 105687. DOI: 10.1016/j.compag.2020.105687.
  • Gongal, A.; Amatya, S.; Karkee, M.; Zhang, Q.; Lewis, K. Sensors and Systems for Fruit Detection and Localization: A Review. Comput. Electron. Agric. 2015, 116, 8–19. DOI: 10.1016/j.compag.2015.05.021.
  • Escolà, A.; Martínez-Casasnovas, J. A.; Rufat, J.; Arnó, J.; Arbonés, A.; Sebé, F.; Pascual, M.; Gregorio, E.; Rosell-Polo, J. R. Mobile Terrestrial Laser Scanner Applications in Precision Fruticulture/Horticulture and Tools to Extract Information from Canopy Point Clouds. Precis. Agric. 2017, 18(1), 111–32. DOI: 10.1007/s11119-016-9474-5.
  • Pforte, F.; Selbeck, J.; Hensel, O. Comparison of Two Different Measurement Techniques for Automated Determination of Plum Tree Canopy Cover. Biosyst. Eng. 2012, 113(4), 325–33. DOI: 10.1016/j.biosystemseng.2012.09.014.
  • Colaço, A. F.; Molin, J. P.; Rosell-Polo, J. R.; Escolà, A. Application of Light Detection and Ranging and Ultrasonic Sensors to High-Throughput Phenotyping and Precision Horticulture: Current Status and Challenges. Hortic. Res. 2018, 5(1). DOI: 10.1038/s41438-018-0043-0.
  • Penzel, M.; Herppich, W. B.; Weltzien, C.; Tsoulias, N.; Zude-Sasse, M. 2021. Modeling of Individual Fruit-Bearing Capacity of Trees Is Aimed at Optimizing Fruit Quality of Malus X Domestica Borkh. ‘Gala’. Front Plant Sci., 12. DOI: 10.3389/fpls.2021.669909
  • Walklate, P. J.; Cross, J. V.; Richardson, G. M.; Murray, R. A.; Baker, D. E. IT—Information Technology and the Human Interface: Comparison of Different Spray Volume Deposition Models Using LIDAR Measurements of Apple Orchards. Biosyst. Eng. 2002, 82(3), 253–67. DOI: 10.1006/bioe.2002.0082.
  • Jordi, G.-M.; Llorens, J.; Rosell-Polo, J. R.; Gregorio, E.; Arnó, J.; Solanelles, F.; Martínez-Casasnovas, J. A.; Escolà, A. 2020. ‘Assessing the Performance of RGB-D Sensors for 3D Fruit Crop Canopy Characterization Under Different Operating and Lighting Conditions’, Sensors, 20: 7072. DOI: 10.3390/s20247072
  • Tsoulias, N.; Paraforos, D. S.; Xanthopoulos, G.; Zude-Sasse, M. Apple Shape Detection Based on Geometric and Radiometric Features Using a LiDAR Laser Scanner. Remote Sens. 2020, 12(15), 2481. DOI: 10.3390/rs12152481.
  • Saha, K. K.; Zude-Sasse, M. ‘Estimation of Chlorophyll Content in Banana During Shelf Life Using LiDAR Laser Scanner’. Postharvest. Biol. Technol. 2022. 192, 112011. DOI: 10.1016/j.postharvbio.2022.112011
  • Miranda, J. C.; Gené-Mola, J.; Zude-Sasse, M.; Tsoulias, N.; Escolà Agustí, A.; Arnó Satorra, J.; Rosell Polo, J. R.; Sanz Cortiella, R.; Martínez-Casasnovas, J. A.; Gregorio López, E. ‘Fruit Counting and Sizing Using AI: A Review of Methods and Challenges’. Postharvest Biology And Technology, In Press 2023. 206 112587 DOI: 10.1016/j.postharvbio.2023.112587
  • Danckaers, F.; Huysmans, T.; Van Dael, M.; Verboven, P.; Nicolaï, B.; Sijbers, J. Building 3D Statistical Shape Models of Horticultural Products. Food Bioprocess. Technol. 2017, 10(11), 2100–12. DOI: 10.1007/s11947-017-1979-z.
  • Mebatsion, H. K.; Boudon, F.; Godin, C.; Pradal, C.; Génard, M.; Goz-Bac, C.; Bertin, N. 2011. ‘A Novel Profile Based Model for Virtual Representation of Quasi-Symmetric Plant Organs’, Comput. Electron. Agric., 75: 113–124. DOI: 10.1016/j.compag.2010.10.006
  • Ehrlich, R.; Weinberg, B. 1970. ‘An Exact Method for Characterization of Grain Shape’, Sepm Jsr, 40: 205–212. DOI: 10.1306/74D71F1E-2B21-11D7-8648000102C1865D
  • Kuhl, F. P.; Giardina, C. R. Elliptic Fourier Features of a Closed Contour. Computer Graphics And Image Processing. 1982, 18(3), 236–58. DOI: 10.1016/0146-664X(82)90034-X.
  • Seppe, R.; Defraeye, T.; Herremans, E.; Verboven, P.; Nicolaï, B. M. 2015. ‘A 3D Contour Based Geometrical Model Generator for Complex-Shaped Horticultural Products’, J. Food Eng., 157: 24–32. DOI: 10.1016/j.jfoodeng.2015.02.006
  • Lin, C.-H.; Chen, J.-Y.; Su, P.-L.; Chen, C.-H. Eigen-Feature Analysis of Weighted Covariance Matrices for LiDAR Point Cloud Classification. Isprs Journal Of Photogrammetry And Remote Sensing. 2014, 94, 70–79. DOI: 10.1016/j.isprsjprs.2014.04.016.
  • Edelsbrunner, H.; Kirkpatrick, D.; Seidel, R. 1983. ‘On the Shape of a Set of Points in the Plane’, IEEE Trans. Inform. Theory, 29: 551–559. DOI: 10.1109/TIT.1983.1056714
  • Brunton, S. L.; Nathan Kutz, J. 2019. Data-Driven Science and Engineering: Machine Learning, Dynamical Systems, and Control (Cambridge University Press: Cambridge).
  • Zude-Sasse, M.; Regen, C.; Jörissen, S.; Bignardi, M.; Tsoulias, N. 2024. 3D Point Clouds of Trees and Apple Fruit Annotated with Thermal Data [Data set]. ZENODO 10792723. DOI: 10.5281/zenodo.10792723
  • Siefen, N.; McCormick, R. J.; Vogel, A. M.; Biegert, K. Effects of Laser Scanner Quality and Tractor Speed to Characterise Apple Tree Canopies. Smart Agricultural Technology. 2023, 4, 100173. DOI: 10.1016/j.atech.2023.100173.
  • Zhenglin, W.; Walsh, K. B.; Verma, B. 2017. ‘On-tree Mango Fruit Size Estimation Using RGB-D Images’, Sensors, 17: 2738. DOI: 10.3390/s17122738