Spherical-like fruit measuring method combining rotating shaft optimization and blind area completion

By using rotation axis optimization and blind zone completion methods, combined with phase shifting and triangulation techniques, a high-precision 3D point cloud is generated, solving the problems of low efficiency, easy damage, and insufficient accuracy in traditional measurement methods. This enables efficient and accurate calculation of the volume and maximum diameter of spherical fruits.

CN121677555APending Publication Date: 2026-03-17ZHEJIANG FORESTRY UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Traditional methods for measuring spherical fruits are inefficient, easily damage the fruit, and cannot accurately obtain three-dimensional shape. Existing machine vision methods lack depth information, resulting in large errors in volume calculation, which makes it difficult to meet the requirements of high-quality grading.

Method used

The method of rotation axis optimization and blind zone completion is adopted. By generating a specific sinusoidal fringe pattern, a high-precision three-dimensional point cloud is generated by combining the phase shift method, the multi-frequency heterodyne principle and triangulation technology. The rotation axis is calibrated by nonlinear optimization, multi-view acquisition and noise reduction are performed, the bottom blind zone is completed based on geometric constraints, and finally the volume and maximum diameter are calculated by the convex hull algorithm.

Benefits of technology

It achieves efficient and accurate three-dimensional morphological measurement, avoiding the inefficiency and damage of manual measurement, overcoming the time-consuming calculation and splicing misalignment defects of existing technologies, ensuring accurate calculation of volume and maximum diameter, and adapting to batch testing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121677555A_ABST
    Figure CN121677555A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of a sphere-like fruit measuring method combining rotating shaft optimization and blind area completion, in particular to a sphere-like fruit measuring method combining rotating shaft optimization and blind area completion, which specifically comprises the following steps that: step 1, an upper computer generates three groups of sine stripe patterns with different frequencies, and the stripe frequencies are respectively as follows: 1, the upper computer generates three groups of sine stripe patterns with different frequencies; step 2, horizontally placing the ball-like fruit on an objective table, controlling a left CCD industrial camera and a right CCD industrial camera to synchronously work with a projector, and triggering the CCD industrial cameras to synchronously collect object surface images modulated by stripes while the projector projects stripe patterns by a single chip microcomputer; according to the sphere-like fruit measuring method combining rotating shaft optimization and blind area completion, the problems existing in traditional measurement and the prior art are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of a method for measuring quasi-spherical fruits that combines rotation axis optimization and blind zone completion, and in particular to a method for measuring quasi-spherical fruits that combines rotation axis optimization and blind zone completion. Background Technology

[0002] In the quality grading and commercial distribution of spherical fruits, shape indicators such as volume and maximum diameter are the core basis for judging their quality grade and pricing standards. Precise and efficient measurement technology is crucial to the development of the industry.

[0003] Traditional measurement methods are mainly manual, requiring personnel to manually obtain data using tools such as calipers and measuring cups. This is not only inefficient and unable to meet the batch testing needs of large-scale production, but also prone to causing damage such as squeezing and scratching to the surface of the fruit during the operation, affecting the commercial value of the product.

[0004] With the development of machine vision technology, measurement methods based on two-dimensional images have been gradually applied. However, such methods can only obtain planar projection information of objects and lack key depth dimension data. They cannot accurately restore the three-dimensional shape of fruits, resulting in large errors in volume calculation and making it difficult to meet the accuracy requirements of high-quality grading. Summary of the Invention

[0005] To address the technical problems mentioned in the background art, the present invention provides a method for measuring spherical fruits that combines rotation axis optimization and blind zone completion.

[0006] The technical solution adopted in this invention is: a method for measuring spherical fruits that combines rotation axis optimization and blind zone completion, specifically including the following steps: Step 1: The host computer generates three sets of sinusoidal fringe patterns with different frequencies, the fringe frequencies being respectively... , , ; Step 2: Place the spherical fruit horizontally on the platform, and control the two CCD industrial cameras on the left and right to work synchronously with the projector. While the projector projects the striped pattern, the microcontroller triggers the CCD industrial cameras to synchronously acquire the image of the object surface modulated by the stripes. Step 3: Based on the phase-shifting method principle, using... The phase shift formula is used to calculate the wrapping phase map at each frequency. Then, the multi-frequency heterodyne principle is used to perform phase expansion on the wrapping phases of three different frequencies to obtain a continuous absolute phase distribution. Finally, the absolute phase is mapped to three-dimensional spatial coordinates by combining the calibration parameters of the binocular structured light system and the triangulation principle to generate a high-precision three-dimensional point cloud model of the target under test. Step 4: Based on the high-precision calibration of the rotary axis using nonlinear optimization, calibrate the rotary axis parameters of the rotary table system; Step 5: Control the rotating platform to rotate and collect the spherical fruit to be tested. Original point cloud from each perspective, at intervals To reduce data redundancy, the point cloud at each viewpoint is downsampled using a voxel grid. Then, a statistical filter is used to remove outliers: the distance from each point to its corresponding voxel grid is calculated. The average distance between the nearest neighbors ,like If so, then remove it; Step 6: For the bottom contact surface of spherical fruits that cannot be scanned by structured light, implement a completion method based on geometric constraints; Step 7: Construct a complete point cloud using the QuickHull algorithm The 3D convex hull, composed of a series of tetrahedral simplexes, represents the volume of a spherical fruit. That is, the sum of the volumes of all tetrahedrons.

[0007] In one embodiment, in step 1, the light intensity expression for each group of phase-shifted fringe patterns is: ; in Represents pixel coordinates Place, No. The light intensity values ​​of the phase-shifted fringe pattern; Represents the pixel coordinates on the image plane of a projector or CCD industrial camera; This represents the average light intensity of the image; This indicates the intensity modulation amplitude of the sine stripes; Indicates the frequency of the sine stripes. Denotes the phase value to be solved, where , indicating the total number of steps in the phase-shifting method; the projector's projected , . , of which , indicating the index number of the current phase shift diagram; For the first The phase shift of the image and the expression for the light intensity signal follow the standard. Step phase shift formula.

[0008] In one embodiment, in step 2, the image acquisition process is carried out in a darkroom environment, and light-absorbing material is laid out within the field of view; after the acquisition is completed, the original image data is subjected to epipolar correction processing, the two-dimensional search matching is simplified to a one-dimensional search, and the corrected image data is saved. The system adopts a hardware-triggered synchronization mode, the specific method of which is as follows: The microcontroller acts as the main control unit. While sending projection commands to the projector, it also sends TTL level trigger signals to the left and right CCD industrial cameras through the I / O ports. The exposure time of the CCD industrial cameras is set to an integer multiple of the projector's refresh cycle. The images acquired by the left and right CCD industrial cameras strictly correspond to the same structured light stripe.

[0009] In one embodiment, in step 3, based on the phase-shifting method principle, using... The phase-shift formula is used to calculate the wrap-around phase diagram at each frequency group. The formula is as follows: ; in, Indicated in pixels The calculated package phase has a value range limited to [value range]. The distribution is serrated; This indicates the number of images actually captured by the CCD industrial camera. Amplitude phase-shifted images at pixels grayscale value at that location The summation symbol is used to represent the summation of terms. From 0 to Accumulate. This represents the arctangent function, used to extract the phase angle from the sine and cosine components.

[0010] In one embodiment, step 4 employs a two-stage strategy of initial value estimation and nonlinear optimization: The first step is data acquisition and initial value estimation, which involves setting up the equipment on the rotating table. A marker point controls the rotation of the turntable. From the first angle, extract the first... The set of three-dimensional coordinates of a marker point at all angles ; Calculate the first The covariance matrix of the motion trajectory of each marker point : ; in Let this point be the centroid of the trajectory. Indicates the first The covariance matrix of the trajectory of a marker point in space is used to describe the discreteness and directionality of the point's position distribution; This indicates the total number of angles the rotating platform rotates, which is equivalent to the number of shooting angles. The index represents the rotation angle, with values ​​ranging from 1 to... ; Indicates the first The marker point at the th Three-dimensional spatial coordinate vectors under rotation angles ; The transpose operation represents a matrix or vector; When calculating the initial values ​​of the rotation axis direction, construct the covariance matrix. The physical meaning is to minimize the sum of squared distances from all marked trajectory points to the fitting plane; for the covariance matrix After performing singular value decomposition, its eigenvalues These represent the dispersion of the point set in the three principal directions; the minimum eigenvalue is selected. Corresponding feature vector As an initial estimate of the rotation axis direction, it provides a highly reliable convergence starting point for subsequent nonlinear optimization; Singular value decomposition is performed on the sum of the covariance matrices of all marked points, and the right singular vector corresponding to the smallest singular value is taken as the initial estimate of the rotation axis direction vector. ; Next, a nonlinear optimization model is constructed, and a nonlinear optimization objective function is established. ,in It is a unit direction vector. Let the pivot point be on the axis; the objective is to minimize the distance residual between the theoretical position and the actual measured position of the reference point rotated about the axis. ; in, Indicates the variable and Find the minimum value of the objective function. Represents the unit direction vector of the rotation axis to be optimized. And satisfy , Let be the three-dimensional coordinates of any point on the rotation axis to be optimized. , This indicates the total number of marked points. Indicates the first The rotation angle of the rotary table relative to its initial position during the next data acquisition; Indicates the first The measured three-dimensional coordinates of each marker point at its initial position; Indicates the first The marker point at the th Measured three-dimensional coordinates at each angle; This is the Rodriguez rotation transformation function, used to calculate the point. Around the axis Rotation Theoretical coordinates after : ; The Huber robust loss function is used to suppress the interference of outlier noise on calibration accuracy.

[0011]

[0012] The above model is solved iteratively using a sequential quadratic programming algorithm to obtain the globally optimal rotation axis parameters. ; This represents the distance residual between the theoretical projection point and the actual measurement point; This represents the robustness threshold.

[0013] In one embodiment, step 5 is specifically as follows: When denoising the original point cloud, a statistical outlier removal algorithm is used; The specific steps are as follows: For each point in the point cloud... Search its nearest Given a neighborhood of points, calculate the distance from that point to this neighborhood. The average distance of each neighboring point Calculate the mean of all average distances. and standard deviation Set a standard deviation multiple threshold. If the average distance of a certain point If it is an outlier, it will be identified as an outlier and removed. Using the optimized rotation axis parameters obtained in step 4 , will the Point cloud collection from multiple perspectives To uniformly transform to the initial 0-degree coordinate system, the transformation formula is the inverse rotation: ; By using a point cloud merging algorithm, the union of all transformed point cloud sets is obtained to get a preliminary panoramic point cloud of the spherical fruit. ; Indicates the first The point cloud set after transforming the point cloud from each viewpoint to the global reference coordinate system; Indicates the first A collection of raw point clouds collected from various perspectives; As above, this represents the Rodriguez rotation transformation function; This represents the globally optimal rotation axis direction and pivot point obtained from the optimization solution in step 4; This indicates the reverse rotation angle; if the data was rotated during acquisition... Then, the parts need to be rotated in the opposite direction during assembly. Return to the initial state.

[0014] In one embodiment, step 6 is specifically as follows: First, calculate the straight line of the axis of rotation. The spatial intersection with the preset support plane is used to solve for the parameters by solving a simultaneous equation. : ; The parameters in the equation of the line representing the axis of rotation The value corresponds to the position of the intersection of the rotation axis and the support plane. Indicates the optimized pivot point of Axial components, Indicates the optimized rotation axis direction of Axial components, This represents the calculated three-dimensional coordinates of the bottom completion center point, i.e., the center of the circular cover plate; Obtain the coordinates of the completed center: ; by Centered on a circle, generate a circle with radius r on a plane perpendicular to the axis of rotation. Dense circular point clouds Its point coordinates satisfy: ; Will and Merge to form a closed, complete 3D point cloud model. ; This represents the manually set completion radius, in this example. ; The parameter angle represents the angle used to generate the circle, and its value range is... .

[0015] In one embodiment, step 7 is specifically as follows: Spherical fruit volume calculate: ; in To constitute the first The coordinates of the vertices of a tetrahedron are typically formed by a triangular facet on the convex hull surface and a reference point inside the object. This represents the calculated total volume of the object. This represents the index of a tetrahedral element in a convex hull mesh. Indicates the first The volume of a tiny tetrahedron Indicates from vertex Position vectors pointing to other vertices; Principal Component Analysis (PCA) is used to construct a directed bounding box (OBB) to calculate the maximum diameter; first, the covariance matrix of the point cloud is calculated. : ; This represents the total number of point cloud points involved in the calculation; This represents the loop index variable in the summation operation, with a value range from 1 to... , represents traversing each point; Represents the geometric center vector of all point cloud data; Indicates the first The deviation vector of each point relative to the geometric center; Indicates the Bessel correction factor; right Eigenvalue decomposition yields three orthogonal eigenvectors. Project the point cloud onto these three directions and calculate the span in each direction; the longest side of the OBB is the maximum diameter of the spherical fruit. ; ; The indices represent the principal component directions; 1, 2, and 3 represent the three orthogonal principal axis directions, respectively. In the complete point cloud model, the first... The coordinate vector of a point, This represents the first term obtained through principal component analysis. 1 eigenvector Point In the main direction The projected length on, This represents the maximum span of the point cloud in a certain main direction.

[0016] The beneficial effects of this invention are as follows: Compared with the prior art, the proposed method for measuring spherical fruits, which combines rotation axis optimization and blind zone completion, effectively solves many problems existing in traditional measurement and current technologies. This method first generates a specific sinusoidal fringe pattern using a host computer to provide accurate basic data for subsequent measurements. Then, through darkroom environment acquisition, epipolar correction, and hardware synchronous triggering, a high-quality image of the object's surface is obtained, avoiding environmental interference and phase misalignment. By utilizing the phase-shifting method, multi-frequency heterodyne principle, and triangulation technology, a high-precision three-dimensional point cloud is successfully generated, overcoming the limitation of two-dimensional images lacking depth information. Furthermore, through SVD initial value estimation and nonlinear analysis with Huber loss function... A performance optimization model is used to achieve high-precision calibration of the rotation axis, overcoming the shortcomings of traditional calibration such as weak noise resistance and easy occurrence of splicing layer ghosting, ensuring accurate splicing of multi-view point clouds. After multi-view acquisition, downsampling denoising and inverse rotation transformation, a preliminary panoramic point cloud is obtained. Then, based on the geometric constraints of the rotation axis, the bottom blind area is filled to form a closed and complete 3D model, solving the problem of volume measurement deviation caused by missing bottom data. Finally, the OBB is constructed by convex hull algorithm and PCA to achieve accurate automatic calculation of volume and maximum diameter. The entire process does not require manual intervention, which avoids the problems of low efficiency and easy damage to fruit by manual measurement, and overcomes the drawbacks of existing technology such as time-consuming calculation and splicing misalignment, significantly improving efficiency. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the core principle of high-precision calibration of the rotating shaft in this invention; Figure 2 This is a preliminary panoramic point cloud 3D coordinate distribution map after multi-view point cloud stitching in this invention; Figure 3 This is a complete 3D point cloud model distribution diagram after the bottom blind area is filled in in this invention; Figure 4 This is a visualization of a 3D convex hull mesh constructed based on a complete point cloud in this invention; Figure 5 This is a schematic diagram of the oriented bounding box and its maximum diameter in this invention. Detailed Implementation

[0018] In the description of this invention, it should be noted that the terms "front", "up", "down", "left", "right", "vertical", "horizontal", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0019] To address the problems existing in the background technology, this application proposes the following technical solution: a method for measuring spherical fruits that combines rotation axis optimization and blind zone completion, the steps of which are as follows: The host computer generates three sets of sinusoidal fringe patterns with different frequencies, the fringe frequencies being respectively... , , ; In this example, the light intensity expression for each set of phase-shifted fringe patterns is: ; in Represents pixel coordinates Place, No. The light intensity values ​​of the phase-shifted fringe pattern; Represents the pixel coordinates on the image plane of a projector or CCD industrial camera; It represents the average light intensity of the image, i.e., the DC component, which is affected by ambient light and the reflectivity of the object's surface; The intensity modulation amplitude of the sinusoidal fringes, i.e., the alternating current component; Indicates the frequency of the sine stripes. This represents the phase value to be solved; to ensure measurement accuracy, this embodiment uses... The step-by-step phase shift method, in which , indicating the total number of steps in the phase-shifting method; the projector's projected , . , of which , indicating the index number of the current phase shift diagram; For the first The phase shift of the image and the expression for the light intensity signal follow the standard. Step phase shift formula; In the above technical solution: Step 1, by generating a specific sinusoidal fringe pattern, lays a high-precision data foundation for the entire measurement process. In traditional measurement methods, irregularities in the basic pattern can easily lead to deviations in subsequent phase calculations. However, the three sets of different frequency stripes generated in this step can effectively adapt to the surface characteristics of spherical fruits (such as apples), reducing the interference of ambient light and the reflectivity of the object's surface on the light intensity signal, making the light intensity distribution more in line with the needs of phase calculation. This standardized fringe pattern design avoids phase extraction errors caused by unreasonable pattern parameters, providing a reliable prerequisite for obtaining accurate wrapping phase through the phase shift method. It improves the accuracy of the entire measurement system from the source, overcoming the shortcomings of traditional two-dimensional image measurement, which lacks depth information and cannot accurately capture the surface features of objects, ensuring the consistency and accuracy of the data source for subsequent three-dimensional point cloud generation.

[0020] Step 2: Place the spherical fruit horizontally on the platform, and control the two CCD industrial cameras on the left and right to work synchronously with the projector. The angle of the CCD industrial cameras should be approximately 20 degrees. 0The CCD industrial camera has a resolution of 2592×1944; while the projector projects the stripe pattern, the microcontroller triggers the CCD industrial camera to synchronously acquire the image of the object surface modulated by the stripes. To eliminate ambient light interference, the image acquisition process is carried out in a darkroom environment, and light-absorbing material is laid out within the field of view to ensure that the projector is the only main light source. After the acquisition is completed, the original image data is subjected to epipolar correction processing, which simplifies the two-dimensional search matching to a one-dimensional search, and the corrected image data is saved. To ensure the accuracy of phase calculation and prevent phase misalignment caused by slight object movement, the system adopts a hardware-triggered synchronization mode. Specifically, the microcontroller acts as the main control unit, sending projection commands to the projector while simultaneously sending TTL-level trigger signals to the left and right CCD industrial cameras via I / O ports. The exposure time of the CCD industrial cameras is set to an integer multiple of the projector's refresh cycle to eliminate flicker effects and ensure that the images acquired by the left and right CCD industrial cameras strictly correspond to the same structured light stripe.

[0021] In the above technical solution, step 2 effectively solves the problems of environmental interference, poor synchronization, and complex matching in traditional acquisition processes by optimizing the image acquisition and correction process. The dark box environment and light-absorbing materials completely eliminate the interference of ambient light on image acquisition, ensuring that the projector is the only main light source, allowing the acquired image to truly reflect the surface features of the object after stripe modulation. The hardware-triggered synchronization mode avoids phase misalignment caused by slight object shaking and flicker effects, ensuring that the images acquired by the left and right cameras strictly correspond to the stripes projected by the projector, improving image synchronization and consistency. Epipolar correction simplifies two-dimensional search matching to one-dimensional, significantly reducing the complexity of subsequent image processing and improving processing efficiency, while retaining key image feature information, providing high-quality image data for subsequent phase calculation and 3D point cloud generation, and avoiding measurement errors caused by image quality issues.

[0022] Step 3: Based on the principle of phase shifting, using... The phase shift formula is used to calculate the wrapping phase map at each frequency group; then, the multi-frequency heterodyne principle is used to perform phase expansion on the wrapping phases of three different frequencies to obtain a continuous absolute phase distribution; finally, the absolute phase is mapped to three-dimensional spatial coordinates by combining the calibration parameters of the binocular structured light system and the triangulation principle to generate a high-precision three-dimensional point cloud model of the target under test. In this example, the wrap-around phase at each frequency can be calculated using the following formula: ; in, Indicated in pixels The calculated wrap-around phase; due to the properties of the arctangent function, its range of values ​​is limited to... The distribution is serrated; This indicates the number of images actually captured by the CCD industrial camera. Amplitude phase-shifted images at pixels The grayscale value at that location; The summation symbol is used to represent the summation of terms. From 0 to

[0023] Accumulate; This represents the arctangent function, used to extract the phase angle from the sine and cosine components; in this example, N=12.

[0024] In the above technical solution, step 3, by combining the phase-shifting method with the multi-frequency heterodyne principle, successfully solves the problems of phase discontinuity and difficulty in obtaining absolute phase in traditional 3D reconstruction. The calculation of the wrapped phase can accurately extract phase information from the image, while the multi-frequency heterodyne principle effectively overcomes the limitations of the wrapped phase value, obtaining a continuous absolute phase distribution and ensuring that the phase information can completely reflect the 3D features of the object's surface. Combining the calibration parameters of the binocular structured light system with the triangulation principle, the absolute phase is mapped to 3D spatial coordinates, achieving accurate conversion from 2D images to 3D point clouds, overcoming the deficiency of depth information in machine vision methods based on 2D images. The generated high-precision 3D point cloud model can realistically reproduce the surface morphology of spherical fruits, providing accurate 3D data support for subsequent steps such as rotation axis calibration and point cloud stitching, avoiding subsequent measurement deviations caused by insufficient point cloud accuracy.

[0025] Step 4: High-precision calibration of the rotation axis based on nonlinear optimization. To achieve accurate stitching of multi-view point clouds, the rotation axis parameters of the rotary table system need to be calibrated. This step adopts a two-level strategy of initial value estimation and nonlinear optimization. The first step is data acquisition and initial value estimation, which involves setting up the equipment on the rotating table. There are 1 marker point in this example. Control the rotation of the rotary table From the first angle, extract the first... The set of three-dimensional coordinates of a marker point at all angles ; Calculate the first The covariance matrix of the motion trajectory of each marker point : ; in Let this point be the centroid of the trajectory. Indicates the first The covariance matrix of the trajectory of a marker point in space is used to describe the discreteness and directionality of the point's position distribution; This indicates the total number of angles the rotating platform rotates, which is equivalent to the number of shooting angles. The index represents the rotation angle, with values ​​ranging from 1 to... ; Indicates the first The marker point at the th Three-dimensional spatial coordinate vectors under rotation angles ; The transpose operation represents a matrix or vector; When calculating the initial values ​​of the rotation axis direction, construct the covariance matrix. The physical meaning is to minimize the sum of squared distances from all marked point trajectory points to the fitting plane; specifically, for the covariance matrix... After performing singular value decomposition, its eigenvalues These represent the dispersion of the point set in the three principal directions; since the rotation trajectory is approximately a planar circle, its dispersion in the normal vector direction should theoretically be 0; therefore, the minimum eigenvalue is selected. Corresponding feature vector As an initial estimate of the rotation axis direction, it can provide a highly reliable convergence starting point for subsequent nonlinear optimization; Singular value decomposition is performed on the sum of the covariance matrices of all marked points, and the right singular vector corresponding to the smallest singular value is taken as the initial estimate of the rotation axis direction vector. ; Next, a nonlinear optimization model is constructed. To eliminate the influence of measurement noise, a nonlinear optimization objective function is established. ,in It is a unit direction vector. Let the pivot point be on the axis; the objective is to minimize the distance residual between the theoretical position and the actual measured position of the reference point rotated about the axis. ; in, Indicates the variable and Find the minimum value of the objective function. Represents the unit direction vector of the rotation axis to be optimized. And satisfy , Let be the three-dimensional coordinates of any point on the rotation axis to be optimized. , This indicates the total number of markers; in this example, it is 13. Indicates the first The rotation angle of the rotary table relative to its initial position during the next data acquisition; Indicates the first The measured three-dimensional coordinates of each marker point at its initial position; Indicates the first The marker point at the th Measured three-dimensional coordinates at each angle; This is the Rodriguez rotation transformation function, used to calculate the point. Around the axis Rotation Theoretical coordinates after : ; The Huber robust loss function is used to suppress the interference of outlier noise on calibration accuracy.

[0026] ; The above model is solved iteratively using a sequential quadratic programming algorithm to obtain the globally optimal rotation axis parameters. ; This represents the distance residual between the theoretical projection point and the actual measurement point; This represents the robustness threshold, which is set to 1.0 in this embodiment. When the error is less than this threshold, the squared error is used; when the error is greater than this threshold, the linear error is used. In the above technical solution, the high-precision calibration of the rotation axis in step 4 effectively overcomes the problems of limited calibration accuracy and weak anti-noise interference in existing solutions. Traditional linear fitting algorithms are easily affected by noise, leading to inaccurate rotation axis parameters, which in turn causes problems such as layering and ghosting in point cloud stitching. However, the two-level strategy of initial value estimation and nonlinear optimization adopted in this step obtains reliable initial parameters through the SVD method, providing a good starting point for subsequent optimization. The nonlinear optimization model with Huber robust loss function can effectively suppress the interference of outlier noise points, avoid the calibration process from getting trapped in local optima, and ensure that the globally optimal rotation axis parameters are obtained through iterative solution. Accurate rotation axis parameters provide a core guarantee for multi-view point cloud stitching, enabling seamless stitching of point clouds from different perspectives, completely solving problems such as misalignment and ghosting in traditional stitching, significantly improving the integrity and accuracy of point cloud stitching, and laying a key foundation for the subsequent construction of a complete 3D model.

[0027] Step 5: Control the rotating platform to rotate and collect the spherical fruit to be tested. The original point cloud from one perspective, in this example ,interval Voxel mesh downsampling is performed on the point cloud for each viewpoint to reduce data redundancy; then, a statistical filter is used to remove outliers: the distance from each point to its corresponding viewpoint is calculated. The average distance between the nearest neighbors ,like If so, then remove it; When denoising the original point cloud, a statistical outlier removal algorithm is used; the specific steps are as follows: for each point in the point cloud... Search its nearest 1 neighboring point, in this embodiment ; Calculate the distance from this point to this The average distance of each neighboring point Calculate the mean of all average distances. and standard deviation Set a standard deviation multiple threshold. This example If the average distance of a certain point If the noise is out of place, it is identified as an outlier and removed. This method can adaptively identify and remove discrete noise points floating around an object while preserving the high-frequency features of the object's surface. Using the optimized rotation axis parameters obtained in step 4 , will the Point cloud collection from multiple perspectives The coordinates are uniformly transformed to the initial 0-degree coordinate system; the transformation formula is a reverse rotation: ; By using a point cloud merging algorithm, the union of all transformed point cloud sets is obtained to get a preliminary panoramic point cloud of the spherical fruit. ; Indicates the first The point cloud set after transforming the point cloud from each viewpoint to the global reference coordinate system; Indicates the first A collection of raw point clouds collected from various perspectives; As above, this represents the Rodriguez rotation transformation function; This represents the globally optimal rotation axis direction and pivot point obtained from the optimization solution in step 4; This indicates the reverse rotation angle; if the data was rotated during acquisition... Then, the parts need to be rotated in the opposite direction during assembly. Return to the initial state; In the above technical solution, the multi-view point cloud stitching process in step 5 effectively solves the blind spot problem in single-view scanning, while improving the quality and usability of point cloud data. Multi-view acquisition can cover most of the surface of spherical fruits, breaking the limitation of single-view in not being able to fully capture the shape of objects; voxel grid downsampling reduces data redundancy, improves the efficiency of subsequent processing, and avoids the interference of redundant data on calculation accuracy; statistical filter denoising can adaptively identify and remove discrete noise points, retain the high-frequency features of the object surface, and ensure the purity of point cloud data. The inverse rotation transformation, through optimized rotation axis parameters, unifies point clouds from different views to the same coordinate system, ensuring the consistency and coherence of point cloud stitching. The merged preliminary panoramic point cloud can completely present the main outline of the fruit, providing high-quality basic data for subsequent bottom blind spot completion, overcoming the problems of data disorder and insufficient effective information in traditional point cloud stitching, and improving the integrity and reliability of point clouds.

[0028] Step 6: For the bottom contact surface of spherical fruits that cannot be scanned by structured light, implement a geometric constraint-based completion method. First, calculate the rotation axis line. The spatial intersection with the preset support plane, in this example, is Solving for parameters using simultaneous equations : ; The parameters in the equation of the line representing the axis of rotation The value corresponds to the position of the intersection of the rotation axis and the support plane. Indicates the optimized pivot point of Axial components, Indicates the optimized rotation axis direction of Axial components, This represents the calculated three-dimensional coordinates of the bottom completion center point, i.e., the center of the circular cover plate; Obtain the coordinates of the completed center: ; by Centered on a circle, generate a circle with radius r on a plane perpendicular to the axis of rotation. Dense circular point clouds Its point coordinates satisfy: ; Will and Merge to form a closed, complete 3D point cloud model. ; This represents the manually set completion radius, in this example. ; The parameter angle represents the angle used to generate the circle, and its value range is... ; In the above technical solution, the bottom blind spot completion strategy in step 6 successfully solves the industry pain point of the inability to scan the bottom contact surface during rotational scanning. Traditional measurement methods often ignore missing bottom data, resulting in volume measurement results that are significantly smaller than the true value. However, this step, based on the geometric constraints of the rotation axis, can accurately locate the center position of the bottom completion, ensuring that the generated circular point cloud perfectly matches the bottom edge of the fruit. The generated dense circular point cloud fills the bottom blind spot, allowing the initial panoramic point cloud to form a closed and complete 3D model, completely solving the problem of volume calculation deviation caused by missing data. This geometric constraint-based completion method does not require complex model fitting, simplifies the process while ensuring completion accuracy, and ensures that the completed point cloud can truly reflect the complete shape of the fruit, providing complete and accurate data support for subsequent volume calculation, significantly improving the accuracy of volume measurement, and overcoming the defect of existing solutions that cannot repair the bottom blind spot.

[0029] Step 7: Construct a complete point cloud using the QuickHull algorithm. The 3D convex hull; the convex hull is composed of a series of tetrahedral simplexes, and the volume of a spherical fruit is... That is, the sum of the volumes of all tetrahedrons: ; in To constitute the first The coordinates of the vertices of a tetrahedron are typically formed by a triangular facet on the convex hull surface and a reference point inside the object. This represents the calculated total volume of the object. This represents the index of a tetrahedral element in a convex hull mesh. Indicates the first The volume of a tiny tetrahedron Indicates from vertex Position vectors pointing to other vertices; Principal Component Analysis (PCA) is used to construct a directed bounding box (OBB) to calculate the maximum diameter; first, the covariance matrix of the point cloud is calculated. : ; This indicates the total number of points in the point cloud participating in the calculation; in this embodiment, it refers to the total number of points contained in the complete spherical fruit point cloud model after completion. This represents the loop index variable in the summation operation, with a value range from 1 to... , represents traversing each point; This represents the geometric center vector of all point cloud data; it is the arithmetic mean of the coordinates of all points. Indicates the first The deviation vector of each point relative to the geometric center; this step is to eliminate the influence of the coordinate origin position on the distribution calculation; This represents the Bessel correction factor, which in statistics is used to obtain an unbiased estimate of the population variance. The denominator uses... Instead ; right Eigenvalue decomposition yields three orthogonal eigenvectors. Project the point cloud onto these three directions and calculate the span in each direction; the longest side of the OBB is the maximum diameter of the spherical fruit.

[0030] ; The indices represent the principal component directions; 1, 2, and 3 represent the three orthogonal principal axis directions, respectively. In the complete point cloud model, the first... The coordinate vector of a point, This represents the first term obtained through principal component analysis. 1 eigenvector Point In the main direction The projected length on, This represents the maximum span of the point cloud in a certain main direction, i.e., the length in that direction.

[0031] In the above technical solution, the volume and maximum diameter calculation method in step 7 achieves accurate and automated measurement of key indicators of the shape of spherical fruits. Traditional manual measurement is inefficient and easily damages the fruit, while existing machine measurement methods suffer from insufficient accuracy. However, the QuickHull algorithm used in this step transforms volume calculation into tetrahedral volume summation by constructing a three-dimensional convex hull, accurately capturing the true contour of the fruit and avoiding volume calculation errors caused by incomplete models. Principal component analysis combined with the directed bounding box method can accurately extract the maximum diameter of the fruit, unaffected by the object's placement angle, overcoming the defect of axis-aligned bounding boxes having large errors when the object is not properly positioned. The entire calculation process requires no manual intervention, realizing automated conversion from point cloud data to key indicators. This improves measurement efficiency and ensures data accuracy and consistency, perfectly adapting to batch testing needs. It provides reliable shape indicators for the quality grading of spherical fruits, completely solving the problems of low efficiency, poor accuracy, and easy damage to fruit caused by traditional measurement methods.

[0032] In summary, the proposed method for measuring spherical fruits, combining rotation axis optimization and blind zone completion, effectively solves many problems existing in traditional measurement and current technologies. This method first generates a specific sinusoidal fringe pattern via a host computer, providing accurate basic data for subsequent measurements. Then, through darkroom environment acquisition, epipolar correction, and hardware synchronous triggering, high-quality object surface images are obtained, avoiding environmental interference and phase misalignment. Utilizing phase-shifting, multi-frequency heterodyne principles, and triangulation techniques, a high-precision 3D point cloud is successfully generated, overcoming the limitation of 2D images lacking depth information. Through SVD initial value estimation and a nonlinear optimization model containing the Huber loss function, high-precision rotation axis calibration is achieved, overcoming the shortcomings of traditional calibration such as weak noise resistance and easy splicing and ghosting, ensuring accurate splicing of multi-view point clouds. After multi-view acquisition, downsampling denoising, and inverse rotation transformation, a preliminary panoramic point cloud is obtained. Then, based on the geometric constraints of the rotation axis, the bottom blind zone is completed, forming a closed and complete 3D model, solving the volume measurement deviation problem caused by missing bottom data. Finally, an OBB is constructed using the convex hull algorithm and PCA to achieve accurate automatic calculation of volume and maximum diameter. The entire process requires no manual intervention, which avoids the problems of low efficiency and easy damage to fruit caused by manual measurement, and overcomes the drawbacks of existing technologies such as time-consuming calculation and misalignment of splicing. It significantly improves measurement accuracy and efficiency, adapts to the needs of batch testing, and provides a reliable morphological index for the quality grading of spherical fruits.

[0033] Although embodiments of the invention have been shown and described, the scope of the invention will be defined by the appended claims and their equivalents by those skilled in the art.

Claims

1. A method for measuring spheroid-like fruits combining rotation axis optimization and blind zone completion, characterized in that, Specifically comprising the following steps: Step 1: The host computer generates three groups of sinusoidal fringe patterns with different frequencies, and the fringe frequencies are , , ; Step 2: Place the spheroid-like fruit horizontally on the stage, control the left and right CCD industrial cameras to work synchronously with the projector, and trigger the CCD industrial cameras to synchronously collect the object surface images modulated by the stripe pattern at the same time when the projector projects the stripe pattern; Step 3: Based on the principle of phase shift method, using The wrapped phase map under each frequency is calculated by the phase shift formula, then, the wrapped phase of three different frequencies is phase-unwrapped by the principle of multi-frequency heterodyne, so as to obtain the continuous absolute phase distribution, finally, the absolute phase is mapped to the three-dimensional space coordinates combined with the calibration parameters of the binocular structured light system and the principle of triangulation, and the high-precision three-dimensional point cloud model of the target to be measured is generated. Step 4: Calibrate the rotation axis parameters of the rotation table system based on the high-precision rotation axis calibration of nonlinear optimization; Step 5: Control the rotating table to rotate the to-be-tested spheroid fruit to collect the original point cloud of each view, interval , voxel grid down-sampling is performed on the point cloud of each view to reduce data redundancy, and then a statistical filter is used to remove outliers: the average distance of each point to its nearest neighbor point is calculated , if , it is removed; Step 6: Implement a geometric constraint-based completion method for the bottom contact surface of the spheroid-like fruit that cannot be scanned by the structured light; Step 7: Construct the complete point cloud using the QuickHull algorithm The three-dimensional convex hull of the fruit volume is constructed using the QuickHull algorithm, which is a fast algorithm for computing the convex hull of a finite set of points in the d-dimensional space. The convex hull is composed of a series of tetrahedral simplices, and the volume of the fruit is the sum of the volumes of all the tetrahedrons. The three-dimensional convex hull of the fruit volume is constructed using the QuickHull algorithm, which is a fast algorithm for computing the convex hull of a finite set of points in the d 2. The method of claim 1, wherein the method is characterized by, In step 1, the light intensity expression of each group of phase-shifted stripe patterns is: ; wherein represents the pixel coordinate at the light intensity value of the step phase fringe pattern; represents the pixel coordinate on the image plane of the projector or CCD industrial camera; represents the average light intensity of the image; represents the light intensity modulation amplitude of the sinusoidal fringe; represents the frequency of the sinusoidal fringe, represents the phase value to be solved, wherein represents the total number of steps of the phase shifting method; the amplitude, wherein represents the index number of the current phase shifting pattern; is the phase shifting amount of the image, the light intensity signal expression follows the standard step phase formula.

3. The method of claim 2, wherein the method is characterized by, In step 2, the image acquisition process is carried out in a dark box environment, and light-absorbing material is laid in the field of view; After the acquisition is completed, the original image data is processed by epipolar correction, the two-dimensional search matching is simplified to one-dimensional search, and the corrected image data is saved; The system adopts a hardware trigger synchronization mode, and the specific method is: The single-chip microcomputer sends TTL level trigger signals to the left and right CCD industrial cameras through the I / O port while sending projection instructions to the projector, the exposure time of the CCD industrial camera is set to an integer multiple of the refresh period of the projector, and the images collected by the left and right CCD industrial cameras strictly correspond to the same structured light stripe.

4. The method of claim 3, wherein the method is characterized by, In step 3, based on the principle of phase shift method, the wrapped phase map at each frequency is calculated using The phase shift formula is used to calculate the wrapped phase map at each frequency, which is: ; wherein, represents the wrapped phase calculated at pixel , whose value range is limited between , presenting a sawtooth distribution; represents the gray value of the first phase-shifted image actually captured by the CCD industrial camera at pixel , represents the summation symbol, which is accumulated from 0 to , , represents the arctangent function, which is used to extract the phase angle from the sine component and the cosine component.

5. The spheroid-like fruit measurement method combining rotation axis optimization and blind area completion according to claim 4, characterized in that, In step 4, a two-stage strategy of initial value estimation and nonlinear optimization is adopted: First, the data acquisition and initial value estimation, on the rotary table arrangement a marker point, control rotary table rotation an angle, extract the first a set of three-dimensional coordinates of the marker point at all angles ; Computing the covariance matrix of the motion trajectory of the :​ ; wherein is the trajectory centroid of the point; denotes the covariance matrix of the motion trajectory of the th marker point in space, which is used to describe the dispersion and directionality of the position distribution of the point; denotes the total number of rotation angles of the rotation table, i.e. the number of perspectives of the shooting; denotes the index of the rotation angle, which takes a value ranging from 1 to ; denotes the three-dimensional space coordinate vector of the th marker point at the th rotation angle ; denotes the transpose operation of a matrix or a vector; In the calculation of the initial value of the rotation axis direction, a covariance matrix is constructed The physical meaning of the covariance matrix is to minimize the sum of the squares of the distances from all the marker points to the fitting plane; after singular value decomposition of the covariance matrix The eigenvalues respectively represent the dispersion of the point set in three principal directions; the smallest eigenvalue corresponding eigenvector is selected as the initial estimate of the rotation axis direction, providing a high-reliability convergence starting point for subsequent nonlinear optimization; The sum of the covariance matrices of all the marked points is singular value decomposed, and the right singular vector corresponding to the minimum singular value is taken as the initial estimation value of the rotation axis direction vector ; A nonlinear optimization model is then constructed, constructing a nonlinear optimization objective function , where is a unit direction vector, is the pivot point on the axis; the goal is to minimize the distance residual between the theoretical position and the actual measured position of the reference point rotating around the axis: ; wherein, denotes the variable and finds the minimum of the objective function, denotes the unit direction vector of the rotation axis to be optimized , and satisfies , is the three-dimensional coordinate of an arbitrary point on the rotation axis to be optimized , denotes the total number of marker points, denotes the rotation angle of the rotating table relative to the initial position at the time of acquisition; denotes the measured three-dimensional coordinate of the marker point at the initial position; denotes the measured three-dimensional coordinate of the marker point at the angle; is the Rodrigues rotation transformation function for calculating the theoretical coordinates of the point after rotation around the axis by an angle : ; Huber robust loss function for suppressing the disturbance of outlier noise on the calibration accuracy, ; ; The sequence quadratic programming algorithm is used to iteratively solve the above model to obtain the globally optimal rotating shaft parameter ; represents the distance residual between the theoretical projection point and the actual measurement point; represents the robust threshold value.

6. The method of claim 5, wherein the method is characterized by, In step 5, the specific method is as follows: When denoising the original point cloud, a statistical outlier removal algorithm is adopted; The specific steps are: for each point in the point cloud , search its nearest neighbor points, calculate the average distance of the point to these neighbor points ; calculate the mean and standard deviation of all average distances and standard deviations ; Setting a threshold of standard deviation multiple , if the average distance , it is determined as an outlier noise point and is removed. Using the optimized rotation axis parameters obtained in step 4 , will the Point cloud collection from multiple perspectives To uniformly transform to the initial 0-degree coordinate system, the transformation formula is the inverse rotation: ; The point cloud merging algorithm is used to merge all the transformed point clouds to obtain a preliminary panoramic point cloud of the spherical fruit ; represent the point cloud set of the point cloud transformed to the global reference coordinate system under the first viewing angle denotes the original point cloud set collected at the first view angle; denotes the Rodrigues rotation transformation function; denotes the global optimal rotation axis direction and pivot point obtained by optimization solution in step 4; denotes the inverse rotation angle; If rotated when collected then need to rotate in reverse when assembled back to original state.

7. The method of claim 6, wherein the method is characterized by, In step 6, the specific method is as follows: First, calculate the rotation axis straight line The spatial intersection with the preset support plane, simultaneous equations to solve parameters : ; a parameter in the straight line equation of the rotation axis corresponding to the intersection position of the rotation axis and the support plane, denotes the optimized pivot point of the axis component, denotes the optimized rotation axis direction of the axis component, denotes the calculated three-dimensional coordinates of the bottom completion center point, i.e. the center of the circular cover plate; The completed center coordinates are obtained: ; by Centered on a circle, generate a circle with radius r on a plane perpendicular to the axis of rotation. Dense circular point clouds Its point coordinates satisfy: ; Merging with to form a closed complete three-dimensional point cloud model ; represents a manually set completion radius, in this example ; represents a parameter angle when generating a circle, the value range is .

8. The spheroid-like fruit measurement method combining rotation axis optimization and blind area completion according to claim 7, characterized in that, In step 7, the specific method is as follows: Spheroidal fruit volume Calculation: ; wherein is the index of the tetrahedron constituting the th vertex coordinate, wherein usually a triangular facet of the convex hull surface and a reference point inside the object are taken to constitute; represents the total volume of the object calculated, represents the index of the tetrahedron unit in the convex hull mesh, represents the volume of the th micro-tetrahedron, represents the position vector from the vertex to the other vertices; The maximum diameter is calculated by using principal component analysis (PCA) to construct an oriented bounding box (OBB); first, the covariance matrix of the point cloud is calculated : ; represents the total number of points in the point cloud participating in the calculation; represents a loop index variable in the summation operation, taking values from 1 to , representing traversing each point; represents the geometric center vector of all point cloud data; represents the deviation vector of the th point relative to the geometric center; represents the Bezier correction coefficient; To perform eigen decomposition on the row, get three orthogonal eigenvectors ; project the point cloud onto these three directions, calculate the span of each direction; the longest side length of the OBB is the maximum diameter of the spheroid fruit ; ; indices representing principal directions, 1, 2, 3 represent three orthogonal principal directions respectively, coordinate vector of the i-th point in the complete point cloud model, i-th eigenvector calculated by principal component analysis, projection length of the point in the principal direction maximum span of the point cloud in a certain principal direction.​​​