Abstract:
Objective The estimation of ripe fruit size in trees is beneficial for precise orchard harvesting and yield prediction, which requires segmenting ripe fruits from the tree's data and screening them by size. This study proposed a compound method for identifying, segmenting, and estimating the size of ripe fruits with spectral-spatial point cloud data with a 101-channel hyperspectral LiDAR (HSL).
Methods In a laboratory environment, spatial and spectral point cloud data of lemon trees were acquired using HSL system. The system consists of a laser emission unit, a scanning control unit, and a laser receiving unit. A total of six lemon trees, containing 31 fruits, were scanned, with the LiDAR positioned approximately 5 m from the target trees. Before scanning, a standard diffuse reflectance panel with 99% reflectance was placed at the same position as the target object, and a black velvet cloth was arranged 20 cm behind the target to reduce the influence of ambient light. To suppress background noise, CloudCompare software (v2.13) was used to separate the tree point cloud from the background based on a Y-axis distance threshold, thereby extracting the complete tree structure. After background removal, the point cloud was manually labelled into four categories: immature fruits, mature fruits, trunks, and leaves, which served as ground-truth reference data. Spectral reflectance was used to represent spectral information in order to reduce the effects of laser intensity fluctuations, transmission attenuation, and environmental interference. The ground-truth fruit size was obtained as the average of three measurements using a vernier calliper. A composite method for fruit segmentation and size estimation was developed. Spectral features included reflectance at 700, 730, 780, 850, and 900 nm, together with mean reflectance in the 760–930 nm range. The red-edge chlorophyll index (CI red edge) was selected to reflect differences in chlorophyll content among fruit tree components, while the normalized difference vegetation index (NDVI) and the normalized difference red-edge index (NDRE) were introduced to improve discrimination among fruits, leaves, and trunks. A random forest classifier was used to classify tree components. Spatial neighborhood information was incorporated to improve classification accuracy. A K-nearest neighbor (KNN) algorithm refined the initial results through secondary classification. For each point, the labels of its K nearest neighbors were counted, and the most frequent label was assigned as the final class. This process was applied to all points to complete the secondary classification. Complete single-fruit point clouds were required for fruit size estimation. A boundary correction method based on local curvature features was applied. Candidate boundary points were selected according to the number of fruit-labeled neighbors, retaining points with more than five fruit points in the local neighborhood. The mean curvature and standard deviation were calculated for each fruit cluster, and a dynamic threshold was used for boundary correction. After correction, the Ordering Points to Identify the Clustering Structure (OPTICS) algorithm was applied to fruit points to achieve single-fruit segmentation without preset cluster numbers. Point density varied with laser incidence angle, which introduces errors in direct size estimation. Each single-fruit point cloud was therefore projected onto a two-dimensional plane using principal component analysis (PCA). An ellipse model was fitted in the projection plane using the RANSAC algorithm. In each iteration, a minimal sample set was randomly selected to estimate ellipse parameters, and point-to-ellipse distance residuals were calculated. Inliers were determined using the median absolute deviation (MAD), and the number of inlier assignments for each point was accumulated and normalized as a weight. All inliers and their weights were mapped back to three-dimensional space. A weighted least-squares ellipsoid fitting was then performed, and fruit size was estimated from the ellipsoid major axis and equatorial diameter.
Results The results show that spectral and spatial features effectively distinguish tree components and enable reliable ripe fruit identification. The ripe fruit classification accuracy reaches 84.81%. The boundary point correction method based on local fruit curvature further improves the mean ripe fruit classification accuracy to 96.45%. OPTICS clustering achieves fruit cluster analysis and accurate single-fruit segmentation without preset cluster numbers. Fruit counting accuracy reaches 100%, and the spatial overlap with manually labeled ground truth is 92.03%. For fruit size estimation, the mean absolute errors (MAE) of equatorial diameter and major axis are 0.30 cm and 0.61 cm, respectively. The corresponding root mean square errors (RMSE) are 0.36 cm and 0.74 cm. The coefficient of determination (R2) reaches 0.82 for equatorial diameter and 0.63 for the major axis.
Conclusions This study achieved fruit identification, segmentation, and size estimation under a single-sensor condition and confirms the feasibility of hyperspectral LiDAR for orchard fruit perception. After spatial–spectral classification, the fruit, leaf, and trunk distributions closely match the ground truth. Boundary point correction using local curvature further clarifies class boundaries among tree components. OPTICS clustering shows stable performance in fruit cluster analysis and single-fruit segmentation. In the size estimation stage, the fitted major axis and equatorial diameter show small deviations from manual measurements. However, partial fruits suffer from incomplete point cloud data under occlusion, which introduces estimation errors. Future work, therefore, focuses on improving the accuracy of fruit size estimation in occluded scenarios.