A method and system for detecting the flesh yield rate of durians based on computer tomography
By acquiring CT images of durians using computed tomography (CT) technology, performing image segmentation and constructing 3D models, and calculating the volume and mass of the pulp, this method solves the problem of large errors in durian pulp yield in existing technologies and achieves high-precision durian pulp yield detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG BOSHI NETWORK TECHNOLOGY CO LTD
- Filing Date
- 2026-02-05
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies that estimate durian flesh yield using sampling methods have significant errors and cannot accurately classify durian quality.
CT scan images of durian were obtained using computed tomography (CT). Through image segmentation and 3D model construction, the volume and mass of the pulp were calculated, and the pulp percentage was determined.
This technology enables accurate detection of the flesh yield of each durian without damaging it, reducing calculation errors and improving detection accuracy.
Smart Images

Figure CN122265986A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of non-destructive testing technology for agricultural products, specifically to a method and system for detecting the flesh yield of durian based on computed tomography. Background Technology
[0002] In existing technologies, the calculation of the flesh yield of fruits such as durian mainly involves sampling and cutting a batch of durians, weighing the flesh of the sampled durians, and then calculating the flesh yield of the sample based on the weight of the flesh and the weight of the whole durian before cutting. The average of the flesh yields of the sampled durians is then used to estimate the flesh yield of the entire batch of durians. This method of estimating flesh yield has a very large error because, even after the entire batch of durians is sorted, there are differences in the distribution of flesh among the individual durians. This leads to a large difference between the flesh yield estimated by the sampling method and the actual flesh yield of the durians, making it impossible to classify the quality of each durian. Summary of the Invention
[0003] To address the technical problem of large errors in the estimation of durian flesh yield using sampling methods in existing technologies, this invention provides a method and system for detecting durian flesh yield based on computed tomography.
[0004] The technical solution of the present invention to solve the above-mentioned technical problems is as follows: A method for detecting durian flesh yield based on computed tomography includes the following steps: Multiple CT tomographic images of durian were acquired, resulting in multiple scan images; The pulp images in the multiple scanned images are segmented to obtain multiple pulp scanned images; A three-dimensional image of the fruit pulp was constructed based on multiple scanned images of the fruit pulp. Calculate the volume of the fruit pulp based on the three-dimensional image of the pulp; The pulp mass is calculated based on the pulp volume and pulp density. The flesh percentage is calculated based on the weight of the pulp and the weight of the whole durian.
[0005] The beneficial effects of this invention are as follows: By scanning each durian with computed tomography (CT) to obtain CT scan images, a three-dimensional model is constructed using these images, and the volume of the three-dimensional model is calculated using image processing software. The mass of the pulp is then calculated using bulk density, thereby determining the pulp yield of each durian. This invention can detect the pulp yield of durians without damaging them. Furthermore, by employing CT scanning, it can inspect each durian individually to estimate its pulp yield. Compared to the sampling methods used in existing technologies, this invention provides a smaller error and higher accuracy in calculating the pulp yield.
[0006] Based on the above technical solution, the present invention can be further improved as follows.
[0007] Furthermore, the pulp images in the multiple scanned images are segmented to obtain multiple pulp scanned images, including the following steps: Multiple scanned images are processed to obtain multiple grayscale images; The pulp image portion in the multiple grayscale images is segmented using the edge segmentation method to obtain multiple scanned images of the pulp.
[0008] Furthermore, the pulp image portion in the multiple grayscale images is segmented using an edge segmentation method to obtain multiple scanned images of the pulp. The specific steps are as follows: The Canny or Marr-Hildreth operator in the edge segmentation algorithm is used to extract the pulp image features from multiple grayscale images to obtain multiple pulp scan images.
[0009] Furthermore, constructing a three-dimensional image of the fruit pulp based on multiple scanned images of the pulp includes the following steps: Based on pixels, the multiple fruit pulp scan images are constructed into multiple two-dimensional grids; A three-dimensional solid model composed of unit cells is constructed using multiple two-dimensional meshes; The three-dimensional solid model is input into three-dimensional image processing software to display the three-dimensional image of the fruit pulp.
[0010] Furthermore, based on pixels, the multiple fruit pulp scan images are constructed into multiple two-dimensional grids, including the following steps: Each pixel in each of the fruit pulp scan images is considered as a two-dimensional planar quadrilateral unit in a two-dimensional grid; wherein, if the resolution of the fruit pulp scan image is n*m, then there are m rows of two-dimensional planar quadrilateral units in the x-coordinate direction and n columns of two-dimensional planar quadrilateral units in the y-coordinate direction; in the two-dimensional grid, there are m+1 rows of nodes in the x-coordinate direction and n+1 columns of nodes in the y-coordinate direction. Let i and j represent the row number and column number of the node in the two-dimensional grid, respectively, and p represent the actual size corresponding to one pixel width. Then the two-dimensional coordinates of the node (i, j) are represented as (ip, jp); where 0 ≤ i ≤ m and 0 ≤ j ≤ n.
[0011] Furthermore, the unit cells constituting the three-dimensional solid model are one of the following: hexahedron, tetrahedron, or triangular prism.
[0012] Furthermore, when the unit constituting the three-dimensional solid model is a hexahedron, constructing the three-dimensional solid model data composed of unit bodies using multiple two-dimensional meshes includes the following steps: Each pixel's four nodes, along with the corresponding four nodes of the adjacent tomographic scan image, are combined to form a hexahedral unit. N scanned images have N layers of nodes in the z-coordinate direction; Let h represent the spacing between nodes in N layers, and k represent the number of node layers; where 0 ≤ k ≤ N-1; If each node is processed into a three-dimensional spatial node (i, j, k), then the three-dimensional coordinates of the three-dimensional spatial node (i, j, k) are represented as (ip, jp, kh).
[0013] Furthermore, the three-dimensional solid model is input into three-dimensional image processing software to display the three-dimensional image of the fruit pulp, including the following steps: The three-dimensional solid model is organized into a data file that includes node coordinates, node color values, and the correspondence between unit cells and nodes; The data file is input into the 3D image processing software to display the 3D image of the fruit pulp.
[0014] Write the x, y, and z coordinates of the nodes in the data file in sequence; In each tomographic scan image, the color value of a node is defined as the color value of its adjacent lower right pixel. For boundary nodes, the color value of the node in row (m+1) corresponds to the color value of the node in row m, and the color value of the node in column (n+1) corresponds to the color value of the node in column n. The correspondence between hexahedral elements and nodes is described by specifying the eight nodes of each hexahedral element. In the data file, the node (i, j, k) number is represented as node(i, j, k) = 1 + i + (m+1) * j + (n+1) * (m+1) * k. The eight node numbers of each hexahedral element are written in order as: node(i, j, k), node(i+1, j, k), node(i+1, j+1, k), node(i, j+1, k), node(i, j, k+1), node(i+1, j, k+1), node(i+1, j+1, k+1), node(i, j+1, k+1).
[0015] Furthermore, the flesh percentage is calculated based on the weight of the pulp and the weight of the whole durian. The specific formula is as follows: ; in, This indicates the meat yield. This indicates the weight of the fruit pulp. This indicates the mass of the whole durian.
[0016] To address the aforementioned technical problems, this invention also provides a durian flesh yield detection system based on computed tomography (CT) scanning, the specific technical content of which is as follows: A durian flesh yield detection system based on computed tomography (CT) scanning includes: The data acquisition module is used to acquire multiple CT tomographic images of durians, resulting in multiple scan images; The data processing module is used to segment the pulp images in the multiple scanned images to obtain multiple pulp scanned images; The model building module is used to construct a three-dimensional image of the fruit pulp based on multiple scanned images of the fruit pulp. The data calculation module is used to calculate the volume of the fruit pulp based on the three-dimensional image of the pulp; calculate the mass of the pulp based on the volume and density of the pulp; and calculate the pulp percentage based on the pulp mass and the mass of the whole durian. Attached Figure Description
[0017] Figure 1 This is a flowchart of a method for detecting durian flesh yield based on computed tomography in an embodiment of the present invention; Figure 2 This is a schematic block diagram of a durian flesh yield detection system based on computed tomography in an embodiment of the present invention. Detailed Implementation
[0018] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0019] like Figure 1 As shown, this embodiment provides a method for detecting durian flesh yield based on computed tomography, including the following steps: S1. Acquire multiple CT tomographic images of durian to obtain multiple scan images; A CT scan device can be installed on durian weighing and testing equipment to obtain a CT scan image of each durian during weighing and testing, so as to calculate the volume of the flesh of each durian later.
[0020] S2. Segment the fruit pulp images in the multiple scanned images to obtain multiple fruit pulp scanned images; The pulp images in the multiple scanned images are segmented to obtain multiple pulp scan images, including the following steps: Multiple scanned images are processed to obtain multiple grayscale images; The pulp image portion in the multiple grayscale images is segmented using the edge segmentation method to obtain multiple scanned images of the pulp.
[0021] The pulp image portion of each of the multiple grayscale images is segmented using an edge segmentation method to obtain multiple scanned images of the pulp. The specific steps are as follows: The Canny or Marr-Hildreth operator in the edge segmentation algorithm is used to extract the pulp image features from multiple grayscale images to obtain multiple pulp scan images.
[0022] Image segmentation algorithms based on edge detection are segmentation methods that utilize discontinuities in grayscale, color, or texture within an image. The core idea is to divide image regions by detecting edge points. This method typically includes preprocessing, edge detection, and edge connection steps, aiming to highlight local edges in the image and extract edge point sets to achieve image segmentation.
[0023] Basic Principles and Steps: Edge detection and segmentation algorithms first smooth the original image to reduce noise. Then, they apply edge enhancement operators (such as Sobel, Canny, or Roberts operators) to detect pixels with drastic gradient changes; these pixels typically correspond to object boundaries. Next, edge points are separated from the background by setting a threshold, and discontinuous edges are connected using morphological operations or region analysis to ultimately form a closed contour. For example, the Canny algorithm employs multi-stage processing (Gaussian filtering, gradient calculation, non-maximum suppression, and double threshold detection) to effectively balance the accuracy and completeness of edge detection. Commonly Used Operators and Techniques: First-order differential operators: such as Sobel and Roberts operators, detect edges by calculating the magnitude of image gradients; they are sensitive to noise but computationally efficient.
[0024] Second-order differential operators, such as the Laplacian operator, locate edges by detecting zero-crossing points of the second derivative, capturing subtle details but susceptible to noise interference. Advanced methods: Canny edge detection combines Gaussian smoothing and non-maximum suppression, making it one of the most widely used operators. Furthermore, multi-scale edge detection or adaptive thresholding strategies can further improve segmentation results in complex scenes. Implementation examples and comparisons: In MATLAB, Canny edge detection can be quickly implemented using the `edge()` function, while OpenCV provides functions such as `cv2.Canny()`, supporting custom threshold parameters. Compared to other segmentation methods, edge detection performs better on objects with clear outlines but is sensitive to noise and weak edges; thresholding or region growing methods are more suitable for regions with uniform grayscale, requiring the selection of appropriate strategies based on image characteristics.
[0025] S3. Construct a three-dimensional image of the fruit pulp based on the multiple scanned images of the fruit pulp; Constructing a 3D image of the fruit pulp based on multiple scanned images of the pulp includes the following steps: Based on pixels, the multiple fruit pulp scan images are constructed into multiple two-dimensional grids; A three-dimensional solid model composed of unit cells is constructed using multiple two-dimensional meshes; The three-dimensional solid model is input into three-dimensional image processing software to display the three-dimensional image of the fruit pulp. The three-dimensional image processing software can be Ansys, UG, SketchUp, or similar software.
[0026] Based on pixels, multiple scanned images of the fruit pulp are constructed into multiple two-dimensional grids, including the following steps: Each pixel in each of the fruit pulp scan images is considered as a two-dimensional planar quadrilateral unit in a two-dimensional grid; wherein, if the resolution of the fruit pulp scan image is n*m, then there are m rows of two-dimensional planar quadrilateral units in the x-coordinate direction and n columns of two-dimensional planar quadrilateral units in the y-coordinate direction; in the two-dimensional grid, there are m+1 rows of nodes in the x-coordinate direction and n+1 columns of nodes in the y-coordinate direction. Let i and j represent the row number and column number of the node in the two-dimensional grid, respectively, and p represent the actual size corresponding to one pixel width. Then the two-dimensional coordinates of the node (i, j) are represented as (ip, jp); where 0 ≤ i ≤ m and 0 ≤ j ≤ n.
[0027] The unit cells that make up a three-dimensional solid model are one of the following: hexahedron, tetrahedron, or triangular prism.
[0028] When the unit cells constituting the three-dimensional solid model are hexahedrons, constructing the three-dimensional solid model data composed of unit cells using multiple two-dimensional meshes includes the following steps: Each pixel's four nodes, along with the corresponding four nodes of the adjacent tomographic scan image, are combined to form a hexahedral unit. N scanned images have N layers of nodes in the z-coordinate direction; Let h represent the spacing between nodes in N layers, and k represent the number of node layers; where 0 ≤ k ≤ N-1; If each node is processed into a three-dimensional spatial node (i, j, k), then the three-dimensional coordinates of the three-dimensional spatial node (i, j, k) are represented as (ip, jp, kh).
[0029] The three-dimensional solid model is input into three-dimensional image processing software to display the three-dimensional image of the fruit pulp, including the following steps: The three-dimensional solid model is organized into a data file that includes node coordinates, node color values, and the correspondence between unit cells and nodes; The data file is input into the 3D image processing software to display the 3D image of the fruit pulp.
[0030] Each pixel in each tomographic scan image is considered as a two-dimensional planar quadrilateral cell in a two-dimensional grid. If the resolution of the tomographic scan image is n*m, then there are m rows of two-dimensional planar quadrilateral cells in the x direction and n columns of two-dimensional planar quadrilateral cells in the y direction. Then there are m+1 rows of nodes in the x direction and n+1 columns of nodes in the y direction in the two-dimensional grid. Let i and j represent the row number and column number of the node, respectively (0 ≤ i ≤ m, 0 ≤ j ≤ n), and p represent the actual size corresponding to the width of one pixel. Then the two-dimensional coordinates of the node (i, j) are represented as (ip, jp). When the unit cell constituting the 3D solid model is a hexahedron, the four nodes of each pixel and the four nodes of the corresponding pixels in the adjacent tomographic scan image are combined to form a hexahedron unit; N tomographic scan images have N layers of nodes in the z-direction; and h represents the interlayer spacing of the N layers of nodes, and k represents the number of node layers (0 ≤ k ≤ N-1). Each node is processed into a 3D spatial point, then the 3D coordinates of node (i, j, k) are represented as (ip, jp, kh). The data file of the 3D solid model includes node coordinates, node color values, and the correspondence between hexahedron units and nodes; the x, y, z coordinates of the nodes are written sequentially in the data file; in each tomographic scan image, the color value of a node is defined as the color value of its adjacent lower right corner pixel, and for boundary nodes, the color value of the node in the (m+1)th row corresponds to the color value of the node in the mth row, and the color value of the node in the (n+1)th column corresponds to the color value of the node in the nth column; and based on the correspondence between each hexahedron unit and node, in the data file, node (i, j, k) The numbering is represented as node(i,j,k) = 1+i+(m+1)*j+(n+1)*(m+1)*k. The eight nodes of each hexahedral element are numbered in order as: node(i,j,k), node(i+1,j,k), node(i+1,j+1,k), node(i,j+1,k), node(i,j,k+1), node(i+1,j,k+1), node(i+1,j+1,k+1), node(i,j+1,k+1).
[0031] S4. Calculate the volume of the pulp based on the three-dimensional image of the pulp; The volume of the fruit pulp in the 3D image is directly analyzed in the 3D image processing software to output the fruit pulp volume.
[0032] S5. Calculate the pulp mass based on the pulp volume and pulp density; Multiply the volume of the pulp by the density of the pulp to obtain the mass of the pulp.
[0033] S6. Calculate the flesh percentage based on the weight of the pulp and the weight of the whole durian.
[0034] Furthermore, the flesh percentage is calculated based on the weight of the pulp and the weight of the whole durian. The specific formula is as follows: ; in, This indicates the meat yield. This indicates the weight of the fruit pulp. This indicates the mass of the whole durian.
[0035] This invention employs computed tomography (CT) scanning to obtain CT images of each durian. A three-dimensional model is then constructed using these images, and image processing software is used to calculate the volume of the 3D model. The mass of the pulp is then calculated using bulk density, thereby determining the pulp yield of each durian. This invention can detect the pulp yield of durians without damaging them. Furthermore, by using CT scanning, it can inspect each durian individually to estimate its pulp yield. Compared to the sampling methods used in existing technologies, this invention provides a smaller error and higher accuracy in calculating the pulp yield.
[0036] Based on the above technical solution, the present invention can be further improved as follows.
[0037] In other embodiments, a durian flesh yield detection system based on computed tomography is also provided, comprising: The data acquisition module is used to acquire multiple CT tomographic images of durians, resulting in multiple scan images; The data processing module is used to segment the pulp images in the multiple scanned images to obtain multiple pulp scanned images; The model building module is used to construct a three-dimensional image of the fruit pulp based on multiple scanned images of the fruit pulp. The data calculation module is used to calculate the volume of the fruit pulp based on the three-dimensional image of the pulp; calculate the mass of the pulp based on the volume and density of the pulp; and calculate the pulp percentage based on the pulp mass and the mass of the whole durian.
[0038] The data acquisition module, data processing module, model building module, and data calculation module are program modules or computing devices.
[0039] In other embodiments, a storage medium is also provided, which stores a computer program or computer instructions that, when executed by a computer processor, implement the steps of the durian flesh yield detection method based on computed tomography scan.
[0040] The storage medium can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or memory. The storage medium can also be an external storage device of any data processing device, such as a plug-in hard disk, smart memory card, SD card, flash memory card, etc., mounted on the device. Furthermore, the storage medium can include both internal storage units and external storage devices of any data processing device. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.
[0041] In other embodiments, a computer is also provided, including a memory and one or more processors, wherein executable code is stored in the memory, and when the one or more processors execute the executable code, the steps of the above-described method for detecting durian flesh yield based on computed tomography scan are implemented.
[0042] The memory can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or RAM. The memory can also be an external storage device of any data processing device, such as a plug-in hard disk, smart memory card, SD card, flash memory card, etc., mounted on the device. Furthermore, the memory can include both internal storage units and external storage devices of any data processing device. The memory is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.
[0043] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the concept and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for detecting the flesh yield of durian based on computed tomography, characterized in that, Includes the following steps: Multiple CT tomographic images of durian were acquired, resulting in multiple scan images; The pulp images in the multiple scanned images are segmented to obtain multiple pulp scanned images; A three-dimensional image of the fruit pulp was constructed based on multiple scanned images of the fruit pulp. Calculate the volume of the fruit pulp based on the three-dimensional image of the pulp; The pulp mass is calculated based on the pulp volume and pulp density. The flesh percentage is calculated based on the weight of the pulp and the weight of the whole durian.
2. The method for detecting durian flesh yield based on computed tomography according to claim 1, characterized in that, The pulp images in the multiple scanned images are segmented to obtain multiple pulp scan images, including the following steps: Multiple scanned images are processed to obtain multiple grayscale images; The pulp image portion in the multiple grayscale images is segmented using the edge segmentation method to obtain multiple scanned images of the pulp.
3. The method for detecting durian flesh yield based on computed tomography according to claim 2, characterized in that, The pulp image portion of each of the multiple grayscale images is segmented using an edge segmentation method to obtain multiple scanned images of the pulp. The specific steps are as follows: The Canny or Marr-Hildreth operator in the edge segmentation algorithm is used to extract the pulp image features from multiple grayscale images to obtain multiple pulp scan images.
4. The method for detecting durian flesh yield based on computed tomography according to claim 2, characterized in that, Constructing a 3D image of the fruit pulp based on multiple scanned images of the pulp includes the following steps: Based on pixels, the multiple fruit pulp scan images are constructed into multiple two-dimensional grids; A three-dimensional solid model composed of unit cells is constructed using multiple two-dimensional meshes; The three-dimensional solid model is input into three-dimensional image processing software to display the three-dimensional image of the fruit pulp.
5. The method for detecting durian flesh yield based on computed tomography according to claim 4, characterized in that, Based on pixels, multiple scanned images of the fruit pulp are constructed into multiple two-dimensional grids, including the following steps: Each pixel in each of the fruit pulp scan images is considered as a two-dimensional planar quadrilateral unit in a two-dimensional grid; wherein, if the resolution of the fruit pulp scan image is n*m, then there are m rows of two-dimensional planar quadrilateral units in the x-coordinate direction and n columns of two-dimensional planar quadrilateral units in the y-coordinate direction; in the two-dimensional grid, there are m+1 rows of nodes in the x-coordinate direction and n+1 columns of nodes in the y-coordinate direction; Let i and j represent the row number and column number of the node in the two-dimensional grid, respectively, and p represent the actual size corresponding to one pixel width. Then the two-dimensional coordinates of the node (i, j) are represented as (ip, jp); where 0 ≤ i ≤ m and 0 ≤ j ≤ n.
6. The method for detecting durian flesh yield based on computed tomography according to claim 5, characterized in that, The unit cells that make up a three-dimensional solid model are one of the following: hexahedron, tetrahedron, or triangular prism.
7. The method for detecting durian flesh yield based on computed tomography according to claim 6, characterized in that, When the unit cells constituting the three-dimensional solid model are hexahedrons, constructing the three-dimensional solid model data composed of unit cells using multiple two-dimensional meshes includes the following steps: Each pixel's four nodes, along with the corresponding four nodes of the adjacent tomographic scan image, are combined to form a hexahedral unit. N scanned images have N layers of nodes in the z-coordinate direction; Let h represent the spacing between nodes in N layers, and k represent the number of node layers; where 0 ≤ k ≤ N-1; If each node is processed into a three-dimensional spatial node (i, j, k), then the three-dimensional coordinates of the three-dimensional spatial node (i, j, k) are represented as (ip, jp, kh).
8. The method for detecting durian flesh yield based on computed tomography according to claim 7, characterized in that, The three-dimensional solid model is input into three-dimensional image processing software to display the three-dimensional image of the fruit pulp, including the following steps: The three-dimensional solid model is organized into a data file that includes node coordinates, node color values, and the correspondence between unit cells and nodes; The data file is input into the 3D image processing software to display the 3D image of the fruit pulp.
9. The method for detecting durian flesh yield based on computed tomography according to claim 1, characterized in that, The flesh percentage is calculated based on the weight of the pulp and the weight of the whole durian. The specific formula is as follows: ; in, This indicates the meat yield. This indicates the weight of the fruit pulp. This indicates the mass of the whole durian.
10. A durian flesh yield detection system based on computed tomography, characterized in that, include: The data acquisition module is used to acquire multiple CT tomographic images of durians, resulting in multiple scan images; The data processing module is used to segment the pulp images in the multiple scanned images to obtain multiple pulp scanned images; The model building module is used to construct a three-dimensional image of the fruit pulp based on multiple scanned images of the fruit pulp. The data calculation module is used to calculate the volume of the fruit pulp based on the three-dimensional image of the pulp; calculate the mass of the pulp based on the volume and density of the pulp; and calculate the pulp percentage based on the pulp mass and the mass of the whole durian.