Citrus nondestructive detection method, terminal equipment and storage medium based on OCT combined with image analysis
Through the combination of optical coherence tomography technology and Unet deep learning model, non-destructive detection of citrus oil cells is achieved, solving the problems of complex detection and sample damage in the prior art, and achieving efficient and accurate evaluation of oil cell morphology and distribution.
Patent Information
- Application Number
- CN202411585267.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-11-07
AI Technical Summary
The existing citrus oil cell detection methods are complex, time-consuming and damage to the sample, making it difficult to achieve non-destructive and accurate oil cell morphology, quantity and distribution detection.
Optical coherence tomography technology combined with Unet deep learning model for image analysis, two-dimensional images are acquired through lossless scanning, label segmentation and three-dimensional reconstruction, oil cell volume and spatial distribution are calculated, and shape reconstruction and slice analysis are combined with elliptical models to achieve Non-destructive testing of citrus oil cells.
It realizes efficient and accurate non-destructive testing of the structure of citrus oil cells, simplifies the operating process, is suitable for citrus quality evaluation and grading, can accurately evaluate the morphology and distribution of citrus cells, and avoids sample damage.
Smart Images

Figure CN119090885B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of detection technology, and in particular to a citrus non-destructive detection method based on OCT combined with image analysis, a terminal device and a storage medium. Background Art
[0002] Citrus is an important fruit, and its quality evaluation, grading and non-destructive testing have always been a hot topic of research. Citrus oil cells are one of the important characteristics of citrus, and their morphology, quantity and distribution have a direct impact on the quality of citrus. At present, the methods for measuring oil cell morphology mainly include microscopic observation, scanning electron microscopy and other methods, but these methods have the disadvantages of complex operation, time-consuming and damage to samples.
[0003] Therefore, the present invention proposes a nondestructive detection method for citrus based on OCT combined with image analysis, aiming to achieve nondestructive detection of citrus oil cell structure and accurate characterization of the morphology, quantity and distribution of oil cells. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a citrus non-destructive detection method based on OCT combined with image analysis, a terminal device and a storage medium for realizing non-destructive detection of citrus oil cell structure.
[0005] In order to solve the above technical problems, the first technical solution adopted by the present invention is:
[0006] A non-destructive detection method for citrus based on OCT combined with image analysis, comprising:
[0007] Optical coherence tomography was used to non-destructively scan the citrus skin and obtain a sample two-dimensional image of the oil cells inside the citrus. The sample oil cell image was manually marked in the sample two-dimensional image, and the Unet deep learning model was trained and verified using the sample oil cell image to obtain a segmentation model.
[0008] Perform non-destructive testing, including:
[0009] Step 1: non-destructively scan the citrus fruits to be tested using optical coherence tomography technology to obtain a two-dimensional image of each citrus fruit to be tested;
[0010] Step 2: Mark and segment the two-dimensional image to be tested by using a segmentation model to obtain multiple independent two-dimensional images of oil cells, and perform three-dimensional reconstruction on the independent two-dimensional images of oil cells using three-dimensional image processing software to obtain a columnar three-dimensional structure diagram;
[0011] Step 3, using an ellipse model to approximate the three-dimensional structure of the oil cell to obtain a reconstructed shape of the ellipsoid of the oil cell; and using the diameter of any complete pixel point in the two-dimensional image of the oil cell as a reference thickness, and slicing the reconstructed shape of the ellipsoid from top to bottom at intervals of the reference thickness to obtain N layers of cross-sectional images;
[0012] Step 4, count the number of pixels num and the size of each pixel in each slice image, and calculate the volume area = num × size of each slice image; add the area corresponding to each slice image to obtain the volume of a single oil cell;
[0013] Step 5, using steps 3-4 to calculate the volume of each oil cell in each independent oil cell two-dimensional image in step 2, and then counting the volumes of all oil cells to obtain the total oil cell volume of the citrus to be tested;
[0014] Step 6, calculating the spatial distribution of oil cells on the citrus when executing step 2;
[0015] Step 7: End;
[0016] Counting the number of segmentations of the multiple independent oil cell two-dimensional images obtained in step 2, if the number of segmentations is greater than a preset value, the citrus is deemed unqualified and the citrus is marked so as not to participate in subsequent rating;
[0017] The total oil cell volume of each citrus fruit was calculated using non-destructive testing. The total oil cell volume was summarized and statistically analyzed, and the citrus fruits were rated based on the total oil cell volume, spatial distribution, and number of segmentations.
[0018] Preferably, performing three-dimensional reconstruction using three-dimensional image processing software further comprises:
[0019] The major and minor axes and area of the two-dimensional images of the oil cells were extracted using three-dimensional image processing software for three-dimensional reconstruction.
[0020] Preferably, when calculating the spatial distribution of oil cells on citrus, the area with the least oil cells is marked as an open mouth.
[0021] Preferably, oil cells that are segmented more than a preset number are recorded as irregular oil cells. If the number of irregular oil cells in a single citrus fruit exceeds 3% of the total number of oil cells, the citrus fruit will not be included in the rating.
[0022] Preferably, the citrus to be inspected is non-destructively scanned using optical coherence tomography technology, and the outer surface of the citrus is synchronously photographed to form a correlation relationship, and the distribution map formed by the oil cells is used as an identification feature for identification.
[0023] Preferably, the volume of each oil cell is statistically analyzed to obtain a normal distribution of each citrus oil cell, and the citrus is graded based on the total oil cell volume, spatial distribution, number of divisions, and standard deviation of the normal distribution of the oil cells.
[0024] Preferably, when the standard deviation of the normal distribution is smaller, the uniformity of the citrus oil cell morphology is better; when the standard deviation of the normal distribution is larger, the uniformity of the citrus oil cell morphology is worse.
[0025] Preferably, when the two-dimensional image to be tested is marked and segmented by the segmentation model, if an image that cannot be segmented appears, an alarm is directly issued.
[0026] In order to solve the above technical problems, the second technical solution adopted by the present invention is:
[0027] A terminal device comprises: a processor and a memory, wherein the memory is used to store computer program code, and the computer program code comprises computer instructions. When the processor executes the computer instructions, the terminal device executes the above-mentioned citrus non-destructive detection method based on OCT combined with image analysis.
[0028] In order to solve the above technical problems, the third technical solution adopted by the present invention is:
[0029] A computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor of a terminal device, the processor executes the above-mentioned non-destructive detection method for citrus based on OCT combined with image analysis.
[0030] The beneficial effects of the present invention are as follows: by adopting optical coherence tomography technology to perform non-destructive scanning on the citrus epidermis, optical coherence tomography (OCT) as a high-resolution, non-contact, non-invasive in vivo biological tissue imaging technology, combined with the application of the Unet image segmentation model in the convolutional neural network (CNN), it is possible to efficiently and accurately segment complex images, and the effectiveness of the cutting is guaranteed through training verification; the two-dimensional image of the oil cell obtained after cutting is the maximum section, and the cylinder is obtained by three-dimensional reconstruction based on the maximum section, and then the cylinder is cut into an ellipse, that is, a shape similar to the oil cell cell, and then according to any complete image of the two-dimensional image of the oil cell, the ellipse is formed. The diameter of the pixel point is the reference thickness, and the reconstructed shape of the ellipsoid is sliced from top to bottom at intervals of the reference thickness, and layer-by-layer calculation can obtain an approximate oil cell volume, and then the volume of all oil cells contained in a citrus is counted. Since it is a calculation method based on pixel level, the citrus can be accurately evaluated; by using spatial distribution as the evaluation criterion, the uneven spatial distribution of oil cells will affect the appearance and taste; and if the number of times the oil cell two-dimensional image segmentation occurs is greater than the preset value, it means that the edge of the oil cell shape is blurred, indicating that the oil cell is ruptured or diseased; the detection method of the present application has the advantages of simple operation, high efficiency, accuracy, and non-destructiveness, and is suitable for citrus quality evaluation and grading. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A schematic diagram of a process of a nondestructive detection method of citrus based on OCT combined with image analysis according to a specific embodiment of the present invention;
[0032] Figure 2 It is a schematic diagram of the nondestructive testing operation of a nondestructive testing method for citrus based on OCT combined with image analysis according to a specific embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
[0034] Please refer to Figure 1 to Figure 2 , a non-destructive detection method for citrus based on OCT combined with image analysis, comprising:
[0035] Optical coherence tomography was used to non-destructively scan the citrus skin and obtain a sample two-dimensional image of the oil cells inside the citrus. The sample oil cell image was manually marked in the sample two-dimensional image, and the Unet deep learning model was trained and verified using the sample oil cell image to obtain a segmentation model.
[0036] Perform non-destructive testing, including:
[0037] Step 1: non-destructively scan the citrus fruits to be tested using optical coherence tomography technology to obtain a two-dimensional image of each citrus fruit to be tested;
[0038] Step 2: Mark and segment the two-dimensional image to be tested by using a segmentation model to obtain multiple independent two-dimensional images of oil cells, and perform three-dimensional reconstruction on the independent two-dimensional images of oil cells using three-dimensional image processing software to obtain a columnar three-dimensional structure diagram;
[0039] Step 3, using an ellipse model to approximate the three-dimensional structure of the oil cell to obtain a reconstructed shape of the ellipsoid of the oil cell; and using the diameter of any complete pixel point in the two-dimensional image of the oil cell as a reference thickness, and slicing the reconstructed shape of the ellipsoid from top to bottom at intervals of the reference thickness to obtain N layers of cross-sectional images;
[0040] Step 4, count the number of pixels num and the size of each pixel in each slice image, and calculate the volume area = num × size of each slice image; add the area corresponding to each slice image to obtain the volume of a single oil cell;
[0041] Step 5, using steps 3-4 to calculate the volume of each oil cell in each independent oil cell two-dimensional image in step 2, and then counting the volumes of all oil cells to obtain the total oil cell volume of the citrus to be tested;
[0042] Step 6, calculating the spatial distribution of oil cells on the citrus when executing step 2;
[0043] Step 7: End;
[0044] Counting the number of segmentations of the multiple independent oil cell two-dimensional images obtained in step 2, if the number of segmentations is greater than a preset value, the citrus is deemed unqualified and the citrus is marked so as not to participate in subsequent rating;
[0045] The total oil cell volume of each citrus fruit was calculated using non-destructive testing. The total oil cell volume was summarized and statistically analyzed, and the citrus fruits were rated based on the total oil cell volume, spatial distribution, and number of segmentations.
[0046] From the above description, it can be seen that by adopting optical coherence tomography technology to perform non-destructive scanning of citrus skin, optical coherence tomography (OCT) is a high-resolution, non-contact, non-invasive in vivo biological tissue imaging technology, combined with the application of the Unet image segmentation model in the convolutional neural network (CNN), it is possible to efficiently and accurately segment complex images, and the effectiveness of the cutting is guaranteed after training and verification; the two-dimensional image of the oil cell obtained after cutting is the maximum section, and the cylinder is obtained by three-dimensional reconstruction based on the maximum section, and then the cylinder is cut into an ellipse, which is approximately the shape of the oil cell, and then according to any complete pixel point in the two-dimensional image of the oil cell, The diameter of the ellipsoid is taken as the reference thickness, and the reconstructed shape of the ellipsoid is sliced from top to bottom at intervals of the reference thickness. By calculating layer by layer, an approximate oil cell volume can be obtained, and then the volume of all oil cells contained in a citrus is counted. Since it is a calculation method based on pixel level, the citrus can be accurately evaluated. By adopting spatial distribution as the evaluation criterion, the uneven spatial distribution of oil cells will affect the appearance and taste. If the number of times the oil cell two-dimensional image segmentation occurs is greater than the preset value, it means that the edge of the oil cell shape is blurred, indicating that the oil cell is ruptured or diseased. The detection method of the present application has the advantages of simple operation, high efficiency, accuracy, and non-destructiveness, and is suitable for citrus quality evaluation and grading.
[0047] Furthermore, performing three-dimensional reconstruction using three-dimensional image processing software further includes:
[0048] The major and minor axes and area of the two-dimensional images of the oil cells were extracted using three-dimensional image processing software for three-dimensional reconstruction.
[0049] Furthermore, when calculating the spatial distribution of oil cells on citrus, the area with the least oil cells is marked as an open mouth.
[0050] From the above description, it can be seen that by marking the area with the least oil cells as the opening, due to the small number of oil cells, the oil cells are not easily squeezed and splashed with essential oil onto the eyes, face or body of the consumer when opening, which is convenient and safe to eat.
[0051] Furthermore, oil cells whose segmentation times are greater than a preset value are recorded as abnormally shaped oil cells. If the number of abnormally shaped oil cells of a single citrus exceeds 3% of the total number of oil cells, the citrus will not be included in the rating.
[0052] From the above description, we can see that by counting the number of abnormal oil cells, if it exceeds 3%, there is no point in grading the citrus and it can be directly regarded as citrus that does not require grading.
[0053] Furthermore, the citrus to be inspected is non-destructively scanned using optical coherence tomography technology, and the outer surface of the citrus is synchronously photographed to form a correlation relationship, and the distribution map formed by the oil cells is used as an identification feature for identification.
[0054] From the above description, it can be seen that by taking photos synchronously in time, the problem of incorrect citrus correspondence between non-destructive testing can be avoided. The distribution map of oil cell formation can be used as an identification feature to identify different citrus fruits and facilitate corresponding screening.
[0055] Furthermore, the volume of each oil cell was statistically analyzed to obtain the normal distribution of each citrus oil cell, and the citrus was graded based on the total oil cell volume, spatial distribution, number of segmentations, and the standard deviation of the normal distribution of the oil cells.
[0056] From the above description, we can know that the standard deviation can be used to determine the morphological uniformity of citrus oil cells. The better the uniformity, the better the quality of the citrus.
[0057] Furthermore, when the standard deviation of the normal distribution is smaller, the uniformity of the citrus oil cell morphology is better; when the standard deviation of the normal distribution is larger, the uniformity of the citrus oil cell morphology is worse.
[0058] Furthermore, when the two-dimensional image to be tested is marked and segmented by the segmentation model, if an image that cannot be segmented appears, an alarm is directly generated.
[0059] From the above description, it can be seen that by identifying the image that cannot be segmented, it means that the citrus has no oil cells or is damaged. Citrus without oil cells has advantages in genetic research and can be bred to obtain citrus without oil cells.
[0060] Embodiment 1
[0061] A non-destructive detection method for citrus based on OCT combined with image analysis, comprising:
[0062] Optical coherence tomography was used to non-destructively scan the citrus skin and obtain a sample two-dimensional image of the oil cells inside the citrus. The sample oil cell image was manually marked in the sample two-dimensional image, and the Unet deep learning model was trained and verified using the sample oil cell image to obtain a segmentation model.
[0063] Perform non-destructive testing, including:
[0064] Step 1: non-destructively scan the citrus fruits to be tested using optical coherence tomography technology to obtain a two-dimensional image of each citrus fruit to be tested;
[0065] Step 2: Mark and segment the two-dimensional image to be tested by using a segmentation model to obtain multiple independent two-dimensional images of oil cells, and use three-dimensional image processing software to extract the major and minor axes and the area of the two-dimensional images of the oil cells for three-dimensional reconstruction to obtain a columnar three-dimensional structure diagram;
[0066] Step 3, using an ellipse model to approximate the three-dimensional structure of the oil cell to obtain a reconstructed shape of the ellipsoid of the oil cell; and using the diameter of any complete pixel point in the two-dimensional image of the oil cell as a reference thickness, and slicing the reconstructed shape of the ellipsoid from top to bottom at intervals of the reference thickness to obtain N layers of cross-sectional images;
[0067] Step 4, count the number of pixels num and the size of each pixel in each slice image, and calculate the volume area = num × size of each slice image; add the area corresponding to each slice image to obtain the volume of a single oil cell;
[0068] Step 5, using steps 3-4 to calculate the volume of each oil cell in each independent oil cell two-dimensional image in step 2, and then counting the volumes of all oil cells to obtain the total oil cell volume of the citrus to be tested;
[0069] Step 6, calculating the spatial distribution of oil cells on the citrus when executing step 2;
[0070] Step 7: End;
[0071] The number of segmentations of the multiple independent oil cell two-dimensional images obtained in step 2 is counted. If the number of segmentations is greater than a preset value (for example, 3 times, which means that the boundaries are unclear, the oil cells may be damaged, diseased, or eaten by pests), the citrus is considered unqualified and marked as no longer participating in subsequent ratings.
[0072] The total oil cell volume of each citrus fruit was calculated using non-destructive testing. The total oil cell volume was summarized and statistically analyzed, and the citrus fruits were rated based on the total oil cell volume, spatial distribution, and number of segmentations.
[0073] in
[0074] When calculating the spatial distribution of oil cells on citrus, the area with the least oil cells is marked as the opening.
[0075] Oil cells that have been split more than the preset number are recorded as abnormally shaped oil cells. If the number of abnormally shaped oil cells in a single citrus fruit exceeds 3% of the total number of oil cells, the citrus fruit will not be included in the rating.
[0076] The citrus to be tested is non-destructively scanned using optical coherence tomography technology, and the outer surface of the citrus is photographed synchronously to form a correlation relationship. The distribution map of oil cells is used as an identification feature for identification.
[0077] The volume of each oil cell was counted to obtain the normal distribution of each citrus oil cell. The citrus was graded based on the total oil cell volume, spatial distribution, number of divisions, and the standard deviation of the normal distribution of the oil cells.
[0078] When the standard deviation of the normal distribution is smaller, the uniformity of the citrus oil cell morphology is better; when the standard deviation of the normal distribution is larger, the uniformity of the citrus oil cell morphology is worse.
[0079] When the two-dimensional image to be tested is marked and segmented through the segmentation model, if an image that cannot be segmented occurs, an alarm will be directly generated.
[0080] Embodiment 2
[0081] A terminal device comprises: a processor and a memory, wherein the memory is used to store computer program code, and the computer program code comprises computer instructions. When the processor executes the computer instructions, the terminal device executes the citrus non-destructive detection method based on OCT combined with image analysis as described in any one of the first embodiments.
[0082] Embodiment 3
[0083] A computer-readable storage medium having a computer program stored therein, wherein the computer program includes program instructions, and when the program instructions are executed by a processor of a terminal device, the processor executes the citrus non-destructive detection method based on OCT combined with image analysis as described in any one of Embodiment 1.
[0084] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A non-destructive detection method for citrus based on OCT combined with image analysis, characterized in that: include: Optical coherence tomography was used to non-destructively scan the citrus skin and obtain a sample two-dimensional image of the oil cells inside the citrus. The sample oil cell image was manually marked in the sample two-dimensional image, and the Unet deep learning model was trained and verified using the sample oil cell image to obtain a segmentation model. Perform non-destructive testing, including: Step 1: non-destructively scan the citrus fruits to be tested using optical coherence tomography technology to obtain a two-dimensional image of each citrus fruit to be tested; Step 2, marking and segmenting the two-dimensional image to be tested by using a segmentation model to obtain a plurality of independent two-dimensional images of oil cells, and reconstructing the independent two-dimensional images of oil cells by using three-dimensional image processing software to obtain a columnar three-dimensional structure diagram; Step 3, using an ellipse model to approximate the three-dimensional structure of the oil cell to obtain a reconstructed shape of the ellipsoid of the oil cell; and using the diameter of any complete pixel point in the two-dimensional image of the oil cell as a reference thickness, and slicing the reconstructed shape of the ellipsoid from top to bottom at intervals of the reference thickness to obtain N layers of cross-sectional images; Step 4, count the number of pixels num and the size of each pixel in each slice image, and calculate the volume area = num × size of each slice image; add the area corresponding to each slice image to obtain the volume of a single oil cell; Step 5, using steps 3-4 to calculate the volume of each oil cell in each independent oil cell two-dimensional image in step 2, and then counting the volumes of all oil cells to obtain the total oil cell volume of the citrus to be tested; Step 6, calculating the spatial distribution of oil cells on the citrus when executing step 2; Step 7: End; Counting the number of segmentations of the multiple independent oil cell two-dimensional images obtained in step 2, if the number of segmentations is greater than a preset value, the citrus is deemed unqualified and the citrus is marked so as not to participate in subsequent rating; The total oil cell volume of each citrus fruit was calculated using non-destructive testing. The total oil cell volume was summarized and statistically analyzed, and the citrus fruits were rated based on the total oil cell volume, spatial distribution, and number of segmentations.
2. The nondestructive detection method for citrus based on OCT combined with image analysis according to claim 1, characterized in that: The three-dimensional reconstruction using the three-dimensional image processing software further includes: The major and minor axes and area of the two-dimensional images of the oil cells were extracted using three-dimensional image processing software for three-dimensional reconstruction.
3. The nondestructive detection method of citrus based on OCT combined with image analysis according to claim 1, characterized in that: When calculating the spatial distribution of oil cells on citrus, the area with the least oil cells is marked as the opening.
4. The nondestructive detection method for citrus based on OCT combined with image analysis according to claim 1, characterized in that: Oil cells that have been split more than the preset number are recorded as abnormally shaped oil cells. If the number of abnormally shaped oil cells in a single citrus fruit exceeds 3% of the total number of oil cells, the citrus fruit will not be included in the rating.
5. The nondestructive detection method of citrus based on OCT combined with image analysis according to claim 1, characterized in that: The citrus to be tested is non-destructively scanned using optical coherence tomography technology, and the outer surface of the citrus is photographed synchronously to form a correlation relationship. The distribution map of oil cells is used as an identification feature for identification.
6. The nondestructive detection method for citrus based on OCT combined with image analysis according to claim 1, characterized in that: The volume of each oil cell was counted to obtain the normal distribution of each citrus oil cell. The citrus was graded based on the total oil cell volume, spatial distribution, number of divisions, and the standard deviation of the normal distribution of the oil cells.
7. The nondestructive detection method for citrus based on OCT combined with image analysis according to claim 6, characterized in that: When the standard deviation of the normal distribution is smaller, the uniformity of the citrus oil cell morphology is better; when the standard deviation of the normal distribution is larger, the uniformity of the citrus oil cell morphology is worse.
8. The nondestructive detection method for citrus based on OCT combined with image analysis according to claim 1, characterized in that: When the two-dimensional image to be tested is marked and segmented through the segmentation model, if an image that cannot be segmented occurs, an alarm will be directly generated.
9. A terminal device, characterized in that: include: A processor and a memory, wherein the memory is used to store computer program code, wherein the computer program code includes computer instructions. When the processor executes the computer instructions, the terminal device executes the citrus non-destructive detection method based on OCT combined with image analysis as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor of a terminal device, the processor executes the citrus non-destructive detection method based on OCT combined with image analysis as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Fruit near subcutaneous cell nondestructive imaging method based on SD-OCT
CN110264472A
High-precision phenotype extraction device for citrus fruits
CN117522777A