Fruit edible rate online detection method and device based on sparse CT (Computed Tomography) reconstruction

By combining sparse CT reconstruction and deep learning neural networks, the problems of low efficiency, insufficient accuracy and high cost in fruit edibility detection have been solved, and high-precision, low-time-consuming automated detection has been achieved.

CN120976340APending Publication Date: 2025-11-18SOUTH CHINA UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511063318.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing technologies for detecting the edibility of fruits suffer from low detection efficiency, insufficient accuracy, and high cost, and lack the design of automated detection devices.

Method used

A sparse CT reconstruction method combined with a deep learning neural network was used to detect the edibility of fruits. Through preprocessing of X-ray projection data, CT reconstruction and 3D modeling, the sparse CT reconstruction device was used to realize the automated online detection of fruits.

Benefits of technology

It achieves high-precision and low-time-consuming automatic determination of the edible rate of fruits, improves detection efficiency and reduces costs, and has online automated detection capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976340A_ABST
    Figure CN120976340A_ABST
Patent Text Reader

Abstract

The invention discloses a fruit edible rate online detection method and device based on sparse CT reconstruction. The method comprises the following steps: carrying out multi-angle sparse X-ray projection data acquisition on a fruit; carrying out dark field and flat field correction, cutting, zooming, enhancement and normalization preprocessing on the X-ray image; complementing sparse angle data by adopting an interpolation algorithm; generating a three-dimensional CT model by using a CT reconstruction algorithm; extracting a two-dimensional slice image based on axis rotation in a CT model, and extracting pulp and whole fruit areas by adopting a deep learning semantic segmentation network; and reconstructing a segmentation result into an edible rate model, and calculating the edible rate by combining the pulp density and the whole fruit mass. The detection device comprises a radiation source, an X-ray detector, a conveyor belt, an electric rotating table, a screw rod sliding table, a clamping device and the like, and supports online automatic data acquisition. The method realizes high-precision modeling of the internal structure of the fruit and automatic measurement of the edible rate, and has the advantages of high precision, high efficiency, wide adaptability and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of non-destructive testing technology for agricultural product quality, specifically to an online detection method and device for the edibility of fruits based on sparse CT reconstruction. Background Technology

[0002] As the fruit market demands increasingly higher precision in quality grading and more efficient automated testing, traditional edible yield detection methods relying on weighing or appearance parameter modeling have significant limitations in accuracy and adaptability. CT imaging technology, as a three-dimensional reconstruction method, can directly reflect the internal structure of fruits and has been introduced into fruit testing research in recent years. However, conventional CT methods suffer from large data volumes, long processing times, and high costs, severely restricting their practical application in production lines. Therefore, developing a fruit edible yield detection solution that combines sparse projection, rapid CT reconstruction, intelligent X-ray image segmentation, and three-dimensional modeling has significant engineering value and promotional implications.

[0003] Zhang et al. (Zhang Y, Lin Y, Tian H, et al. Non-destructive evaluation of theedible rate for pomelo using X-ray imaging method[J]. Food Control, 2023, 144: 109358.) collected two X-ray images of pomelos with perpendicular viewing angles and extracted parameters such as area ratio, grayscale logarithm, etc., to predict the edible rate. This method failed to construct a three-dimensional visualization model of the fruit and lacked design for automated detection devices on the production line.

[0004] The existing method for detecting the volumetric edible rate of thick-skinned citrus using X-ray three-dimensional reconstruction technology (Cai Jianrong, Liang Xiaoxiang, Xu Qian, et al. Detection of volumetric edible rate of thick-skinned citrus using X-ray three-dimensional reconstruction technology [J]. Transactions of the Chinese Society of Agricultural Engineering, 2024, 40(01): 293-300.) reconstructs three slice images from different angles based on 180 X-ray images of thick-skinned citrus. The volumetric edible rate is determined by obtaining the area of ​​the background, peel, pulp, and cavity region based on the threshold segmentation method. The results show that R 2 The accuracy was 0.86, and the RMSE was 4.81%. This method does not make full use of X-ray projection data, fails to construct a three-dimensional visualization model of the fruit, and lacks the design of automated inspection devices for production lines. Summary of the Invention

[0005] This invention aims to provide an online detection method and device for the edible rate of fruits based on sparse CT reconstruction. It is applicable to the automatic sorting and quality evaluation of various fruits such as pomelos in the production line. It solves the problems of low detection efficiency, insufficient accuracy and high cost in the existing technology, and can realize high-precision and low-time-consuming automatic determination of the edible rate of fruits under production line conditions.

[0006] The present invention is achieved by at least one of the following technical solutions.

[0007] An online method for detecting the edible rate of fruit based on sparse CT reconstruction includes the following steps:

[0008] (1) Collect X-ray projection data of fruits;

[0009] (2) Preprocess the X-ray projection data and complete the sparse angle data by interpolation;

[0010] (3) Use the data from step (2) to perform CT reconstruction and obtain a CT model containing the internal and external structures of the fruit;

[0011] (4) Rotate the CT model with the centerline of the CT model as the axis and extract slice images at intervals. Use a deep learning neural network to perform semantic segmentation on the entire fruit region and pulp region in all slice images to obtain a binary mask image sequence containing the entire fruit region and pulp region.

[0012] (5) Restore the binary mask image sequence to three-dimensional space to construct an edible rate model, reconstruct the volume of the whole fruit and pulp, and calculate the edible rate by combining the density and mass of the whole fruit.

[0013] Furthermore, the preprocessing of X-ray projection data includes dark field correction, flat field correction, X-ray image cropping, scaling, contrast linear enhancement, and logarithmic normalization to eliminate detector noise and response inhomogeneity, improve X-ray image visibility, and reduce central cupping artifacts caused by beam hardening.

[0014] Furthermore, the interpolation method is linear interpolation.

[0015] Furthermore, the Gridrec algorithm based on Fourier transform is used for CT reconstruction.

[0016] Furthermore, the deep learning neural network is the DeepLab V3+ network, with the backbone being MobileNet V3.

[0017] Furthermore, Binary mask image sequence Restoring to three-dimensional space includes the following steps:

[0018] Create a new three-dimensional blank matrix with the same size as the CT model to store the edibility model information;

[0019] For all slice images, the contour boundaries of the entire fruit and pulp in the slice image are extracted by a threshold segmentation algorithm. According to the spatial position of the slice image in the CT model, the contour information contained in the slice image is mapped to the above three-dimensional blank matrix. The binary mask image sequence can be restored to the three-dimensional space of the blank matrix, thereby constructing an edible rate model that includes the peel, pulp and cavity structure.

[0020] Furthermore, the pulp volume is calculated by accumulating data through pixel rotation sweeping and pixel-by-pixel integration:

[0021] The sweep volume dV formed by the rotation of any pixel in the pulp region is:

[0022]

[0023] Where W is the width of the slice image, α is the angular interval of the slice image, x and y represent the horizontal and vertical coordinates of the pixel in the image coordinate system, respectively, and f F (x, y) represents the pixel values ​​of the mask in the pulp area;

[0024] Integrating the components of all the fruit pulp pixels, we obtain the three-dimensional volume V of the fruit pulp. CTF :

[0025]

[0026] Where n is the total number of slice images, and H and W are the height and width of the slice images, respectively;

[0027] Edible rate E CT The calculation is as follows:

[0028] E CT =V CTF ·ρ / m (4)

[0029] Where ρ is the density of the pulp and m is the total mass of the fruit.

[0030] The device for implementing the online detection method of fruit edibility based on sparse CT reconstruction includes: an X-ray source, an X-ray detector, a conveyor belt, a rotating module, a clamping module, a lifting module, and a gripper; a stepper motor is used to drive the rotating module, the clamping module, and the lifting module to complete the lifting, clamping, rotating, and releasing actions of the fruit, thereby realizing automatic acquisition of X-ray images;

[0031] The X-ray source and the X-ray detector are arranged opposite each other to form a stereoscopic imaging area for X-ray fluoroscopic imaging; the conveyor belt is used to transport the fruit into the stereoscopic imaging area; lifting modules are set on both sides of the conveyor belt to drive the fruit to move up and down along the z-axis.

[0032] The rotating module and the clamping module are respectively installed on the sliding parts of the lifting module on both sides; the gripper includes an active end and a driven end. The rotating module is connected to the active end of the gripper to drive the fruit to rotate around the y-axis; the driven end of the gripper is connected to the clamping module to achieve stable fixation of the fruit during rotation, and an annular foam tray is set under the fruit.

[0033] Furthermore, the rotation module includes a worm gear electric rotary table, the clamping module includes a lead screw motor, and the lifting module includes a lead screw slide. The worm gear electric rotary table and the lead screw motor are respectively connected to the sliding components of the lead screw slides on both sides to realize the lifting of the worm gear electric rotary table and the lead screw motor.

[0034] Furthermore, it also includes a microcontroller control unit, which communicates with the stepper motor driver through a GPIO interface, uses a timer interrupt method to control the stepper motor to rotate, lift, and release the fruit, and supports remote communication through a Bluetooth module.

[0035] Compared with existing technologies, the present invention provides an online detection method and device for fruit edibility based on sparse CT reconstruction, which has the following advantages:

[0036] 1. Strong online automated detection capability: The device is installed on the production line and automatically clamps, rotates, collects data and releases the fruit after it enters the imaging area, without the need for manual intervention.

[0037] 2. Significantly improved detection efficiency: Sparse acquisition of projection data greatly reduces the time required for data acquisition and algorithm processing.

[0038] 3. High accuracy in modeling and quality measurement: Rotation extraction of slice images from CT models ensures similarity in slice image content, facilitating accurate identification of feature regions by deep learning, and accurately reconstructing the edible fruit rate model by combining rotation and sweeping methods. Attached Figure Description

[0039] To more clearly illustrate the technical solution of the present invention, the embodiments of the present invention will be described below in conjunction with the accompanying drawings. The accompanying drawings are only illustrative and do not constitute a limitation on the scope of protection of the present invention.

[0040] Figure 1 This is a schematic diagram of the structure of an online fruit edibility detection device based on sparse CT reconstruction according to an embodiment;

[0041] Figure 2 This is a schematic diagram of the slice image extraction process in an embodiment;

[0042] Figure 3 This is a schematic diagram of the three-dimensional modeling of the edible rate in the embodiment;

[0043] Figure 4This is a schematic diagram of the edible rate calculation method in the embodiment;

[0044] In the diagram: 1-X-ray source, 2-conveyor belt, 3-X-ray detector, 4-double linear guide ball screw slide, 5-electric rotary table, 6-fixed shaft screw motor, 7a-active end, 7b-driven end, 8-annular foam tray. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] like Figure 1 As shown in the figure, this embodiment provides an online fruit edibility detection device based on sparse CT reconstruction, comprising: an X-ray source 1, a conveyor belt 2, an X-ray detector 3, a double-track ball screw slide 4, an electric rotary table 5, a fixed-axis screw motor 6, a clamp, and an annular foam tray 8. The X-ray source 1 and the X-ray detector 3 are arranged opposite to each other to form a three-dimensional imaging area for X-ray fluoroscopic imaging.

[0047] The conveyor belt 2 is used to transport fruit into the imaging area along the x-axis. Identical lead screw slides 4 are respectively installed on the left and right sides of the conveyor belt 2. The lead screw slides 4 are fixedly installed on the equipment frame and are used to drive the fruit to move up and down along the z-axis, providing height adjustment space. Preferably, the stroke of the slide 4 is greater than 5cm to avoid interference between the fruit and the conveyor belt plane during rotation.

[0048] The gripper 7 includes an active end 7a and a driven end 7b, and is integrally formed from ABS material using 3D printing. It has good shape adaptability, allowing it to closely conform to the fruit surface and prevent mechanical damage during gripping. An annular foam tray 8 is provided below the fruit for support and cushioning; due to its low density, it does not affect X-ray transmission imaging. In one embodiment, the active end 7a and the driven end 7b are respectively arc-shaped grooves of different sizes, enabling them to closely conform to the fruit surface.

[0049] The electric rotary table 5 and the lead screw motor 6 are respectively mounted on the sliding components of the lead screw slide 4 on the left and right sides. The electric rotary table 5 is a worm gear electric rotary table used to drive the fruit to rotate around the y-axis. The driving end 7a is rigidly connected to the electric rotary table 5 by bolts to transmit rotational torque; the driven end 7b is connected to one end of the lead screw of the lead screw motor 6 through ball bearings to provide clamping force along the y-axis direction, so as to achieve stable fixation of the fruit during rotation.

[0050] The online detection device operates as follows: When the fruit enters the imaging area via conveyor belt 2, the lead screw motor 6 starts, pushing the driven end 7b of the gripper towards the active end 7a until the fruit is clamped and fixed. The lead screw slide 4 drives the electric rotary table 5, the lead screw motor 6, the gripper 7, and the fruit as a whole to rise along the z-axis, preferably with a lifting height of 5cm. Subsequently, the electric rotary table 5 drives the fruit to rotate continuously around the y-axis at a constant angular velocity, with a total rotation stroke of 180°. During the rotation, the X-ray source 1 and the X-ray detector 3 work synchronously. When the cumulative rotation angle of the fruit reaches the set interval υ, an X-ray image acquisition is triggered until sparse projection data within the complete angle range is acquired. After the rotation acquisition is completed, the lead screw slide 4 descends, and the lead screw motor 6 releases the clamping force in the opposite direction, causing the fruit to automatically fall onto the foam tray 8, completing one complete X-ray data acquisition process.

[0051] The lead screw slide 4, electric rotary table 5, and lead screw motor 6 of the device are all driven by stepper motors. The stepper motors are connected to the lead screw slide 4 and electric rotary table 5, serving as the driving force source for lifting, clamping, rotating, and releasing the fruit, thereby realizing automatic acquisition of X-ray images.

[0052] The device also includes a microcontroller control unit, which (preferably STM32) communicates with the stepper motor driver through a GPIO interface. It uses a timer interrupt method to achieve precise control of the stepper motor to control the rotation, lifting, and release of the fruit, and supports remote communication through a Bluetooth module.

[0053] This embodiment also provides an online detection method for the edible rate of fruit based on sparse CT reconstruction, including the following steps:

[0054] S1. Acquire X-ray projection data using the aforementioned device: First, calibrate the X-ray source 1, conveyor belt 2, and X-ray detector 3 to obtain the conversion relationship between the unit pixel length and the actual physical length in the imaging field of view. Preferably, the calibration is performed using the center height plane of the fruit as a reference plane. Fruit imaging parameters (X-ray source voltage, current, and integration time) are selected through actual imaging to ensure clear internal and external structures of the fruit in the X-ray image. As one embodiment, the X-ray source voltage is 80kV, the current is 500mA, and the integration time is 0.2 seconds.

[0055] S2. To improve the reconstruction quality of CT models and reduce systematic artifacts, the device is used to acquire X-ray projection data, and the slice image data is preprocessed to form a slice image dataset, including the following steps:

[0056] Dark field correction removes dark current noise from the X-ray detector, and flat field correction compensates for its non-uniform response to X-rays, achieving a standardized response output.

[0057] The corrected X-ray image is cropped to remove redundant edge data and reduce processing burden; preferably, bilinear interpolation is used to scale the X-ray image to 432×540 pixels to reduce computational resource consumption; a linear enhancement method is used to improve the gray-scale dynamic range of the X-ray image, highlighting details in low gray-scale areas and facilitating subsequent segmentation and recognition; to suppress central artifacts caused by beam hardening effect, the gray-scale distribution of the X-ray image is further adjusted by logarithmic transformation and normalization to make the attenuation of multi-energy X-rays approximately linear.

[0058] To improve CT reconstruction artifacts caused by sparse projection, a sine wave-based projection interpolation method is used to complete the missing data. The sine wave describes the linear attenuation information at different projection angles, with the vertical axis representing the projection angle and the horizontal axis corresponding to the projection pixel position. Preferably, the projection interpolation method is linear interpolation, used to extend the sparse projection to a complete angular range and improve the reconstruction quality of the CT model.

[0059] S3. Perform CT reconstruction on the preprocessed X-ray images to convert the X-ray projection data into a three-dimensional CT model containing the internal and external structures of the fruit. Preferably, the Gridrec algorithm based on Fourier transform is used for reconstruction to meet the real-time requirements of rapid inspection on the production line. Alternatively, the back projection (FBP) algorithm, the sparse reconstruction method based on compressed sensing, or the deep learning reconstruction algorithm based on neural networks can also be used for reconstruction.

[0060] S4. To improve the usability and visibility of the CT model, further noise reduction and enhancement processing is performed on the CT reconstruction results: gray-level distribution of the CT model is adjusted by gray-level histogram equalization to enhance the contrast of structural details, and abrupt salt-and-pepper noise is suppressed by median filtering to further purify the model background.

[0061] S5. Compared to directly processing the complete CT model, processing based on two-dimensional slice images can significantly reduce computational complexity. Preferably, such as... Figure 2 As shown, the central axis of the CT model is used as the rotation extraction axis for the slice images. A series of slice images are extracted at fixed angles α to achieve a comprehensive expression of the internal structure of the fruit and ensure that the structural features of each slice image are relatively consistent, which facilitates the subsequent extraction of quality features and the construction of the edible rate model.

[0062] S6. The extracted slice images contain background, peel, pulp, and cavity regions. Slices at certain angles may also contain gripper structures. To extract the information of the entire fruit and pulp region required for fruit edibility and to eliminate gripper interference, an image segmentation model is used to perform accurate semantic segmentation of the slice images. Considering the insufficient adaptability of traditional image segmentation methods to structural deformation, the image segmentation model of this invention uses a deep learning-based semantic segmentation network to perform accurate semantic segmentation of the slice images, obtaining a binary mask image sequence containing the entire fruit region and pulp region. The deep learning-based semantic segmentation network structure is DeepLab V3+ (Chen L, Zhu Y, Papandreou G, et al. Encoder-decoder with atrous separable convolution for semantic image segmentation[C]. In: Proceedings of the European Conference on Computer Vision (ECCV). Munich, Germany: Springer-Verlag, 2018, 11211: 833-851.). As one embodiment, the deep learning-based semantic segmentation network can also be Unet, SegNet, or other neural network structures with multi-scale feature extraction capabilities.

[0063] An image segmentation model is trained using a slice image dataset. As one example, one slice image is extracted every 15°. Preferably, the dataset is divided into a training set, a validation set, and a test set in a 6:2:2 ratio, and data augmentation is used to improve the generalization ability of the slice image segmentation model.

[0064] S7. Construct a 3D edible rate model: Create a new 3D blank matrix with the same size as the CT model to store the edible rate model information. For any slice image, extract the contour boundaries of the whole fruit and pulp in the slice image using a threshold segmentation algorithm, and map its contour information to the aforementioned 3D blank matrix according to the spatial position of the slice image in the CT model. By repeating the above process for all slice images, the binary mask image sequence can be restored to the 3D space of the blank matrix, thereby constructing an edible rate model that includes the peel, pulp, and cavity structure, such as... Figure 3 As shown.

[0065] Among these parameters, pulp volume is a key parameter for calculating edible yield. For example... Figure 4As shown, since the sliced ​​images in the edible rate model are arranged at fixed angular intervals α, the pulp region in each sliced ​​image can be regarded as a cylindrical voxel formed by rotating about the rotation axis by an angle α. Each region can be approximated as a three-dimensional unit pulp volume. The sweep volume dV formed by the rotation of any pixel in the pulp region is calculated as follows:

[0066]

[0067] Where W is the width of the slice image, α is the angular interval of the slice image, x and y represent the horizontal and vertical coordinates of the pixel in the image coordinate system, respectively, and f F (x, y) represents the pixel values ​​of the mask in the pulp area.

[0068] Integrating the components of all the fruit pulp pixels, we obtain the three-dimensional volume V of the fruit pulp. CTF As shown in the formula:

[0069]

[0070] Where n is the total number of slice images, and H and W are the height and width of the slice images, respectively. Edible rate E CT The calculation is as follows:

[0071] E CT =V CTF ·ρ / m (4)

[0072] Where ρ is the pulp density and m is the whole fruit mass.

[0073] As a specific embodiment, this embodiment uses 120 grapefruits to conduct an online detection method for fruit edibility based on sparse CT reconstruction, including the following steps:

[0074] 1. Acquire sparse projection data and preprocess it: Control the grapefruit to rotate and sample in the device at sampling angle intervals of 6°, and acquire a total of 30 frames; after acquisition, perform preprocessing operations such as dark field correction, flat field correction, cropping, scaling, contrast enhancement and log normalization on all X-ray images in sequence.

[0075] 2. Interpolation to complete the projected data: The preprocessed data is interpolated and completed. Linear interpolation is preferred, but spline interpolation, quadratic interpolation, or convolution interpolation can also be used to restore the data to the 1° interval.

[0076] 3. CT Reconstruction: CT reconstruction is performed based on the interpolated data to obtain the CT model. The Gridrec algorithm based on Fourier transform is preferred.

[0077] 4. Rotate the CT model around its centerline and extract slice images at sampling intervals of 9°, optionally 1°, 5°, 20° or other uniform intervals; perform semantic segmentation on the slice images, preferably using the DeepLab V3+ network with MobileNetV3 as the backbone.

[0078] 5. Edible Rate Modeling and Calculation: The segmentation results are restored to three-dimensional space, the edible rate models of pulp and whole fruit are reconstructed, and the pulp volume is calculated by pixel rotation sweeping and pixel-by-pixel integration. Combined with the whole fruit mass and pulp density, the edible rate of pomelo is calculated and output.

[0079] In this embodiment, with a data acquisition interval of 6° and a slice image extraction interval of 9°, the coefficient of determination for edible rate detection is 0.977 and the root mean square error is 0.76%.

[0080] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0081] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined in this invention may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for online detection of fruit edibility based on sparse CT reconstruction, characterized in that, Includes the following steps: (1) Collect X-ray projection data of fruits; (2) Preprocess the X-ray projection data and complete the sparse angle data by interpolation; (3) Use the data from step (2) to perform CT reconstruction and obtain a CT model containing the internal and external structures of the fruit; (4) Rotate the CT model around the midline of the CT model and extract slice images at intervals. Use a deep learning neural network to perform semantic segmentation on the entire fruit region and the pulp region in all slice images to obtain a sequence of binary mask images containing the entire fruit region and the pulp region. (5) Restore the binary mask image sequence to three-dimensional space to construct an edible rate model, reconstruct the volume of the whole fruit and pulp, and calculate the edible rate by combining the density and mass of the whole fruit.

2. The method for online detection of fruit edibility based on sparse CT reconstruction according to claim 1, characterized in that, Preprocessing of X-ray projection data includes dark field correction, flat field correction, X-ray image cropping, scaling, contrast linear enhancement, and logarithmic normalization to eliminate detector noise and response inhomogeneity, improve X-ray image visibility, and reduce central cupping artifacts caused by beam hardening.

3. The method for online detection of fruit edibility based on sparse CT reconstruction according to claim 1, characterized in that, The interpolation method is linear interpolation.

4. The method for online detection of fruit edibility based on sparse CT reconstruction according to claim 1, characterized in that, Using Gridre based on Fourier transform c The algorithm is used for CT reconstruction.

5. The method for online detection of fruit edibility based on sparse CT reconstruction according to claim 1, characterized in that, The deep learning neural network is DeepLab V3+, with MobileNet V3 as its backbone.

6. The method for online detection of fruit edibility based on sparse CT reconstruction according to claim 1, characterized in that, Restoring a sequence of binary mask images to three-dimensional space includes the following steps: Create a new three-dimensional blank matrix with the same size as the CT model to store the edibility model information; For all slice images, the contour boundaries of the entire fruit and pulp in the slice image are extracted by a threshold segmentation algorithm. According to the spatial position of the slice image in the CT model, the contour information contained in the slice image is mapped to the above three-dimensional blank matrix. The binary mask image sequence can be restored to the three-dimensional space of the blank matrix, thereby constructing an edible rate model that includes the peel, pulp and cavity structure.

7. The method for online detection of fruit edibility based on sparse CT reconstruction according to claim 1, characterized in that, The pulp volume is calculated by accumulating data using pixel rotation sweeping and pixel-by-pixel integration. The sweep volume dV formed by the rotation of any pixel in the pulp region is: Where W is the width of the slice image, α is the angular interval of the slice image, x and y represent the horizontal and vertical coordinates of the pixel in the image coordinate system, respectively, and f F (x, y) represents the pixel values ​​of the mask in the pulp area; Integrating the components of all the fruit pulp pixels, we obtain the three-dimensional volume V of the fruit pulp. CTF : Where n is the total number of slice images, and H and W are the height and width of the slice images, respectively; Edible rate E CT The calculation is as follows: E CT =V CTF ·p / m (4) Where ρ is the density of the pulp and m is the total mass of the fruit.

8. An apparatus for implementing the online detection method for fruit edibility based on sparse CT reconstruction as described in claim 1, characterized in that, include: X-ray source, X-ray detector, conveyor belt, rotating module, clamping module, lifting module, gripper; The rotating module, clamping module, and lifting module are driven by stepper motors to complete the lifting, clamping, rotating, and releasing actions of the fruit, thereby realizing the automatic acquisition of X-ray images. The X-ray source and the X-ray detector are arranged opposite each other to form a stereoscopic imaging area for X-ray fluoroscopic imaging; the conveyor belt is used to transport the fruit into the stereoscopic imaging area; lifting modules are set on both sides of the conveyor belt to drive the fruit to move up and down along the z-axis. The rotating module and the clamping module are respectively installed on the sliding parts of the lifting module on both sides; the gripper includes an active end and a driven end. The rotating module is connected to the active end of the gripper to drive the fruit to rotate around the y-axis; the driven end of the gripper is connected to the clamping module to achieve stable fixation of the fruit during rotation, and an annular foam tray is set under the fruit.

9. The apparatus according to claim 8, characterized in that, The rotating module includes a worm gear electric rotary table, the clamping module includes a lead screw motor, and the lifting module includes a lead screw slide. The worm gear electric rotary table and the lead screw motor are respectively connected to the sliding components of the lead screw slides on both sides to realize the lifting of the worm gear electric rotary table and the lead screw motor.

10. The apparatus according to claim 8, characterized in that, It also includes a microcontroller control unit, which communicates with the stepper motor driver through a GPIO interface, uses a timer interrupt method to control the rotation, lifting and releasing of the fruit by the stepper motor, and supports remote communication through a Bluetooth module.