Nondestructive testing analysis method and system for internal structure of fruit
Through multi-source data fusion and deep learning models, the problem of signal aliasing in the detection of internal structure of fruits was solved, and high-precision non-destructive detection of multi-layer structure fruits was achieved, reducing the misjudgment rate and improving detection accuracy.
Patent Information
- Application Number
- CN202510736198.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When existing technologies detect fruits with multi-layer structures such as grapefruit and pomegranate, signal overlap and nonlinear enhancement problems lead to a high misjudgment rate, making it difficult to accurately distinguish the features of each layer. In particular, artifacts have a serious impact when X-raying grapefruit.
A multi-source detection data fusion method is adopted to identify the fruit tissue structure hierarchy through the intersection area of image and spectral signals, a signal decomposition model is constructed for decoupling processing, and a deep learning model is combined for feature analysis. Credibility assessment and weighted decision-making are performed based on the logical constraint relationship of the tissue layer.
Accurately distinguish the internal structural areas of fruits, reduce the misjudgment rate, and improve detection accuracy and stability, especially for the internal quality assessment of multi-layered fruits.
Smart Images

Figure CN120635889A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fruit detection, and in particular to a method and system for non-destructive detection and analysis of the internal structure of fruit. Background Art
[0002] Nondestructive testing and analysis of fruit's internal structure uses physical or computational techniques (such as optical imaging, X-rays, ultrasound, or near-infrared spectroscopy) to examine and analyze the fruit's internal structure, defects (such as insect infestations and decay), maturity, or moisture content without damaging the fruit's appearance or integrity. This technology is widely used in fruit grading, pre-processing screening, and smart agriculture, improving testing efficiency and product quality control.
[0003] The existing technology has the following shortcomings:
[0004] In nondestructive testing of fruit, signal overlap and nonlinear enhancement often occur due to the complex tissue structure of fruits such as grapefruit and pomegranates. Multiple reflections and absorptions occur during signal penetration across tissue layers such as the skin, flesh, and seed cavity, resulting in aliasing of the captured image or spectral signal. This makes it difficult to accurately distinguish the characteristics of each layer, and can easily misinterpret natural structures such as the seed cavity as cavities or rotten areas. For example, in X-ray analysis of grapefruit, the uneven refraction of the flesh creates artifacts that, under existing algorithms, result in a misjudgment rate of up to 30%, severely impacting detection accuracy and practical application. Summary of the Invention
[0005] The purpose of the present invention is to provide a method and system for nondestructive detection and analysis of the internal structure of fruit, so as to overcome the shortcomings of the background technology.
[0006] In order to achieve the above object, the present invention provides the following technical solution: a method for nondestructive detection and analysis of the internal structure of fruit, comprising:
[0007] Obtain multi-source detection data of the fruit to be tested, including penetrating image data and responsive structural signal data;
[0008] Preprocessing the image data and signal data respectively, and identifying the fruit tissue structure layer based on the image signal intersection area to form different tissue partition labels of the skin, flesh and seed cavity;
[0009] A signal decomposition model based on the tissue hierarchy is constructed to decouple the signal contributions of each tissue layer and fuse the image texture features with the spectral response features to generate a multi-dimensional fusion feature vector.
[0010] Inputting the fusion features into a trained deep learning model to perform internal structural feature analysis and output identification results of the structural integrity, sugar content, density, defect type and spatial location of each tissue layer;
[0011] Based on the mutual constraint relationship between the recognition result data of each organizational layer, the credibility of the detection results is evaluated, and the recognition results of each organizational layer are weighted and output according to the evaluation results.
[0012] Preferably, the identifying of the fruit tissue structure level based on the image signal intersection area includes:
[0013] Mapping the image and spectral data into spatial coordinates;
[0014] Automatically mark the epidermis, pulp layer and seed cavity layer based on the grayscale distribution and spectral reflectance changes of the image;
[0015] Generate a structural label map and assign a tissue layer number to each pixel or area.
[0016] Preferably, the constructed signal decomposition model is based on the tissue label map, the overall detection signal is represented as a linear combination of the signals of each tissue layer, and the contribution coefficient of each layer signal is optimized by the minimum reconstruction error principle to decouple the aliasing signals of the skin, pulp and seed cavity.
[0017] Preferably, the texture direction deviation index is generated after analyzing the extracted image texture features, and the generation method is:
[0018] In several discrete directions θ i Generate Gabor filters on each direction θ i , calculate the convolution response of the image in this direction The expression is: Where I(x,y) is the original image and * is the convolution operation;
[0019] The image is divided into several regions, and for each region B j , calculate the mean of the filter responses in all directions The expression is: Select the direction of maximum response Calculate the weighted average direction of all block directions in the entire image The expression is: in The maximum response intensity is calculated by the texture direction deviation index DTDI, which is expressed as: N is the total number of image blocks.
[0020] Preferably, the spectral slope change index is generated after analyzing the extracted spectral response characteristics, and the generation method is:
[0021] Select the band range that is sensitive to the target parameter, and set the selected band range to [λ a ,λb ]; let R i (λ j ) is the average spectral reflectance curve in the i-th tissue area, where λ represents the wavelength, and the central difference approximation is used to calculate the discrete first-order derivative within the band: Where: D i (λ j ) is the wavelength λ of tissue area i j The local slope at λ j is the sampling point in the band; for region i and region j, calculate the average derivative value within the band interval The expression is: n is the total number of regions; the spectral slope change index SSSI is calculated as follows:
[0022] Preferably, the texture direction deviation index and the spectral slope change index are converted into a comprehensive feature vector, and the comprehensive feature vector is used as the input of the machine learning model; the deep learning model is a neural network model with a shared backbone and a multi-task output structure. After inputting the fusion feature vector, it simultaneously outputs: the classification results of the structural integrity of each tissue layer, the regression prediction values of sugar content and density, the classification results of defect types, and the spatial position coordinates or heat map of defects or tissue abnormalities.
[0023] Preferably, a deviation measurement function is established for each constraint relationship, and the logical consistency score of each tissue layer identification result is comprehensively calculated, specifically:
[0024] Define an undirected graph G = (V, E), where nodes V represent different organizational layers; edges E = {(i, j)} represent physical proximity or logical dependency between organizational layers; and edge weights w ij Represents the constraint strength between organizational layers; defines the attribute vector x for each node i , containing the recognition results of this layer: x i =[density i , sugar content i ,defect coding i ]; Establish a set of expected attribute differences based on the physiological structure of fruits The expression is: is the expected attribute vector of the i-th organizational layer, is the expected attribute vector of the jth organizational layer. For each pair of connected nodes (i, j), the residual r between the actual recognition result and the expected relationship is calculated. ij , the expression is: Define the logical consistency deviation L on each edge ij For: L ij =wij ·||r ij || 2 ; Sum all edges centered on node i to get the logical consistency score ILCS of the organizational layer i , the expression is: Where, is the set of nodes adjacent to node i.
[0025] Preferably, the logical consistency score ILCS i Normalize and back-transform to a confidence score: min(ILCS) is the minimum logical consistency score, max(ILCS) is the maximum logical consistency score; TCS i ∈[0,1], the final recognition results of each organizational layer are fused with credibility weights to form the optimized output: in, is the final weighted output value, V i is the original prediction value of the model at the current organizational layer i, V 邻近层 is the predicted value of the adjacent tissue layer.
[0026] The present invention also provides a non-destructive detection and analysis system for the internal structure of fruit, comprising a multi-source data acquisition module, a tissue structure partitioning and preprocessing module, a feature extraction and fusion modeling module, a deep learning structure recognition and attribute prediction module, and a logical consistency assessment and credible weighted output module;
[0027] Multi-source data acquisition module: acquires multi-source detection data of the fruit to be tested, including penetrating image data and responsive structural signal data;
[0028] Tissue structure partitioning and preprocessing module: preprocesses the image data and signal data respectively, and identifies the fruit tissue structure layer based on the image signal intersection area, forming different tissue partition labels for the skin, flesh and seed cavity;
[0029] Feature extraction and fusion modeling module: Constructs a signal decomposition model based on the tissue hierarchy, decouples the signal contribution of each tissue layer, and fuses image texture features and spectral response features to generate a multi-dimensional fusion feature vector;
[0030] Deep learning structure recognition and attribute prediction module: inputs the fusion features into the trained deep learning model to perform internal structural feature analysis and output the structural integrity, sugar content, density, defect type and spatial location identification results of each tissue layer;
[0031] Logical consistency assessment and credible weighted output module: Based on the mutual constraints of the identification result data of each organizational layer, the credibility of the detection results is evaluated, and the identification results of each organizational layer are weighted and output according to the evaluation results.
[0032] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0033] 1. This paper constructs a multi-source fusion analysis method based on images and spectra to address the signal aliasing and misidentification issues that exist in traditional nondestructive testing of multi-layered fruits such as grapefruit and pomegranates. It proposes a technical approach based on tissue hierarchical partitioning, signal decoupling, and deep learning multi-task recognition. This method can accurately distinguish structural regions such as the epidermis, flesh, and seed cavity, and achieve comprehensive identification of sugar content, density, defect type, and their spatial location. In particular, the use of the texture direction deviation index (DTDI) and the spectral slope change index (SSSI) as feature fusion indicators effectively enhances the ability to express multidimensional features and improves the detection model's sensitivity to subtle defects such as early lesions and cavities.
[0034] 2. This invention introduces a graph structure consistency assessment mechanism based on logical constraints at the tissue level. It constructs a physical and physiological correlation model between tissue-level identification results, assigns credibility scores to predictions, and implements dynamic weighted decision-making based on these scores, significantly improving the stability and robustness of detection results. This overall solution reduces the misjudgment rate caused by X-ray artifacts and effectively improves the accuracy of internal quality assessments for complex fruit products. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments described in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0036] Figure 1 This is a mind map of the method of the present invention.
[0037] Figure 2 This is a mind map of the system modules of the present invention. DETAILED DESCRIPTION
[0038] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0039] Example 1, please refer to Figure 1 As shown, the nondestructive detection and analysis method of the internal structure of fruit described in this embodiment includes:
[0040] Obtain multi-source detection data of the fruit to be tested, including penetrating image data and responsive structural signal data;
[0041] Preprocessing the image data and signal data respectively, and identifying the fruit tissue structure layer based on the image signal intersection area to form different tissue partition labels of the skin, flesh and seed cavity;
[0042] A signal decomposition model based on the tissue hierarchy is constructed to decouple the signal contributions of each tissue layer and fuse the image texture features with the spectral response features to generate a multi-dimensional fusion feature vector.
[0043] Inputting the fusion features into a trained deep learning model to perform internal structural feature analysis and output identification results of the structural integrity, sugar content, density, defect type and spatial location of each tissue layer;
[0044] Based on the mutual constraint relationship between the recognition result data of each organizational layer, the credibility of the detection results is evaluated, and the recognition results of each organizational layer are weighted and output according to the evaluation results.
[0045] In this example, a grapefruit was selected as the object for inspection, and a combination of penetrating imaging technology and responsive structural signal technology was employed to achieve high-precision nondestructive testing of its internal structure. This process relies on the collaborative work of an X-ray imaging system and a near-infrared spectroscopy system to achieve simultaneous acquisition and subsequent fusion analysis of multi-layer tissue signals.
[0046] The grapefruit to be tested is placed on an automatic conveying device and the surface dust and water mist are removed through an air-blowing dust removal module to ensure that the surface is clean and free of foreign matter.
[0047] The infrared sensors installed on both sides of the conveyor belt identify the area where the fruit enters, and the electric turntable is started to keep the fruit in the same direction to ensure standardized imaging angles.
[0048] The system assigns a unique QR code to each fruit and automatically identifies it through the visual system, enabling the simultaneous association of image and spectral data with the sample.
[0049] The X-ray detection module uses a low-dose multi-energy spectrum X-ray source and a high-resolution flat-panel digital detector (such as a CsI scintillator array detector) to capture the internal density image of the fruit.
[0050] Acquisition parameter settings: X-ray voltage: set to 40 kV; current: 1.0 mA; exposure time: set to 120 ms according to the size of the grapefruit; resolution: set to 1024 × 1024 pixels.
[0051] When a fruit enters the acquisition window, the system triggers the X-ray source to emit radiation. An image is exposed and captured by the detector within 0.1 seconds, and transmitted to the central control computer in real time. The image is saved in 16-bit TIFF format and named according to the fruit number for easy subsequent association.
[0052] The NIR spectrum acquisition system uses a near-infrared spectrometer with a wavelength coverage range of 900–1700 nm, combined with a diffuse reflection fiber optic probe, to collect data in a non-contact manner.
[0053] Acquisition method: The probe is installed above the conveyor belt, approximately 5 cm from the surface of the grapefruit. The system automatically identifies the center of the fruit and performs three consecutive spectral scans in the core area to reduce local deviations. Each acquisition time is 0.5 seconds, and the integration time is adjusted to enhance signal stability.
[0054] Before each day of testing, the light source was calibrated using a standard white plate. All spectral signals were subjected to background subtraction and SNV (standard normal variate) processing to eliminate differences in reflection intensity between samples.
[0055] Each sample corresponds to a set of multidimensional spectral vectors (such as 256 bands), which are output in CSV format and correspond one-to-one with the image data through the sample number.
[0056] An industrial-grade PLC controller unifies the acquisition commands for both the imaging and spectral systems, ensuring millisecond synchronization of image and spectral acquisition. Due to the fixed probe mounting structure, both data are spatially aligned to the fruit core, eliminating the need for secondary image registration. All data is stored in a local database.
[0057] After completing multi-source data acquisition, this embodiment performs refined preprocessing on the collected X-ray image data and near-infrared spectral signal data, respectively, and combines the spatially overlapping areas of the two types of data to complete the automatic identification and regional partitioning of the fruit tissue structure hierarchy, generating a tissue structure label map for subsequent analysis.
[0058] The collected X-ray images contain a certain amount of high-frequency noise and low-contrast areas. To improve image quality, this embodiment uses the following method to perform image cleaning:
[0059] Use a median filter (window size is 3×3) to remove salt and pepper noise;
[0060] A Gaussian filter (σ = 1.5) was applied to smooth the image and suppress high-frequency interference in the detail area;
[0061] Adaptive histogram equalization (CLAHE) is used on the edge areas of the image to enhance the contrast and highlight the tissue boundaries.
[0062] The Sobel operator is used to extract image gradient information and detect tissue edges. The Canny edge detection algorithm is used to mark the boundary contours between different tissues on the enhanced image, especially to form obvious edges at the junction of the peel and flesh and the seed cavity where density mutations are likely to occur.
[0063] Preprocessing of spectral data (near-infrared signals):
[0064] First, each spectral vector is smoothed using a Savitzky-Golay filter (window width 11, third-order polynomial) to eliminate high-frequency jitter;
[0065] Then, a standard normal variate transformation (SNV) was performed to correct the differences in scattering effects between samples so that all spectral features had a uniform scale and mean;
[0066] Finally, the first-order derivative processing of the spectrum is performed to enhance the trend of spectral changes and improve the sensitivity to differences in tissue composition.
[0067] Select the sugar content sensitive band (such as 970nm), moisture sensitive band (such as 1450nm), and cell density characteristic band (such as 1210nm); generate a simplified characteristic spectrum for each sampling point for spatial binding with the image position.
[0068] Using the sensor installation position calibration parameters, the image coordinate system is mapped one-to-one with the spectral scanning path; ensuring that the image and spectral data cover the same physical area, especially the core (seed cavity), the middle of the flesh, and the area near the skin.
[0069] Tissue structure layer identification and regional partitioning: Based on image density characteristics and spectral response changes, the internal areas of the fruit are automatically identified as follows:
[0070] Skin identification: The image shows a high-density, continuous banded structure; the spectral reflectance is low, and the absorption in the moisture band is strong; this is labeled "Layer_1." Flesh identification: The image has a relatively uniform grayscale but slightly lower density than the skin; the spectral reflectance fluctuates significantly in the sugar band (900–1000nm); this is labeled "Layer_2." Seed cavity identification: The image shows cavities, low grayscale areas, or discontinuous distributions; the spectral reflectance drops sharply, indicating an abnormal moisture response; this is labeled "Layer_3."
[0071] The recognition results are converted into a tissue label map of the same dimension, and the tissue region number of each position is assigned at the pixel level; the label map is output as a grayscale image or partition matrix and stored together with the image and spectral data for model training or detection inference.
[0072] After preprocessing the image and spectral data and partitioning the fruit tissue layers, this example developed a signal decoupling analysis method based on hierarchical modeling of the tissue structure to identify and distinguish the independent contributions of different tissue layers, such as the skin, flesh, and seed cavity, to the detection signal. Subsequently, through deep fusion of image texture features and spectral response characteristics, a multidimensional fused feature vector suitable for defect identification and quality assessment was generated.
[0073] According to the generated tissue labeling map, the fruit is divided into three categories: epidermis layer (Layer_1), flesh layer (Layer_2), and seed cavity layer (Layer_3); each layer is defined as an independent signal receiving subsystem with its own spectral response and image representation;
[0074] Build a structural model: Among them, S total (x,y) is the total observation signal at a certain position, α i (x, y) is the contribution coefficient of each tissue layer at the pixel point, S i (x,y) is the raw signal estimate of the tissue layer itself.
[0075] Contribution coefficient initialization and optimization: Initially estimate the weight coefficient of each layer based on the image grayscale and edge intensity; use standard samples or the principle of local minimum difference to optimize and adjust to minimize the reconstruction error after decoupling the layered signals.
[0076] Signal decoupling processing includes:
[0077] Use graph-cut or region growing algorithms to finely segment the boundaries of different layers;
[0078] Normalized statistics are performed on the image pixel values in each tissue area, and image features such as mean grayscale value, texture energy value and edge gradient density are calculated to represent the image expression of each layer of structure separately.
[0079] Extract the normalized spectral vectors of all points in the corresponding tissue layer area;
[0080] Principal component analysis (PCA) was used to extract the most important spectral variation trend of each layer;
[0081] The average absorption intensity and change rate of each layer in the key band are further calculated to describe the physical or chemical state of the layer (such as sugar content, water content).
[0082] Image texture feature extraction includes:
[0083] The following texture parameters are selected as the basis of image features:
[0084] GLCM texture energy, contrast, and correlation;
[0085] LBP (local binary pattern) histogram distribution;
[0086] Edge density index and porosity;
[0087] After analyzing the extracted image texture features, the texture direction deviation index is generated. The generation method is:
[0088] In several discrete directions θ i To generate Gabor filters on the angles (such as 0°, 30°, 60°, 90°, ..., 150°), the following complex Gabor kernel function is usually used: Where: x ′ =xcosθ+ysinθ;y ′ = -xsinθ + ycosθ; λ is the wavelength (controls the periodic texture sensing, recommended value is 4–10 pixels); θ is the filter direction angle (unit: radians); ψ is the phase offset (usually set to 0 or π / 2); σ is the standard deviation of the Gaussian envelope (usually 0.5–1 times λ); γ is the spatial aspect ratio (controls the filter elliptical shape, typical value is 0.5).
[0089] For each direction θ i , calculate the convolution response of the image in this direction The expression is: Where I(x,y) is the original image and * is the convolution operation;
[0090] The image is divided into several small regions (such as 16×16 or 32×32 pixel blocks), and for each region B j , calculate the mean of the filter responses in all directions The expression is: Select the direction of maximum response Calculate the weighted average direction of all block directions in the entire image The expression is: in is the maximum response intensity of the block, which is used for weighting. The texture direction deviation index DTDI is calculated as follows: N is the total number of image blocks. A larger value of the texture direction deviation index indicates a more dispersed and inconsistent texture direction.
[0091] Spectral feature extraction includes:
[0092] The following key feature values are extracted:
[0093] Absorption intensity at three key wavelengths: 970nm, 1450nm, and 1210nm;
[0094] Maximum rate of change of the first-order derivative of the spectrum;
[0095] Multi-band ratio combination (such as 970nm / 910nm);
[0096] The spectral features of each layer of tissue are output in vector form.
[0097] After analyzing the extracted spectral response characteristics, the spectral slope change index is generated. The generation method is:
[0098] Select the wavelength range that is sensitive to the target parameter. Common examples include: 910–970nm: sugar content (soluble solids) absorption region; 1400–1450nm: water absorption region; 1200–1300nm: cell density / tissue structure change sensitive region. a ,λ b ].
[0099] Let R i (λ j ) is the average spectral reflectance curve within the i-th tissue region (such as the epidermis, pulp, or seed cavity), where λ represents the wavelength in nanometers. The discrete first-order derivative (i.e., the reflectance slope) within this band is calculated using the central difference approximation: Where: D i (λ j ) is the wavelength λ of tissue area i j The local slope at λ j is the sampling point within the band (each interval is 5nm); usually the window span is about Δλ=10nm to ensure stability.
[0100] For region i (such as flesh) and region j (such as seed cavity), calculate the average derivative value (i.e., average slope) within the band interval: n is the total number of regions; the spectral slope change index SSSI is calculated as follows:
[0101] The higher the SSSI, the greater the difference in the spectral slopes between the two regions, which can be used to determine different tissue functions or components (such as sugar concentration vs. cavity); the lower the SSSI, the more similar the spectral responses of the two regions, indicating a continuous or uniform tissue structure.
[0102] The image features and spectral features are fused in series to form a unified fusion feature vector: the feature vector length is generally 50-100 dimensions and can be adjusted according to the actual model needs. Each fruit sample outputs a fusion feature matrix, which includes image features, spectral features
[0103] All sample data are stored in a structured database for subsequent model training, defect judgment and quality estimation modules to call.
[0104] The texture direction deviation index and spectral slope change index are converted into a comprehensive feature vector, which is used as the input of the machine learning model. A fully connected neural network (MLP) or one-dimensional convolutional network (1D-CNN) structure is used. The backbone network extracts high-order representations of fused features, and the branch network outputs multi-task predictions.
[0105] The comprehensive feature vector of each region, all regions form a batch input for unified prediction.
[0106] Model outputs include:
[0107] Structural integrity: intact / slightly damaged / void (classified output);
[0108] Sugar content: predict °Brix value (regression output);
[0109] Density value: predicted g / cm 3 (regression output);
[0110] Defect type: rotten / worm-eaten / normal, etc. (classified output);
[0111] Spatial position: relative coordinates or area number (positioning output).
[0112] The prediction results of each region are reorganized into a structural identification map of the whole fruit according to its spatial position; structured data files are output or heat maps and grading maps are generated for quality inspection, sorting or traceability records.
[0113] For each fruit sample, the deep learning model outputs the following recognition results based on the comprehensive feature vectors of each region and summarizes them by tissue layer:
[0114] Structural integrity status (e.g., intact, slightly damaged, voided);
[0115] Sugar content prediction value (°Brix);
[0116] Tissue density (g / cm 3 );
[0117] Type of defect (e.g., rot, insect damage);
[0118] Spatial location (region coordinates or mask);
[0119] Each type of identification result is structured and organized according to tissue layers (epidermis, pulp, seed cavity).
[0120] Construct a rationality constraint model between each organizational layer to constrain the logical consistency between identification results. An example is as follows:
[0121] Density constraint: peel density > flesh density > seed cavity (usually empty or low density);
[0122] Sugar content constraint: sugar content changes between adjacent tissue layers should be smooth and should not change suddenly (if the difference between the flesh and the seed cavity is less than a certain threshold);
[0123] Defect propagation constraint: If there is rot in the seed cavity, the flesh may also be abnormal, but the opposite is not true;
[0124] Locational plausibility: The area identified as a defect, if located within the epidermal label, should be abnormal in both density and structural integrity.
[0125] A deviation measurement function is established for each constraint relationship, and the logical consistency score of the identification results of each organizational layer is comprehensively calculated, specifically:
[0126] Define an undirected graph G = (V, E), where nodes V represent different tissue layers (such as epidermis, pulp, and seed cavity); edges E = {(i, j)} represent the physical proximity or logical dependency between tissue layers; and edge weights w ij Indicates the strength of constraints between organizational layers (such as structural proximity and attribute coupling).
[0127] Define the attribute vector x for each node (organization layer) i , containing the recognition results of this layer: x i =[density i , sugar content i ,defect coding i ]; density and sugar content are numerical values; defect type is encoded as one-hot or embedded vector form.
[0128] Establish a set of expected attribute differences based on the physiological structure of fruits The expression is: is the expected attribute vector of the i-th tissue layer, which represents the standard identification value combination that the tissue layer should have under normal physiological conditions, such as expected density, sugar content, defect type (such as no defect), etc. is the expected attribute vector of the j-th tissue layer, representing the standard attribute value of another tissue layer for comparison with the i-th layer; for example, the expected peel density is greater than the flesh, and the sugar content of the flesh is greater than the seed cavity; it can be set manually or obtained through data statistical modeling.
[0129] For each pair of connected nodes (i, j), calculate the residual r between its actual recognition result and the expected relationship ij , the expression is: Indicates the deviation of the recognition result from the theoretical relationship. Define the logical consistency deviation L on each edge ij For: L ij =w ij ·||r ij || 2 ; Use Euclidean distance to measure overall differences; weight w ij Used to adjust the importance of different organizational relationships.
[0130] Sum all edges centered on node i to get the logical consistency score ILCS of the organizational layer i , the expression is: Where, is the set of nodes adjacent to node i; the larger the logical consistency score, the more inconsistent the relationship between this layer and other organizational layers, and the lower the credibility.
[0131] Logical consistency score ILCS i Normalize and back-transform to a confidence score: min(ILCS) is the minimum logical consistency score, max(ILCS) is the maximum logical consistency score; TCS i ∈[0,1], the higher the value, the more reliable the identification result of the tissue layer; each layer can be scored independently, or the overall reliability in a single area can be evaluated in combination.
[0132] The final recognition results of each tissue layer are fused with credibility weights to form the optimized output: weighted regression results (sugar content, density): in, is the final weighted output value, V i is the original prediction value of the model at the current organizational layer i, V 邻近层 is the predicted value of the adjacent tissue layer; if the tissue layer credibility is less than the preset threshold (such as 0.4), the adjacent high-credibility layer result voting or logical reconstruction is used instead; a confidence flag can be introduced for selective processing or review by downstream systems.
[0133] Example 2, please refer to Figure 2 As shown, the fruit internal structure nondestructive detection and analysis system described in this embodiment includes a multi-source data acquisition module, a tissue structure partitioning and preprocessing module, a feature extraction and fusion modeling module, a deep learning structure recognition and attribute prediction module, and a logical consistency assessment and trustworthy weighted output module;
[0134] Multi-source data acquisition module: acquires multi-source detection data of the fruit to be tested, including penetrating image data and responsive structural signal data;
[0135] Tissue structure partitioning and preprocessing module: preprocesses the image data and signal data respectively, and identifies the fruit tissue structure layer based on the image signal intersection area, forming different tissue partition labels for the skin, flesh and seed cavity;
[0136] Feature extraction and fusion modeling module: Constructs a signal decomposition model based on the tissue hierarchy, decouples the signal contribution of each tissue layer, and fuses image texture features and spectral response features to generate a multi-dimensional fusion feature vector;
[0137] Deep learning structure recognition and attribute prediction module: inputs the fusion features into the trained deep learning model to perform internal structural feature analysis and output the structural integrity, sugar content, density, defect type and spatial location identification results of each tissue layer;
[0138] Logical consistency assessment and credible weighted output module: Based on the mutual constraints of the identification result data of each organizational layer, the credibility of the detection results is evaluated, and the identification results of each organizational layer are weighted and output according to the evaluation results.
[0139] The above formulas are all dimensionless and numerical calculations. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters in the formulas are set by technicians in this field according to actual conditions.
[0140] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. A and B can be singular or plural. Furthermore, the character " / " as used herein generally indicates an "or" relationship between the associated objects, but it may also indicate an "and / or" relationship. For specific understanding, please refer to the context.
[0141] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0142] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the scope of protection of the present application.
Claims
1. A method for nondestructive detection and analysis of the internal structure of fruit, characterized by: include: Obtain multi-source detection data of the fruit to be tested, including penetrating image data and responsive structural signal data; Preprocessing the image data and signal data respectively, and identifying the fruit tissue structure layer based on the image signal intersection area to form different tissue partition labels of the skin, flesh and seed cavity; A signal decomposition model based on the tissue hierarchy is constructed to decouple the signal contributions of each tissue layer and fuse the image texture features with the spectral response features to generate a multi-dimensional fusion feature vector. Inputting the fusion features into a trained deep learning model to perform internal structural feature analysis and output identification results of the structural integrity, sugar content, density, defect type and spatial location of each tissue layer; Based on the mutual constraint relationship between the recognition result data of each organizational layer, the credibility of the detection results is evaluated, and the recognition results of each organizational layer are weighted and output according to the evaluation results.
2. The method for nondestructive testing and analyzing the internal structure of fruit according to claim 1, wherein: The method of identifying the fruit tissue structure level based on the image signal intersection area includes: Mapping the image and spectral data into spatial coordinates; Automatically mark the epidermis, pulp layer and seed cavity layer based on the grayscale distribution and spectral reflectance changes of the image; Generate a structural label map and assign a tissue layer number to each pixel or area.
3. The method for nondestructive testing and analyzing the internal structure of fruit according to claim 1, wherein: The constructed signal decomposition model is based on the tissue label map, which represents the overall detection signal as a linear combination of the signals of each tissue layer. The contribution coefficient of each layer signal is optimized by the minimum reconstruction error principle to decouple the aliasing signals of the skin, pulp and seed cavity.
4. The method for nondestructive testing and analyzing the internal structure of fruit according to claim 1, wherein: After analyzing the extracted image texture features, the texture direction deviation index is generated. The generation method is: In several discrete directions θ i Generate Gabor filters on each direction θ i , calculate the convolution response of the image in this direction The expression is: Where I(x,y) is the original image and * is the convolution operation; The image is divided into several regions, and for each region B j , calculate the mean of the filter responses in all directions The expression is: Select the direction of maximum response Calculate the weighted average direction of all block directions in the entire image The expression is: in The maximum response intensity is calculated by the texture direction deviation index DTDI, which is expressed as: N is the total number of image blocks.
5. The method for nondestructive detection and analysis of the internal structure of fruit according to claim 4, wherein: After analyzing the extracted spectral response characteristics, the spectral slope change index is generated. The generation method is: Select the band range that is sensitive to the target parameter, and set the selected band range to [λ a ,λ b ]; let R i (λ j ) is the average spectral reflectance curve in the i-th tissue area, where λ represents the wavelength, and the central difference approximation is used to calculate the discrete first-order derivative within the band: Where: D i (λ j ) is the wavelength λ of tissue area i j The local slope at λ j is the sampling point in the band; for region i and region j, calculate the average derivative value within the band interval The expression is: n is the total number of regions; the spectral slope change index SSSI is calculated as follows:
6. The method for nondestructive detection and analysis of the internal structure of fruit according to claim 5, wherein: The texture direction deviation index and the spectral slope change index are converted into a comprehensive feature vector, and the comprehensive feature vector is used as the input of the machine learning model; the deep learning model is a neural network model with a shared backbone and a multi-task output structure. After inputting the fusion feature vector, it simultaneously outputs: the classification results of the structural integrity of each tissue layer, the regression prediction values of sugar content and density, the classification results of defect types, and the spatial position coordinates or heat map of defects or tissue abnormalities.
7. The method for nondestructive detection and analysis of the internal structure of fruit according to claim 6, wherein: A deviation measurement function is established for each constraint relationship, and the logical consistency score of the identification results of each organizational layer is comprehensively calculated, specifically: Define an undirected graph G = (V, E), where nodes V represent different organizational layers; edges E = {(i, j)} represent physical proximity or logical dependency between organizational layers; and edge weights w ij Represents the constraint strength between organizational layers; defines the attribute vector x for each node i , containing the recognition results of this layer: x i =[density i , sugar content i ,defect coding i ]; Establish a set of expected attribute differences based on the physiological structure of fruits The expression is: is the expected attribute vector of the i-th organizational layer, is the expected attribute vector of the jth organizational layer. For each pair of connected nodes (i, j), the residual r between the actual recognition result and the expected relationship is calculated. ij , the expression is: Define the logical consistency deviation L on each edge ij For: L ij =w ij ·||r ij || 2 ; Sum all edges centered on node i to get the logical consistency score ILCS of the organizational layer i , the expression is: Where, is the set of nodes adjacent to node i.
8. The method for nondestructive detection and analysis of the internal structure of fruit according to claim 7, wherein: Logical consistency score ILCS i Normalize and back-transform to a confidence score: min(ILCS) is the minimum logical consistency score, and max(ILCS) is the maximum logical consistency score; TCS i ∈[0,1], the final recognition results of each organizational layer are fused with credibility weights to form the optimized output: in, is the final weighted output value, V i is the original prediction value of the model at the current organizational layer i, V 邻近层 is the predicted value of the adjacent tissue layer.
9. A nondestructive detection and analysis system for the internal structure of fruit, used to implement the nondestructive detection and analysis method for the internal structure of fruit according to any one of claims 1 to 8, characterized in that: It includes multi-source data acquisition module, organizational structure partitioning and preprocessing module, feature extraction and fusion modeling module, deep learning structure recognition and attribute prediction module, and logical consistency assessment and trustworthy weighted output module; Multi-source data acquisition module: acquires multi-source detection data of the fruit to be tested, including penetrating image data and responsive structural signal data; Tissue structure partitioning and preprocessing module: preprocesses the image data and signal data respectively, and identifies the fruit tissue structure layer based on the image signal intersection area, forming different tissue partition labels for the skin, flesh and seed cavity; Feature extraction and fusion modeling module: Constructs a signal decomposition model based on the tissue hierarchy, decouples the signal contribution of each tissue layer, and fuses image texture features and spectral response features to generate a multi-dimensional fusion feature vector; Deep learning structure recognition and attribute prediction module: inputs the fusion features into the trained deep learning model to perform internal structural feature analysis and output the structural integrity, sugar content, density, defect type and spatial location identification results of each tissue layer; Logical consistency assessment and credible weighted output module: Based on the mutual constraints of the identification result data of each organizational layer, the credibility of the detection results is evaluated, and the identification results of each organizational layer are weighted and output according to the evaluation results.
Citation Information
Cited By
Multi-stage screening and quality detection method for peaches
CN121354095A