A non-destructive three-dimensional measurement method and system for the surface area of citrus fruits
The method of measuring the surface area of citrus fruits by using a dual-camera rotating platform and AprilTag tags solves the problems of incomplete point cloud acquisition, unstable stitching, and distorted bottom reconstruction in the measurement of citrus fruit surface area, and realizes non-destructive and high-precision measurement of citrus fruit surface area.
Patent Information
- Application Number
- CN202611101234.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-11-03
AI Technical Summary
Existing methods for measuring the surface area of citrus fruits suffer from problems such as incomplete point cloud acquisition, unstable stitching, and distorted bottom reconstruction, making it difficult to achieve non-destructive, high-precision three-dimensional measurement.
A Poisson surface reconstruction method combining a dual-camera rotating platform and AprilTag tags and geometric prior constraints is adopted. Point clouds are acquired through top and side depth cameras, attitude constraints are established using AprilTag tags, and citrus triangular meshes are generated to calculate the surface area by reconstructing the missing bottom region through geometric prior constraints.
It improves the stability of point cloud stitching and the reconstruction accuracy of the bottom curved surface, reduces measurement errors, and realizes non-destructive and automated measurement of citrus surface area.
Smart Images

Figure CN123032773A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural engineering, and in particular to a non-destructive three-dimensional measurement method and system for the surface area of citrus fruits. Background Technology
[0002] Surface area of citrus fruits is a key parameter in characterizing the external geometric morphology of fruits, directly related to tasks such as fruit phenotypic analysis, variety breeding, post-harvest quality evaluation, estimation of preservative coating dosage, calculation of lesion area ratio, and refined grading and detection. Compared to low-dimensional geometric indicators such as fruit diameter and projected area, surface area can characterize the complexity of the fruit's outer contour at the area scale; while the complete three-dimensional structure can further express the fruit apex, navel, local depressions, and curvature changes, which is an important foundation for constructing a high-precision digital phenotyping and intelligent sorting system for fruits. Therefore, how to accurately, quickly, and non-destructively obtain the surface area of citrus fruits is a practical problem that needs to be solved in the fields of agricultural machine vision and non-destructive testing of agricultural products.
[0003] Existing methods for measuring the surface area of citrus fruits mainly fall into three categories: manual contact measurement, two-dimensional visual estimation, and three-dimensional reconstruction measurement. Manual measurement typically relies on unfolding the package, tracing and weighing, or geometric approximations based on longitudinal and transverse diameters. While these methods provide reference results, they are cumbersome, inefficient, and prone to causing contact damage to the fruit. Two-dimensional visual methods establish geometric or regression models based on features such as image contours, projected area, and major and minor axes. They offer advantages such as fast data acquisition and relatively simple procedures, but essentially compress the three-dimensional fruit into a two-dimensional projection, making it difficult to stably represent the fruit apex, navel, local concavity / convexity, and asymmetrical morphology. Figure 1 As shown, the differences in size, shape, and local geometry of the citrus samples are illustrated.
[0004] Given the difficulty of preserving the spatial morphology of fruits in two-dimensional projection, methods for measuring fruit surface area based on three-dimensional reconstruction have gradually gained attention. These methods typically utilize depth cameras, structured light, laser scanning, or multi-view vision to acquire fruit point clouds, and then obtain the surface area through point cloud registration, surface reconstruction, and triangular mesh accumulation. Three-dimensional reconstruction methods can preserve the spatial morphology of fruits and are theoretically more suitable for high-precision, non-destructive measurement of irregular fruits. However, in the actual collection and reconstruction process for citrus fruits, key bottlenecks remain, stemming from the object's weak texture and near-spherical characteristics, acquisition occlusion, and limitations of Poisson-based reconstruction models.
[0005] Specifically, when existing 3D reconstruction methods are directly applied to the measurement of citrus surface area, they mainly face the following three technical challenges: First, acquiring a complete point cloud is difficult. Citrus fruits are approximately spherical or ellipsoidal, and their effective surface information is distributed in a complete three-dimensional space. Although existing multi-camera or multi-view acquisition can expand the coverage of the top and sides, it is still difficult to directly obtain a complete point cloud without any missing parts due to factors such as field of view, mutual occlusion, platform occlusion, and the invisibility of the bottom contact area. Therefore, how to obtain a relatively complete point cloud covering the top, sides, and multiple rotational postures without touching or damaging the fruit is a prerequisite for the accuracy of subsequent surface reconstruction.
[0006] Second, multi-viewpoint point cloud stitching is unstable. Conventional 3D reconstruction processes typically rely on Iterative Closest Point (ICP) algorithms, local feature descriptor matching, or learned registration models to estimate rigid transformations between viewpoints. However, the overall morphology of citrus fruits is close to rotationally symmetric, with weak surface texture, small, dense, and repetitively distributed oil cells, lacking stable, significant, and reproducibly identifiable natural geometric features. If the fruit point cloud itself is used directly as the registration basis, problems such as rotation angle confusion, local optima, stitching misalignment, and discontinuous fusion boundaries can easily occur, thus affecting surface area calculation.
[0007] Third, the lack of structural integrity at the bottom leads to deviations in Poisson surface reconstruction. Since surface area calculations ultimately rely on closed triangular meshes, 3D point clouds typically require surface reconstruction to obtain continuous surfaces. While standard Poisson surface reconstruction can generate continuous and watertight closed surfaces from directed point clouds, when sampling points and normal vector constraints are lacking in the contact area at the bottom of the citrus tree, surface restoration relies primarily on global smoothing and extension, which can easily result in excessive smoothing at the bottom, curvature drift, local shrinkage, or distortion of the closed shape. This local error further propagates to the accumulated results of the triangular mesh surfaces, becoming a significant source of error in citrus surface area measurement.
[0008] In summary, the challenge of non-destructive measurement of citrus surface area lies not only in obtaining 3D point clouds, but also in simultaneously addressing two core issues: stable stitching of weakly textured near-spherical objects and reliable reconstruction of bottom contact occlusion regions. Current technologies still lack a unified solution that integrates external pose constraints, multi-view point cloud fusion, and bottom geometric prior constraint reconstruction. Therefore, it is necessary to develop a non-destructive surface area measurement method tailored to actual citrus harvesting scenarios to improve point cloud stitching stability, the realism of bottom surface restoration, and the accuracy of final surface area calculation. Summary of the Invention
[0009] The technical problem this invention aims to solve is addressing three key issues in the non-destructive measurement of citrus fruit surface area in existing technologies: incomplete data acquisition, unstable stitching, and distorted reconstruction of missing regions. This invention provides a non-destructive 3D measurement method and system for citrus fruit surface area based on dual-camera rotating point cloud acquisition, AprilTag external attitude constraints, and geometric prior constraints for Poisson surface reconstruction. The core idea of this method is: instead of directly relying on weak features of the citrus surface for registration, it utilizes stable and identifiable AprilTag tags on a rotating platform to establish attitude constraints; instead of simply relying on the standard Poisson model to smoothly close bottom voids, it introduces the geometric prior formed by the platform plane and the lowest observable height into the implicit reconstruction process.
[0010] The technical solution adopted by this invention to solve its technical problem is: This invention provides a non-destructive three-dimensional measurement method for the surface area of citrus fruits, including a rotating platform, depth cameras respectively mounted on the top and sides of the rotating platform, and a plurality of AprilTag tags mounted on the surface of the rotating platform; the method includes the following steps: Step 1: Place the citrus fruit to be tested in the center of the rotating platform. The rotating platform rotates step by step at a certain angle. The top point cloud is obtained through the depth camera at the top and the AprilTag is identified. The side point cloud is obtained from different perspectives through the depth camera on the side. Step 2: Obtain the dual-camera extrinsic parameters through checkerboard calibration, and transform the side point cloud to the top camera coordinate system; use the top camera to identify the 3D position of the AprilTag tag at different rotation angles, and fit the rotation axis of the rotating platform in the top camera coordinate system; based on the dual-camera extrinsic parameters, rotation axis, and rotation angle, perform rigid transformation and fusion on the point clouds of each viewpoint to obtain the fused point cloud. Step 3: Establish a height scalar function based on the unit normal vector of the rotating platform plane. Estimate the missing height corresponding to the bottom contact occlusion by fusing the point cloud in the normal direction of the rotating platform. Combine the buffer height parameter to determine the bottom missing zone region. Introduce a spatially weighted geometric prior term acting on the bottom missing region into the standard Poisson surface reconstruction energy functional to obtain the geometrically prior constrained Poisson surface reconstruction model. Step 4: Discretize the reconstructed model, solve the implicit function, and generate a citrus triangular mesh by extracting isosurfaces. Accumulate the areas of all triangular faces in the triangular mesh to obtain the citrus surface area measurement results.
[0011] Furthermore, the method for fitting the rotation axis in step 2 of the present invention includes: For the i-th AprilTag tag, its 3D coordinates, i.e., the top point cloud, obtained by the top depth camera at the j-th rotation angle, are denoted as:
[0012] Where i represents the AprilTag tag number, j represents the number of rotation acquisitions, N is the number of tags, and M is the number of effective rotation angles; for the same tag, it forms an approximate circular trajectory as the rotating platform moves. The circular trajectory satisfies the radius constraint and lies in a plane perpendicular to the direction of the rotation axis, expressed as:
[0013]
[0014] Among them, c i Let r be the center of the circle representing the motion trajectory of the i-th label. i Where is the radius of the corresponding circle, and v is the unit direction vector of the rotation axis; By fitting the center of each tag trajectory circle using the least squares method, the center of the circle corresponding to multiple AprilTag tags is obtained. These center of the circle are all located on the same rotation axis of the rotating platform, which is represented as:
[0015] Where p0 represents a point on the rotation axis, v represents the unit direction vector of the rotation axis, and t is a linear parameter; by minimizing the sum of the squares of the distances from each center point to the axis:
[0016] The optimal axis of rotation is obtained by solving the problem.
[0017] Furthermore, the method for rigidly transforming and fusing point clouds from different viewpoints to obtain a fused point cloud in step 2 of the present invention includes: For point cloud points acquired at any rotation angle, the rotation matrix is calculated according to the Rodrigues formula, and a rigid transformation around the spatial axis is completed by combining this matrix with a point p0 on the rotation axis. With the point cloud points to be transformed Represented as:
[0018]
[0019] In the formula, R(θ) is the rotation matrix about the unit direction vector v by an angle θ, I is the identity matrix, and [v] × Let x be the antisymmetric matrix corresponding to vector v, x be the point cloud point to be transformed, and x′ be the point cloud after rotation and unification. For the side point cloud, it is transformed to the top camera coordinate system according to the dual-camera extrinsic parameters, and then the multi-view unification is completed according to the formula of the rotation axis; the citrus point clouds collected under different rotation angles are unified to the top camera coordinate system to obtain the fused point cloud P of rotation multi-view stitching.o .
[0020] Furthermore, the fused point cloud P o It can be represented by the top point cloud and the side point cloud from various rotational viewpoints as follows:
[0021] Among them, P t,j For the top point cloud in the j-th rotating view, P s,j For the side point cloud under the j-th rotation view, T s→t This is an extrinsic transformation from the side camera coordinate system to the top camera coordinate system.
[0022] The above formula represents the equation with the spatial axis determined by p0 and v as the reference, and the equation rotated by a uniform angle θ. j A rigid transformation is performed; lowercase p0 represents a point on the axis of rotation, uppercase P... o This represents the fused point cloud set, consisting of the axis positioning parameters and the point cloud result set, respectively.
[0023] Furthermore, the method for determining the bottom missing band region in step 3 of the present invention includes: The lowest observable height of the rotating platform plane and the fused point cloud is transformed into a bottom geometric prior and introduced into the Poisson reconstruction model:
[0024] Where n is the unit normal vector of the plane fitted by the rotating platform, d is the corresponding plane parameter, and x is any point in space; The lowest observable altitude is:
[0025] Among them, P o This represents the fused point cloud; Define the bottom height as the plane of the rotating platform:
[0026] The estimated height of the missing part caused by bottom contact occlusion is:
[0027] When the plane of the rotating platform has been normalized to h(x) = 0, it simplifies to ΔH = ; Therefore, the bottom missing band region is defined as:
[0028] Where Ω represents the spatial region to be reconstructed, and ε is the buffer height parameter.
[0029] Furthermore, the method for obtaining the geometrically prior-constrained Poisson surface reconstruction model in step 3 of the present invention includes: Based on the standard Poisson energy functional, a space-weighted prior term is introduced to construct the energy function:
[0030] Where χ(x) is the implicit function to be solved, V(x) is the vector field constructed from the directed point cloud, and χ g (x) is the implicit function of the bottom geometry prior, λ is the constraint weight coefficient, and ω(x) is the spatial weighting function; By performing variational analysis on the energy function and setting its first variation to zero, we obtain the Euler-Lagrange equation corresponding to the improved model:
[0031] The improved Poisson equation with spatially variable coefficients is obtained by rearranging:
[0032] This equation is the geometrically prior constrained Poisson surface reconstruction model.
[0033] Furthermore, the method for defining the spatial weighting function of the present invention includes: To ensure that the geometric prior applies to the bottom missing region, ω(x) is defined as:
[0034] Alternatively, ω(x) can be a continuous weight function that decays smoothly along the bottom missing band boundary.
[0035] Furthermore, the method for solving the implicit function in step 4 of the present invention includes: The reconstruction model is discretized using the finite element method. Let φ k If (x) is a basis function defined on a discrete space, then the implicit function expansion is:
[0036] By representing the geometric prior implicit functions in the same basis function space and assembling the basis functions using the Galerkin weighted residual method, we obtain the following sparse linear equation system:
[0037] Where K is the stiffness matrix corresponding to the standard Poisson model, W is the spatially weighted prior constraint matrix, a is the coefficient vector of the implicit function to be solved, b is the right-hand side term generated by the vector field V(x), and g is the coefficient vector of the geometric prior implicit function in the same basis function space; each matrix and vector is represented as follows:
[0038]
[0039]
[0040] Based on the implicit function coefficient vector obtained from the solution, the implicit function in the entire space is recovered.
[0041] Furthermore, the method for obtaining the citrus surface area measurement result in step 4 of the present invention includes: Explicit surface models are obtained through isosurface extraction:
[0042] Where σ is the isosurface threshold; then, the Marching Cubes isosurface extraction algorithm is used to convert the implicit function into a citrus triangular mesh; assuming the reconstructed citrus triangular mesh consists of K triangular facets, the total surface area of the citrus is expressed as: To reflect the relationship between surface area A and the aforementioned reconstruction parameters, the implicit function can be expressed as:
[0043] The explicit surface extracted from this is:
[0044] The surface area of citrus fruits is further expressed as:
[0045] The surface area result is determined by the fused point cloud, platform planar parameters, bottom missing height, missing zone region, geometric prior function, spatial weight function, and constraint weight. The explicit surface S is triangulated to obtain a citrus triangular mesh composed of K triangular facets; the functional expression of the surface area A is equivalent to the summation expression of the facets, and the final formula for calculating the surface area is as follows:
[0046] in, The result of the vector cross product calculation is shown below:
[0047] Wherein, the coordinates of the three vertices of the k-th triangular facet are a k b k and c k The three vertices are obtained by triangulation of the explicit surface S.
[0048] This invention provides a non-destructive three-dimensional measurement system for the surface area of citrus fruits, comprising: a point cloud acquisition module, a camera pose calculation module, a rotation axis fitting module, a point cloud stitching module, a geometric prior construction module, a surface reconstruction module, and a surface area calculation module; wherein: The point cloud acquisition module is used to control the top depth camera, the side depth camera and the rotating platform to work synchronously to acquire citrus point clouds and AprilTag pose information from multiple rotating perspectives. The camera pose calculation module is used to calculate the extrinsic parameter relationship between the top depth camera and the side depth camera based on the checkerboard calibration results, and to convert the side point cloud to the top camera coordinate system. The rotation axis fitting module is used to fit the axis of the rotating platform based on the three-dimensional coordinates of the AprilTag tags at different rotation angles, and to calculate the rotation transformation relationship of the point cloud from multiple perspectives. The point cloud stitching module is used to perform rigid transformation, fusion, and preprocessing of citrus point clouds from different perspectives based on camera extrinsic parameters, rotation axis, and rotation angle. The geometric prior construction module is used to estimate the bottom missing height based on the plane normal vector of the rotating platform and the lowest visible height of the fused observation point cloud, and to determine the bottom missing zone region; The surface reconstruction module is used to introduce spatially weighted geometric prior constraints into the standard Poisson surface reconstruction model, solve implicit functions, and generate citrus triangular meshes. The surface area calculation module is used to sum up the areas of all triangular faces in the citrus triangular mesh and output the citrus surface area measurement results.
[0049] This invention provides a computer-readable storage medium, characterized in that it comprises: Memory, used to store executable computer programs; The processor, when executing an executable computer program stored in the memory, implements the non-destructive three-dimensional measurement method for the surface area of citrus fruits.
[0050] The beneficial effects of this invention are: (1) In terms of point cloud stitching, the present invention uses the top depth camera, the side depth camera, the rotating platform and the AprilTag tag to work together, and uses the posture of the rotating platform as an external stabilizing constraint, which significantly reduces the dependence on natural feature points on the surface of citrus fruit. This can reduce the local misalignment and registration drift in the stitching of weak texture and near-spherical citrus point clouds by traditional ICP or local feature matching methods.
[0051] (2) In terms of surface reconstruction, the present invention explicitly models the structural defects caused by bottom contact occlusion as bottom missing bands, and limits the geometric priors to this area through spatial weighting, which can effectively suppress the excessive smoothing, curvature drift and local shrinkage of standard Poisson reconstruction in the missing area, and improve the local geometric realism of the bottom surface.
[0052] (3) This invention proposes a geometrically prior-constrained Poisson surface reconstruction model. This model introduces a spatially weighted prior term into the standard Poisson reconstruction energy functional, so that the prior constraint acts locally on the bottom missing region. While maintaining the overall surface continuity and watertight closure, it suppresses excessive smoothing, curvature drift and local shrinkage in the bottom region, thereby improving the reliability of surface area measurement.
[0053] (4) This invention proposes a method for modeling the bottom missing region based on the platform plane and the lowest observable height. This method treats the bottom contact occlusion of the fruit as a structural missing region with a clear spatial location, rather than ordinary noise or random holes. The bottom missing zone is determined by a height scalar function, providing an interpretable geometric prior for subsequent constraint reconstruction.
[0054] (5) This invention proposes an external pose constraint point cloud stitching approach for near-spherical citrus objects with weak texture. By placing AprilTag labels on a rotating platform and fitting the rotation axis with the label trajectory, the multi-view point cloud stitching is transformed from relying on the natural surface features of the fruit to relying on stable and recognizable external geometric constraints, thereby improving the stability of point cloud fusion for near-spherical, weakly textured fruits.
[0055] (6) In terms of measurement applications, this invention can automatically output three-dimensional surface models and surface area results of citrus fruits, taking into account non-destructive, automated, and deployable characteristics. In the data of this embodiment, compared with the standard Poisson surface reconstruction, the MAE, MAPE, and RMSE of the method of this invention are reduced by approximately 42.61%, 42.32%, and 41.99%, respectively, and can be used in application scenarios such as fruit phenotypic analysis, post-harvest quality evaluation, calculation of lesion area ratio, refined grading, and agricultural intelligent detection equipment. Attached Figure Description
[0056] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 The differences in size, shape, and local geometry of the citrus samples in the embodiments of the present invention are as follows; Figure 2 This is a statistical distribution of the size characteristics and shape index of experimental citrus samples in an embodiment of the present invention; Figure 3 This is a schematic diagram of the algorithm flow and data flow of an embodiment of the present invention; Figure 4This is a schematic diagram of the non-destructive measurement device for citrus surface area according to an embodiment of the present invention; (a) and (b) are views from two different directions. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0058] Example 1 This invention proposes a non-destructive method for measuring the surface area of citrus fruits based on geometrically constrained Poisson surface reconstruction. The method unfolds according to the logic of "multi-source point cloud acquisition—external attitude constraint stitching—bottom missing data modeling—constrained Poisson reconstruction—mesh area calculation," and includes the following steps: 1. Construct a dual-camera rotating point cloud acquisition system The citrus fruit to be tested is placed at the center of a rotating platform. Several AprilTag tags are set on the surface of the platform, and depth cameras are positioned above and to the sides of the platform. The top camera is used to acquire the point cloud of the top of the fruit and identify the AprilTag tags, while the side cameras are used to acquire the point cloud of the side of the fruit. The rotating platform rotates step by step at a preset angle, allowing the side cameras to acquire the lateral point cloud of the fruit from different orientations. The purpose of this acquisition structure is to improve the coverage of the observable area and provide stable external identification information for subsequent attitude constraint stitching.
[0059] 2. Complete dual-camera pose calibration and multi-view point cloud stitching. The extrinsic parameter relationship between the top and side cameras is obtained through checkerboard calibration, and the side point cloud is transformed to the top camera coordinate system. Simultaneously, the 3D position of the AprilTag is identified using the top camera at different rotation angles, and the rotation axis of the rotating platform in the top camera coordinate system is fitted. Subsequently, based on the dual-camera extrinsic parameters, rotation axis, and rotation angle, the point clouds from each viewpoint are rigidly transformed and fused. Unlike registration methods that directly rely on local features of the fruit surface, this step shifts the registration basis from "weak features of the citrus surface" to "stable posture constraints of the rotating platform," fundamentally reducing the splicing uncertainty of near-spherical, weakly textured objects.
[0060] 3. Construct the geometric prior for the missing bottom region and perform constraint reconstruction. A height scalar function is established based on the unit normal vector of the fitted plane of the rotating platform, and the platform plane is used as the geometric reference for the actual contact position of the fruit's bottom. The missing height corresponding to the bottom contact occlusion is estimated by fusing the lowest visible height in the platform normal direction from the observed point cloud, and the bottom missing zone region is further determined by combining the buffer height parameter. A spatially weighted geometric prior term is introduced into the energy functional for reconstructing the standard Poisson surface, so that this constraint mainly acts on the bottom missing region, while gradually weakening or becoming ineffective in the observed region. This design allows the reconstruction model to retain the advantages of the Poisson method in global surface closure while enhancing the local geometric credibility of the bottom missing region.
[0061] 4. Generate a 3D surface model and calculate the surface area of the citrus fruit. After denoising, downsampling, and normal vector estimation of the fused citrus point cloud, the implicit function is solved using a geometrically constrained Poisson surface reconstruction algorithm, and a triangular mesh model of the citrus fruit is generated by isosurface extraction. Finally, the areas of all triangular faces in the triangular mesh are summed to obtain the surface area measurement result of the citrus fruit. This forms a complete non-destructive measurement process from point cloud acquisition, pose constraint stitching, missing region compensation to surface area output.
[0062] The method of this invention can solve the following three technical problems in the prior art, and respectively correspond to the three aspects of beneficial effects: acquisition, stitching, and reconstruction. (1) To address the problem that single-view depth imaging is difficult to cover the complete surface of citrus, how to obtain multi-source point clouds covering the top, sides and multiple rotational postures of the fruit under non-destructive conditions through the coordinated acquisition of top camera, side camera and rotating platform.
[0063] (2) To address the problem of unstable traditional point cloud registration caused by weak texture and near-spherical structure of citrus, how to introduce external artificial labels and rotation axis constraints to unify multi-view point clouds into the same coordinate system and reduce the dependence on natural feature points of the fruit.
[0064] (3) To address the structural loss and standard Poisson reconstruction distortion caused by contact occlusion at the bottom of the fruit, how to construct a bottom geometric prior based on the relationship between the platform plane and the height of the observation point cloud, and introduce this prior into the Poisson surface reconstruction model in a spatially weighted form, thereby improving the reliability of bottom surface restoration and the accuracy of surface area measurement.
[0065] Example 2 1. Construction of experimental samples and datasets To verify the applicability of the non-destructive measurement method for citrus surface area proposed in this invention under different fruit morphology conditions, this embodiment selects fresh citrus fruits as the measurement object. The selected samples cover different sizes, shapes, and surface undulation features to reflect the impact of differences in citrus fruit morphology on point cloud acquisition, surface reconstruction, and surface area calculation results in actual measurement scenarios.
[0066] In this embodiment of the invention, 40 fresh citrus fruits were selected as experimental samples. All samples were numbered before the experiment, and fruits with obvious damage, rot, severe dents, or other defects that would affect the three-dimensional morphology measurement were removed. To reduce the impact of external contaminants on depth point cloud acquisition, the sample surfaces were cleaned as necessary before measurement, and point cloud acquisition, reference surface area measurement, and non-destructive algorithm measurement were completed under normal temperature conditions.
[0067] The reference surface area can be obtained using the peeling and unfolding image method: the peel is completely peeled along its natural texture and flattened as much as possible, then placed on a calibration plate or scanning platform to acquire a high-resolution image; the pixel area of the peel region is obtained using scale calibration, threshold segmentation, and hole filling, and then converted into the actual area, serving as a reference value for various non-destructive measurement algorithms. For local wrinkled areas that are difficult to flatten completely, multiple pieces can be unfolded, and the areas calculated separately and then summed to reduce deformation errors caused by a single unfolding.
[0068] In this embodiment, the sample reference surface area distribution ranges from 198.34 cm² to 327.86 cm², with a mean of 254.11 cm² and a standard deviation of 31.52 cm², which can cover the main area variation range of medium-sized citrus samples in actual measurements. These statistical results are used to explain the actual magnitude of subsequent error indicators such as MAE, MAPE, and RMSE.
[0069] Because citrus fruits typically exhibit variations in diameter, local curvature, indentations in the stem and blossom end areas, and occlusion in the bottom contact area, the selected samples maintain a certain degree of dispersion in size, shape, and surface structure. This sample selection method allows for more thorough verification of the stability of point cloud stitching, the accuracy of surface reconstruction, and the precision of surface area measurement under conditions of weak citrus texture, spherical structure, and missing bottom point cloud. Figure 2 As shown, this is the statistical distribution of the size characteristics and shape index of the experimental citrus samples.
[0070] It should be noted that the above-mentioned sample quantity and sample type are only one specific embodiment of the present invention and do not constitute a limitation on the scope of protection of the present invention. In practical applications, different varieties, different maturity levels, or different batches of citrus fruits can be selected as test samples according to the detection object and application scenario.
[0071] 2. Overall Methodological Framework From a rigorous algorithmic perspective, the method framework of this invention can be divided into two parts: "front-end data acquisition" and "core algorithm processing." The task of the front-end data acquisition stage is to obtain multi-view point clouds, dual-camera extrinsic parameters, and the attitude information of the rotating platform. The core algorithm processing stage takes the fused point cloud, camera extrinsic parameters, rotation axis, and platform planar parameters as input, and sequentially completes point cloud unification, bottom missing region modeling, geometric prior construction, constrained Poisson reconstruction, and surface area calculation. For example... Figure 3 The diagram shown illustrates the algorithm flow and data flow of the method of this invention.
[0072] Specifically, in the front-end data acquisition stage, the citrus fruit to be tested is first placed in the center of the rotating platform, and the top point cloud P is collected by the top camera and the side camera respectively. t With lateral point cloud P s Simultaneously, AprilTag tags on the rotating platform are identified. Then, a dual-camera coordinate relationship T is established using checkerboard calibration, and the rotation axis a is fitted based on the spatial trajectories of the AprilTag tags at different rotation angles θ, thereby fusing the point clouds from each viewpoint into a fused point cloud P. o The key objective at this stage is not simply to increase the acquisition viewpoint, but to provide reliable pose constraints for point cloud fusion of weakly textured fruits.
[0073] In the core algorithm processing stage, a height scalar function is further constructed using the rotating platform plane to transform the bottom contact occlusion region into a bottom missing zone Ωb, and a spatial weighting function ω is constructed. Subsequently, a spatially weighted geometric prior is introduced in the solution process of the implicit function χ reconstructed from the Poisson surface, which imposes additional constraints on the missing zone region, while the observed region is still mainly determined by the original point cloud normal vector field. Finally, a triangular mesh S is generated by isosurface extraction, and the surface area A of the citrus fruit is obtained based on the accumulation of mesh surfaces. Thus, this method forms a clear technical main line: "external attitude constraints solve the stitching problem, and bottom geometric priors solve the missing reconstruction problem."
[0074] 3. Fitting the axis of rotation under AprilTag constraints To achieve stable stitching of point clouds from multiple rotating views, this invention utilizes AprilTag tags on a rotating platform to fit the platform's rotation axis. The core of this step lies in the fact that the citrus surface itself is unsuitable as a stable registration reference, while the AprilTag tags on the rotating platform possess characteristics such as a fixed, rigid structure, repeatable identification, and solvable pose. Therefore, this invention treats the rotating platform as an "intermediate geometric reference" connecting point clouds from different viewpoints, deduces the platform's rotation axis from the tag's motion trajectory, and then uses this axis to perform a unified transformation on the point clouds from each rotating viewpoint.
[0075] In one specific embodiment, several AprilTag tags with different numbers are set on the surface of the rotating platform. The rotating platform rotates sequentially at preset angles, for example, 90° each time, and collects the spatial position information of the tags at four orientations: 0°, 90°, 180°, and 270°. For the i-th AprilTag tag, its three-dimensional coordinates obtained by the top camera at the j-th rotation angle are:
[0076] Where i represents the AprilTag tag number, j represents the number of rotation acquisitions, N is the number of tags, and M is the number of effective rotation angles. For the same tag, it forms an approximate circular trajectory as the rotating platform moves. This circular trajectory not only satisfies the radius constraint but should also lie in a plane perpendicular to the rotation axis, which can be expressed as:
[0077]
[0078] Among them, c i Let r be the center of the circle representing the motion trajectory of the i-th label. i Let be the radius of the corresponding circle, and v be the unit direction vector of the rotation axis.
[0079] The above constraints indicate that the trajectory formed by the same label at different rotation angles is a spatial circle perpendicular to the rotation axis, rather than an arbitrary spatial sphere. Due to errors in actual detection and depth measurement, the center of each label trajectory circle can be fitted using a least-squares method. After obtaining the centers of multiple AprilTag labels, since these centers all lie on the same rotation axis of the rotating platform, the rotation axis can be represented as:
[0080] Where p0 represents a point on the axis of rotation, v represents the unit direction vector of the axis of rotation, and t is a linear parameter.
[0081] When finding the optimal axis of rotation, the sum of the squares of the distances from each center point to the axis can be minimized:
[0082] After obtaining the rotation axis, for point cloud points acquired at any rotation angle, the rotation matrix can be calculated using the Rodrigues formula. This, combined with a point p0 on the rotation axis, completes the rigid transformation around the spatial axis. The rotation matrix... With the point cloud points to be transformed Represented as:
[0083]
[0084] In the formula, R(θ) is the rotation matrix about the unit direction vector v by an angle θ, I is the identity matrix, and [v] × Let x be the antisymmetric matrix corresponding to vector v, x be the point cloud point to be transformed, and x′ be the point cloud point after rotation and unification.
[0085] This formula explicitly considers the case where the axis of rotation does not necessarily pass through the origin of the coordinate system, and therefore is more suitable for rotating platform scenarios than simply using x′=R(θ)x.
[0086] For point clouds acquired by the side camera, the coordinates can be transformed to the top camera coordinate system based on the dual-camera extrinsic parameters, and then the multi-view unification can be completed according to the above spatial axis rotation formula.
[0087] Using the above method, citrus point clouds collected from different rotation angles can be unified under the top camera coordinate system, thereby completing the multi-view point cloud stitching.
[0088] In this embodiment, let P be the top point cloud under the j-th rotational viewpoint. t,j The side point cloud is P s,j The extrinsic parameter from the side camera to the top camera is T. s→t Then the fused point cloud after rotation and unification can be written as:
[0089] Where p0 is a point on the rotation axis, v is the unit direction vector of the rotation axis, and θ j The rotation angle required to unify the j-th viewpoint to the reference viewpoint; P o This is the fused citrus dot cloud collection.
[0090] Therefore, p0 participates in defining the rigid transformation of the space, while P o The two are point cloud results after this transformation and unification. They have different meanings but are related in terms of construction.
[0091] This method utilizes AprilTag tags to provide stable external geometric constraints, avoiding dependence on natural feature points on the citrus surface and improving the stability and accuracy of point cloud stitching for weakly textured, spherical citrus fruits.
[0092] 4. Geometric Prior Constraint Poisson Surface Reconstruction Algorithm (GPC-PSR) After multi-view point cloud fusion, systematic missing data caused by platform contact occlusion still often exists at the bottom of citrus fruits. This missing data differs from random noise or local outliers; instead, it is concentrated in the contact area at the bottom of the fruit and has a clear spatial relationship with the rotating platform plane. If a standard Poisson surface is directly used for reconstruction, the bottom region can usually only be implicitly closed by the global smoothing term, which can easily lead to the bottom surface being over-flattened, contracted inward, or experiencing curvature drift.
[0093] To this end, the present invention transforms the lowest observable height of the platform plane and the fused point cloud into a bottom geometric prior and introduces it into the Poisson reconstruction model.
[0094]
[0095] Where n is the unit normal vector of the plane fitted by the rotating platform, d is the corresponding plane parameter, x is any point in space, and h(x) describes the scalar height of the point along the normal direction of the platform. If the plane of the rotating platform is taken as the zero point of height, then the platform plane satisfies h(x) = 0. Let P o The minimum observable height of the merged observable fruit point cloud is defined as follows:
[0096] Since the bottom of the fruit is in contact with the rotating platform, the actual bottom height can be given by the platform plane and defined as:
[0097] Therefore, the missing height caused by bottom contact obstruction can be estimated as follows:
[0098] When the platform plane has been normalized to h(x)=0, the above equation can be simplified to ΔH= This quantity reflects the height difference between the lowest visible position of the observed point cloud and the actual bottom contact plane, and can be regarded as a systematic missing quantity caused by bottom contact occlusion. This quantity does not directly give the precise surface shape of the missing region, but it can provide effective prior constraints on the spatial extent of the bottom missing region.
[0099] To further limit the scope of the constraint, this invention defines the bottom missing band region as:
[0100] Where Ω represents the spatial region to be reconstructed, and ε is a buffer height parameter used to retain a certain transition range near the boundary of the missing bottom region. This formula limits the geometric prior constraints to the area between the actual bottom contact plane and the lowest visible height of the observed point cloud, preventing unnecessary interference with the surface reconstruction of the observed area.
[0101] To enhance the local geometric constraints of the missing bottom region, this invention introduces spatially weighted prior terms based on the standard Poisson energy functional, constructing the following energy function:
[0102] Where χ(x) is the implicit function to be solved, V(x) is the vector field constructed from the directed point cloud, and χ gω(x) is the implicit function of the bottom geometric prior, λ is the constraint weight coefficient, and ω(x) is the spatial weighting function. To ensure that the geometric prior mainly applies to the bottom missing region, ω(x) can be defined as:
[0103] In practical applications, ω(x) can also be a continuous weighting function that decays smoothly along the boundary of the bottom missing band. This local weighting method allows prior constraints to be concentrated on the bottom missing region, reducing interference with the geometry of the non-missing observed region.
[0104] By performing variational analysis on the above energy functional and setting its first variation to zero, we can obtain the Euler-Lagrange equation corresponding to the improved model:
[0105] Further simplification yields the improved Poisson equation with spatially variable coefficients:
[0106] This equation is the geometrically prior-constrained Poisson surface reconstruction model proposed in this invention.
[0107] From the model structure perspective, when ω(x) = 0, it degenerates into a standard Poisson surface reconstruction; when ω(x) takes a large value in the missing bottom region, the implicit function is simultaneously constrained by the directed point cloud normal vector field and the bottom geometric prior. Therefore, the model does not impose a strong prior on the entire fruit surface, but rather performs local compensation for the missing bottom region, which can enhance the geometric realism of the missing region while maintaining the overall surface continuity.
[0108] In the actual solution process, this invention uses the finite element method to discretize the reconstructed space. Let φ k If (x) is a basis function defined on a discrete space, then the implicit function can be expanded as follows:
[0109] Similarly, geometric prior implicit functions can also be represented in the same basis function space. After assembling the basis functions using the Galerkin weighted residual method, the following sparse linear equation system can be obtained:
[0110] Where K is the stiffness matrix corresponding to the standard Poisson model, W is the spatially weighted prior constraint matrix, a is the coefficient vector of the implicit function to be solved, b is the right-hand side term generated by the vector field V(x), and g is the coefficient vector of the geometric prior implicit function in the same basis function space. Each matrix and vector can be represented as:
[0111]
[0112]
[0113] After obtaining the implicit function coefficient vector, the implicit function over the entire space can be recovered, and the explicit surface model can be obtained through isosurface extraction.
[0114] Where σ is the isosurface threshold. Subsequently, the Marching Cubes isosurface extraction algorithm is used to convert the implicit function into a triangular mesh surface, thereby obtaining an explicit 3D model suitable for subsequent geometric parameter calculations.
[0115] After obtaining the triangular mesh model of the citrus fruit, the surface area of the fruit can be obtained by summing the areas of all the triangular facets.
[0116] Since the triangular mesh surface S is obtained by extracting the isosurface of the following implicit function:
[0117] Therefore, the surface area A can be further written as:
[0118] This expression indicates that the final area result maintains a continuous parameter transfer relationship with the fused point cloud, platform plane, bottom missing band, and spatially weighted geometric prior.
[0119] Triangulate the explicit surface S to obtain a citrus triangular mesh composed of K triangular facets; the above functional expression of the surface area A is equivalent to the following facet summation expression, and the following formula is the final formula for calculating the surface area:
[0120] If the coordinates of the three vertices of the k-th triangular facet are a k b k and c k Then its area can be calculated by the vector cross product as follows:
[0121] Among them, a k b k and c k The three vertices are obtained by triangulation of the explicit surface S described above.
[0122] This calculation method is simple to implement, has clear physical meaning, and is applicable to any closed triangular mesh model. It should be noted that the accuracy of surface area calculation is highly dependent on the local geometric accuracy of the reconstructed mesh. For citrus fruits, although the missing area at the bottom only accounts for a portion of the overall surface, if this area experiences local shrinkage, excessive smoothing, or curvature drift during reconstruction, the area error of its triangular facets will be directly added to the total surface area result.
[0123] Therefore, the GPC-PSR model of this invention is not only used to obtain closed surfaces, but more importantly, it improves the quality of local geometric restoration of missing regions, thereby improving the reliability of the final surface area measurement.
[0124] Example 3: Experimental Analysis 1. Experimental setup To verify the effectiveness of the method proposed in this invention, this embodiment selected 40 fresh citrus samples for experiments and designed comparative analyses around the aforementioned three technical challenges: first, verifying the improvement of AprilTag pose constraints on the registration stability of weakly textured near-spherical fruits through point cloud stitching metrics; second, verifying the improvement effect of GPC-PSR on the reconstruction of bottom missing regions through surface area error metrics; and third, evaluating the engineering usability of the method in actual detection scenarios through runtime metrics. The comparative methods include traditional ICP point cloud registration, FPFH+SAC-IA+ICP point cloud registration, and standard Poisson, Screened Poisson, and GeoSPSR surface reconstruction methods.
[0125] The experimental setup mainly includes two Intel RealSense D435i depth cameras, a motorized rotating platform, several AprilTag tags, and a computer for running the measurement program. One depth camera is fixed above the rotating platform to acquire point cloud data of the top of the citrus fruit and identify AprilTag tags on the platform; the other depth camera is fixed to the side of the rotating platform to acquire point cloud data of the side of the citrus fruit. The citrus fruit to be measured is placed in the center of the rotating platform, which rotates in stages according to a preset angle. In this embodiment, each rotation is 90°, acquiring point cloud data from four perspectives: 0°, 90°, 180°, and 270°.
[0126] During the experiment, all comparison methods used the same raw point cloud data as input and completed point cloud stitching, surface reconstruction, and surface area calculation under the same computing environment. For the fused point cloud, uniform preprocessing operations such as denoising, downsampling, and normal vector estimation were performed to reduce the impact of differences in hardware, sampling density, and preprocessing parameters on the experimental results. Through these settings, the effectiveness of different stitching strategies and different surface reconstruction models in the non-destructive surface area measurement task of citrus fruits can be compared relatively directly.
[0127] 2. Evaluation Indicators To comprehensively evaluate the performance of different methods in the task of point cloud stitching and surface reconstruction of citrus fruits, this embodiment constructs an evaluation index system from three aspects: point cloud registration accuracy, surface area measurement accuracy, and algorithm running efficiency.
[0128] In the point cloud stitching experiment, the root mean square error (RMSE) and registration fitness were used to evaluate the point cloud registration quality of different methods. RMSE measures the average distance deviation between corresponding points after registration; a smaller RMSE value indicates better point cloud alignment. Fitness measures the proportion of effective matching points within the overlapping area; a larger fitness value indicates more stable registration results.
[0129] In evaluating the accuracy of surface area measurement, Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), Root Mean Square Error (RMSE), and Coefficient of Determination (R²) are used as quantitative indicators to measure the difference between the citrus surface area calculated by different surface reconstruction methods and the reference measurement value. The smaller the MAE, MAPE, and RMSE, the closer the algorithm's measurement result is to the reference value; the larger the R², the higher the consistency between the algorithm's estimation result and the reference value.
[0130] In terms of algorithm efficiency evaluation, this embodiment uses the average running time per sample as the evaluation index, and statistically analyzes the computation time required from input point cloud to output result for different point cloud stitching methods and surface reconstruction methods. This index can be used to measure the computational overhead and running efficiency of the algorithm in practical applications, providing a reference for subsequent system integration and engineering deployment.
[0131] 3. Performance Comparison and Visual Analysis This embodiment selects the traditional Iterative Closest Point (ICP) algorithm, the FPFH+SAC-IA+ICP method based on local features, and the AprilTag external pose constraint stitching method proposed in this paper as the point cloud stitching comparison objects in the 3D reconstruction process. All methods use the same multi-view preprocessed point cloud as input and complete the point cloud stitching in a unified coordinate system. Table 1 shows the comparison of the point cloud fusion effects of different methods on typical citrus samples, used to verify the improvement effect of this invention on the challenge of "difficult registration of near-spherical objects with weak texture".
[0132] Meanwhile, to address the technical challenges of "unstable stitching" and "distorted reconstruction due to missing bottom areas," this embodiment can output 3D structures generated by different methods for visual comparison, including the continuity of the fused point cloud boundaries after multi-view stitching, the closed shape of the bottom contact area, the degree of local shrinkage of the triangular mesh, and the bottom curvature transition. The visualization results, together with the quantitative indicators in Tables 1 and 2, demonstrate that external attitude constraints mainly improve the consistency of point cloud registration, while geometric prior constraint Poisson reconstruction mainly improves the quality of local surface restoration in the missing bottom areas.
[0133] Table 1. Performance Comparison of Different Point Cloud Stitching Methods
[0134] Table 1 shows that the AprilTag pose constraint stitching method outperforms the traditional ICP method and the FPFH+SAC-IA+ICP method in both RMSE and Fitness metrics, indicating that using AprilTag tags and rotation axis constraints can effectively reduce the impact of weak citrus texture and near-spherical structure on point cloud registration. This result demonstrates that the present invention does not simply rely on more viewpoints to increase point cloud coverage, but rather improves the geometric consistency between multi-view data through external pose constraints. Compared with pure feature matching methods, the proposed method also has a lower average running time, indicating a good balance between accuracy and efficiency.
[0135] Regarding the accuracy of surface area calculation, the GPC-PSR method proposed in this invention outperforms other comparative methods in terms of MAE, MAPE, RMSE, and R². In this example, the reference surface area range of 40 citrus samples is 198.34 cm² to 327.86 cm², with a mean of 254.11 cm² and a standard deviation of 31.52 cm². Within this data range, the GPC-PSR has an MAE of 10.87 cm², a MAPE of 4.28%, an RMSE of 12.94 cm², and an R² of 0.928, indicating that its absolute error is relatively low compared to the total sample surface area, and the measurement results show good consistency with the reference values. Compared with the standard Poisson method, the MAE, MAPE and RMSE of the proposed method are reduced by 42.61%, 42.32% and 41.99%, respectively. This is because GPC-PSR treats the bottom contact occlusion region as a structural defect for local constraint, which reduces the excessive smoothing, curvature drift and local shrinkage in this region of the standard Poisson method, thereby reducing the area accumulation error caused by the distortion of the bottom mesh shape.
[0136] Table 2. Comparison of Surface Area Calculation Accuracy
[0137] Based on the above experimental results, it can be seen that the experimental conclusions of this invention correspond consistently with the aforementioned technical challenges and methodological innovations: the external pose constraint of AprilTag mainly solves the problem of instability in multi-view stitching, while the bottom missing band modeling and spatial weighted geometric prior mainly solve the problem of reconstruction distortion in the contact occlusion area. Both work together to improve the final surface area measurement accuracy.
[0138] Example 4: Non-destructive measurement system for citrus surface area based on geometric prior constraint Poisson surface reconstruction This invention also provides a non-destructive measurement system for the surface area of citrus fruits based on geometric prior constraints and Poisson surface reconstruction. The system includes a point cloud acquisition module, a camera pose calculation module, a rotation axis fitting module, a point cloud stitching module, a geometric prior construction module, a surface reconstruction module, and a surface area calculation module.
[0139] The point cloud acquisition module is used to control the top depth camera, side depth camera and rotating platform to work synchronously to acquire citrus point clouds and AprilTag pose information from multiple rotating perspectives.
[0140] The camera pose calculation module is used to calculate the extrinsic parameter relationship between the top camera and the side cameras based on the checkerboard calibration results, and to convert the side point cloud to the top camera coordinate system.
[0141] The rotation axis fitting module is used to fit the axis of the rotating platform based on the 3D coordinates of the AprilTag tags at different rotation angles, and to calculate the rotation transformation relationship of the point cloud from multiple perspectives.
[0142] The point cloud stitching module is used to perform rigid transformation, fusion, and preprocessing of citrus point clouds from different perspectives based on camera extrinsic parameters, rotation axis, and rotation angle.
[0143] The geometric prior construction module is used to estimate the bottom missing height based on the plane normal vector of the rotating platform and the lowest visible height of the fused observation point cloud, and to determine the bottom missing zone region.
[0144] The surface reconstruction module is used to introduce spatially weighted geometric prior constraints into the standard Poisson surface reconstruction model, solve the implicit functions, and generate a citrus triangular mesh model.
[0145] The surface area calculation module is used to sum up the areas of all triangular faces in the triangular mesh and output the surface area measurement results of citrus fruits.
[0146] Example 5: Apparatus like Figure 4As shown, this invention also provides a non-destructive measurement device for the surface area of citrus fruits based on geometrically prior-constrained Poisson surface reconstruction. The device includes a top depth camera, a side depth camera, a rotating platform, AprilTag tags, a light-blocking structure, and a computing unit. Figure 4 Label 1 indicates the top depth camera, label 2 indicates the side depth camera, label 3 indicates the AprilTag tag, and label 4 indicates the rotating platform (fruit-bearing area). The top depth camera is positioned above the rotating platform to acquire point clouds of the top of the citrus fruit and identify the AprilTag tag; the side depth camera is positioned to the side of the rotating platform to acquire point clouds of the side of the citrus fruit; the rotating platform carries the citrus fruit to be measured and rotates it step by step at a preset angle; the computing unit is used to execute point cloud stitching, bottom geometric prior construction, geometric prior constraint Poisson surface reconstruction, and surface area calculation programs.
[0147] In one implementation, the top depth camera and the side depth camera may be an Intel RealSense D435i or a depth camera with equivalent depth acquisition capabilities. A light-shielding structure is used to reduce the impact of ambient light variations on depth acquisition and tag recognition.
[0148] Example 6: Electronic Equipment The present invention also provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the aforementioned non-destructive measurement method for citrus surface area based on geometric prior constraint Poisson surface reconstruction.
[0149] In one embodiment, the electronic device may further include a graphics processor, a camera interface, a rotation platform control interface, a display unit, and a data output interface. The graphics processor is used to accelerate point cloud processing, surface reconstruction, or triangular mesh calculation; the camera interface is used to connect a top depth camera and a side depth camera; the rotation platform control interface is used to control the rotation platform to move at a preset angle; and the display unit is used to display the 3D reconstructed model and surface area measurement results.
[0150] Example 7: Storage Medium The present invention also provides a computer-readable storage medium storing computer-executable instructions for performing the above-described non-destructive measurement method for citrus surface area based on geometric prior constraint Poisson surface reconstruction.
[0151] The storage medium can be a hard disk, optical disk, flash memory, ROM, RAM, or other electronic device capable of storing programs. The program code includes modules such as camera invocation, point cloud acquisition, pose calculation, rotation axis fitting, point cloud stitching, geometric prior construction, surface reconstruction, triangular mesh generation, and surface area calculation. It can be embedded in electronic devices or deployed as a standalone program to other systems to achieve rapid and non-destructive measurement of the surface area of citrus fruits.
[0152] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0153] It should be understood that those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A non-destructive three-dimensional measurement method for the surface area of citrus fruits, characterized in that, The method includes a rotating platform, with depth cameras mounted on its top and sides, and several AprilTag tags affixed to its surface. The method comprises the following steps: Step 1: Place the citrus fruit to be tested in the center of the rotating platform. The rotating platform rotates step by step at a certain angle. The top point cloud is obtained through the depth camera at the top and the AprilTag is identified. The side point cloud is obtained from different perspectives through the depth camera on the side. Step 2: Obtain the dual-camera extrinsic parameters through checkerboard calibration, and transform the side point cloud to the top camera coordinate system; use the top camera to identify the 3D position of the AprilTag tag at different rotation angles, and fit the rotation axis of the rotating platform in the top camera coordinate system; based on the dual-camera extrinsic parameters, rotation axis and rotation angle, perform rigid transformation and fusion on the point clouds of each viewpoint to obtain the fused point cloud; Step 3: Establish a height scalar function based on the unit normal vector of the rotating platform plane. Estimate the missing height corresponding to the bottom contact occlusion by fusing the point cloud in the normal direction of the rotating platform. Combine the buffer height parameter to determine the bottom missing zone region. Introduce a spatially weighted geometric prior term acting on the bottom missing region into the standard Poisson surface reconstruction energy functional to obtain the geometrically prior constrained Poisson surface reconstruction model. Step 4: Discretize the reconstructed model, solve the implicit function, and generate a citrus triangular mesh by extracting isosurfaces. Accumulate the areas of all triangular faces in the triangular mesh to obtain the citrus surface area measurement results.
2. The non-destructive three-dimensional measurement method for citrus surface area according to claim 1, characterized in that, The method for fitting the rotation axis in step 2 includes: For the i-th AprilTag tag, its 3D coordinates, i.e., the top point cloud, obtained by the top depth camera at the j-th rotation angle, are denoted as: Where i represents the AprilTag tag number, j represents the number of rotation acquisitions, N is the number of tags, and M is the number of effective rotation angles; for the same tag, it forms an approximate circular trajectory as the rotating platform moves. The circular trajectory satisfies the radius constraint and lies in a plane perpendicular to the direction of the rotation axis, expressed as: Among them, c i Let r be the center of the circle representing the motion trajectory of the i-th label. i Where is the radius of the corresponding circle, and v is the unit direction vector of the rotation axis; By fitting the center of each tag trajectory circle using the least squares method, the center of the circle corresponding to multiple AprilTag tags is obtained. These center of the circle are all located on the same rotation axis of the rotating platform, which is represented as: Where p0 represents a point on the rotation axis, v represents the unit direction vector of the rotation axis, and t is a linear parameter; by minimizing the sum of the squared distances from each center point to the axis: The optimal axis of rotation is obtained by solving the problem.
3. The non-destructive three-dimensional measurement method for citrus surface area according to claim 2, characterized in that, The method for rigidly transforming and fusing the point clouds from different viewpoints in step 2 to obtain the fused point cloud includes: For point cloud points acquired at any rotation angle, the rotation matrix is calculated according to the Rodrigues formula, and a rigid transformation around the spatial axis is completed by combining this matrix with a point p0 on the rotation axis. With the point cloud points to be transformed Represented as: In the formula, R(θ) is the rotation matrix about the unit direction vector v by an angle θ, I is the identity matrix, and [v] × Let x be the antisymmetric matrix corresponding to vector v, x be the point cloud point to be transformed, and x′ be the point cloud after rotation and unification. For the side point cloud, it is transformed to the top camera coordinate system according to the dual-camera extrinsic parameters, and then the multi-view unification is completed according to the formula of the rotation axis; the citrus point clouds collected under different rotation angles are unified to the top camera coordinate system to obtain the fused point cloud P of rotation multi-view stitching. o ; The fused point cloud P o The top point cloud and side point cloud from various rotational viewpoints are collectively represented as follows: Among them, P t,j For the top point cloud in the j-th rotating view, P s,j For the side point cloud under the j-th rotation view, T s→t This is an extrinsic transformation from the side camera coordinate system to the top camera coordinate system. The above formula represents the equation with the spatial axis determined by p0 and v as the reference, and the equation rotated by a uniform angle θ. j A rigid transformation is performed; p0 represents a point on the axis of rotation, P o This represents the fused point cloud set, consisting of the axis positioning parameters and the point cloud result set, respectively.
4. The non-destructive three-dimensional measurement method for citrus surface area according to claim 1, characterized in that, The method for determining the bottom missing band region in step 3 includes: The lowest observable height of the rotating platform plane and the fused point cloud is transformed into a bottom geometric prior and introduced into the Poisson reconstruction model: Where n is the unit normal vector of the plane fitted by the rotating platform, d is the corresponding plane parameter, and x is any point in space; The lowest observable altitude is: Among them, P o This represents the fused point cloud; Define the bottom height as the plane of the rotating platform: The estimated height of the missing part caused by bottom contact occlusion is: When the plane of the rotating platform has been normalized to h(x) = 0, it simplifies to ΔH = ; Therefore, the bottom missing band region is defined as: Where Ω represents the spatial region to be reconstructed, and ε is the buffer height parameter.
5. The non-destructive three-dimensional measurement method for citrus surface area according to claim 4, characterized in that, The method for obtaining the geometrically prior-constrained Poisson surface reconstruction model in step 3 includes: Based on the standard Poisson energy functional, a space-weighted prior term is introduced to construct the energy function: Where χ(x) is the implicit function to be solved, V(x) is the vector field constructed from the directed point cloud, and χ g (x) is the implicit function of the bottom geometry prior, λ is the constraint weight coefficient, and ω(x) is the spatial weighting function; By performing variational analysis on the energy function and setting its first variation to zero, we obtain the Euler-Lagrange equation corresponding to the improved model: The improved Poisson equation with spatially variable coefficients is obtained by rearranging: This equation is the geometrically prior constrained Poisson surface reconstruction model.
6. The non-destructive three-dimensional measurement method for citrus surface area according to claim 5, characterized in that, The definition method of the space weighting function includes: To ensure that the geometric prior applies to the bottom missing region, ω(x) is defined as: Alternatively, ω(x) can be a continuous weight function that decays smoothly along the bottom missing band boundary.
7. The non-destructive three-dimensional measurement method for citrus surface area according to claim 5, characterized in that, The method for solving the implicit function in step 4 includes: The reconstruction model is discretized using the finite element method. Let φ k If (x) is a basis function defined on a discrete space, then the implicit function expansion is: By representing the geometric prior implicit functions in the same basis function space and assembling the basis functions using the Galerkin weighted residual method, we obtain the following sparse linear equation system: Where K is the stiffness matrix corresponding to the standard Poisson model, W is the spatially weighted prior constraint matrix, a is the coefficient vector of the implicit function to be solved, b is the right-hand side term generated by the vector field V(x), and g is the coefficient vector of the geometric prior implicit function in the same basis function space; each matrix and vector is represented as follows: Based on the implicit function coefficient vector obtained from the solution, the implicit function in the entire space is recovered.
8. The non-destructive three-dimensional measurement method for citrus surface area according to claim 7, characterized in that, The method for obtaining the citrus surface area measurement results in step 4 includes: Explicit surface models are obtained through isosurface extraction: Where σ is the isosurface threshold; then the Marching Cubes isosurface extraction algorithm is used to convert the implicit function into a citrus triangular mesh; To reflect the relationship between surface area A and reconstruction parameters, the implicit function is expressed as: The explicit surface extracted from this is: The surface area of citrus fruits is further expressed as: The surface area result is determined by the fused point cloud, platform planar parameters, bottom missing height, missing zone region, geometric prior function, spatial weight function, and constraint weight. The explicit surface S is triangulated to obtain a citrus triangular mesh composed of K triangular facets; the functional expression of the surface area A is equivalent to the summation expression of the facets, and the final formula for calculating the surface area is as follows: in, The result of the vector cross product calculation is shown below: Wherein, the coordinates of the three vertices of the k-th triangular facet are a k b k and c k The three vertices are obtained by triangulation of the explicit surface S.
9. A non-destructive three-dimensional measurement system for citrus surface area, used to implement the non-destructive three-dimensional measurement method for citrus surface area as described in any one of claims 1 to 8, characterized in that, include: The module includes a point cloud acquisition module, a camera pose calculation module, a rotation axis fitting module, a point cloud stitching module, a geometric prior construction module, a surface reconstruction module, and a surface area calculation module; among which: The point cloud acquisition module is used to control the top depth camera, the side depth camera and the rotating platform to work synchronously to acquire citrus point clouds and AprilTag pose information from multiple rotating perspectives. The camera pose calculation module is used to calculate the extrinsic parameter relationship between the top depth camera and the side depth camera based on the checkerboard calibration results, and to convert the side point cloud to the top camera coordinate system. The rotation axis fitting module is used to fit the axis of the rotating platform based on the three-dimensional coordinates of the AprilTag tags at different rotation angles, and to calculate the rotation transformation relationship of the point cloud from multiple perspectives. The point cloud stitching module is used to perform rigid transformation, fusion, and preprocessing of citrus point clouds from different perspectives based on camera extrinsic parameters, rotation axis, and rotation angle. The geometric prior construction module is used to estimate the bottom missing height based on the plane normal vector of the rotating platform and the lowest visible height of the fused observation point cloud, and to determine the bottom missing zone region; The surface reconstruction module is used to introduce spatially weighted geometric prior constraints into the standard Poisson surface reconstruction model, solve implicit functions, and generate citrus triangular meshes. The surface area calculation module is used to sum up the areas of all triangular faces in the citrus triangular mesh and output the citrus surface area measurement results.
10. A computer-readable storage medium, characterized in that, include: Memory, used to store executable computer programs; A processor, when executing an executable computer program stored in a memory, implements the non-destructive three-dimensional measurement method for the surface area of citrus fruits as described in any one of claims 1 to 8.
