A nondestructive detection method for walnut internal and external mildew conditions by fusing X-ray and visual image information

By combining X-ray imaging and machine vision technologies and using the Extreme Learning Machine algorithm to build a discriminative model, the problem of non-destructive detection of internal and external mold in walnuts has been solved, achieving efficient and accurate walnut detection and improving the quality and safety of the walnut industry.

CN122193262APending Publication Date: 2026-06-12XINJIANG UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XINJIANG UNIVERSITY
Filing Date
2025-05-26
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Current technology cannot quickly and accurately detect mold growth inside and outside walnuts without causing damage, leading to economic losses for walnut farmers and food safety risks.

Method used

By combining X-ray imaging and machine vision technologies, internal and external image information of walnuts is collected. A discriminative model is constructed using the Extreme Learning Machine (ELM) algorithm to extract and optimize feature parameters, thereby achieving non-destructive detection of mold growth inside and outside walnuts.

🎯Benefits of technology

This technology enables high-precision, non-destructive testing of mold growth inside and outside walnuts, improving testing efficiency and accuracy, and ensuring food safety and farmers' income.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122193262A_ABST
    Figure CN122193262A_ABST
Patent Text Reader

Abstract

The application discloses a walnut internal and external mildew condition nondestructive detection method fusing X-ray and visual image information, the detection method is, X-ray irradiation is carried out to given walnut and X-ray image is collected and visual image is obtained by using a visual camera, the obtained original data set is subjected to digital image processing, image feature extraction and then the optimal feature data set is constructed, then the data processing and analysis are carried out by using machine learning, the feature parameters of walnut internal and external mildew are extracted and a discrimination classification model is constructed, the most suitable discrimination model and detection method are selected, thereby realizing nondestructive detection and classification of the mildew walnut. Through the above mode, the method and device can quickly, nondestructively and accurately detect the walnut with internal and external mildew, so as to promote walnut industry upgrading and efficiency increasing, guarantee food safety, improve farmers' income, consolidate the position of the forest and fruit industry as a pillar industry, and break the bottleneck of walnut postharvest commercial processing from quantity type to quality type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of rapid non-destructive testing technology for agricultural product quality, and in particular relates to a non-destructive testing method for the internal and external mold growth of walnuts that integrates X-ray and visual image information. Background Technology

[0003] The initial processing of Xinjiang walnuts mainly involves manual labor to remove the green husk, wash, dry, and remove the outer shell. During rainy weather, walnuts are susceptible to fungal infections in the air, leading to mold growth. Mixing moldy walnuts with healthy ones can cause even more mold to develop, resulting in economic losses for walnut farmers.

[0004] Traditional methods for identifying mold in agricultural products primarily rely on observing color and smelling, which are ineffective for assessing the internal condition of walnuts and are prone to errors. Internal quality testing typically requires breaking the shell and then using physical or chemical methods, which is time-consuming and labor-intensive. Therefore, there is an urgent need for a rapid, non-destructive, and accurate non-destructive testing technology for both internal and external mold growth in walnuts to improve the quality and efficiency of the walnut industry, ensure food safety, and increase farmers' income.

[0005] X-ray imaging technology can clearly display the internal images of samples. Its advantages include rapid response, non-destructive testing, and the ability to improve image quality through image processing techniques. Furthermore, well-equipped X-ray imaging systems can significantly reduce radiation exposure during use. In agricultural product testing, X-ray imaging technology is widely used for screening and classifying internal quality. Therefore, using X-ray detection technology to study mold growth in nuts and walnuts represents a novel approach.

[0006] Machine vision technology has achieved significant success in agricultural product inspection. With its continuous development, many researchers have explored image detection of agricultural fruits. The mold growth process in walnuts can generally be categorized into three types: mold growth inside the shell followed by mold growth outside; mold growth outside the shell followed by mold growth inside; and simultaneous mold growth inside and outside the shell. Moldy walnuts need to be identified and removed promptly; otherwise, the mold will infect healthy walnuts, causing more to mold. Therefore, combining the high penetration of X-ray detection technology to detect internal defects in walnuts with machine vision technology to obtain rich surface features of the sample, and integrating these two technologies to achieve real-time detection of moldy walnuts (both internal and external), can more accurately remove moldy walnuts, contributing significantly to improving the overall quality of walnuts and ensuring food safety.

[0007] Machine learning algorithms are advantageous for handling classification problems due to their high processing speed, small data volume, and low hardware requirements. Therefore, machine learning can be used to process and analyze data, extract characteristic parameters of internal and external mold growth on walnuts, and construct a discriminant classification model. By comparing the performance results of these models, the most suitable discriminant model and detection method can be found, thereby achieving non-destructive detection and classification of moldy walnuts.

[0008] Therefore, by combining X-ray images with machine vision images, and fully utilizing the advantages of both methods, information on moldy walnuts can be fused. This allows for a more comprehensive understanding of the extent of mold growth both inside and outside the walnut, significantly improving the detection accuracy and enabling non-destructive testing and classification of moldy walnuts. Compared to single-modal detection, the innovation of this invention lies in the non-destructive testing of internal and external mold growth in walnuts through the fusion of X-ray and machine vision information. This represents a new research trend and a completely new approach, with no related patent literature available. Summary of the Invention

[0009] The main technical problem solved by this invention is to provide a non-destructive detection method for the internal and external mold growth of walnuts that integrates X-ray and visual image information. Specifically, it uses X-ray detection technology to collect information on mold growth in nuts and walnuts, a visual camera to collect information on moldy walnuts, and then uses machine learning to process and analyze the data to extract characteristic parameters of internal and external mold growth and construct a discriminant classification model. Through the analysis of the model performance results, the most suitable discriminant model and detection method are used, providing necessary scientific basis for the future development of internal and external mold growth detection technology for nuts and walnuts, and solving the current problems of accuracy and efficiency in the non-destructive detection, classification, and storage of nuts and walnuts.

[0010] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: including the following steps.

[0011] Step 1: Preparation method of moldy walnuts: After manual selection, some normal walnuts of uniform size and quality with no broken shells are stored in a dry indoor environment, while others are placed in a constant temperature and humidity chamber with an ambient temperature of 25±1℃ and a relative humidity of 90±1% for one month to allow them to naturally mold. After being taken out, they are identified by visual inspection and divided into four categories according to the degree of mold on the inside and outside of the walnuts: walnuts that are normal inside and out, walnuts that are normal inside but moldy outside, walnuts that are moldy inside but normal outside, and walnuts that are moldy inside and out.

[0012] Step 2: Under stable and reliable experimental conditions, X-ray images and visual images of walnuts with different mold conditions were collected.

[0013] Step 3: Perform image preprocessing on the initial image to remove the effects of factors such as lighting and mechanical noise on the original image; Step 4: Extract image feature parameters, optimize features, and construct an effective feature dataset from the preprocessed X-ray and visual images. Extract feature sets that effectively represent different mold conditions in walnuts, including constructing texture feature sets for X-ray images and texture and color feature sets for visual images, and perform feature optimization to establish an effective feature set.

[0014] Step 5: Based on the established feature dataset, construct an Extreme Learning Machine (ELM) discriminant model using machine learning algorithms.

[0015] According to claim 1, a non-destructive testing method for internal and external mold growth in walnuts, integrating X-ray and visual image information, is characterized in that: step two involves using an X-ray foreign object detection system to acquire X-ray images and visual image datasets of the walnuts. To provide sufficient penetration and clarity for accurate detection of internal mold growth, the X-ray tube current and voltage parameters are set to 50 kV and 6 mA, respectively. In the visual parameter settings, the blue component is set to 500, and both supplementary lights 1 and 2 are set to 600, ensuring sufficient and uniform light source to avoid shadow interference in the images and enhance the accuracy of surface mold growth detection.

[0016] According to claim 1, the non-destructive detection method for internal and external mold growth of walnuts, which integrates X-ray and visual image information, is characterized in that: in step three, during the acquisition of X-ray and visual images of moldy walnuts, factors such as illumination and mechanical noise can affect image formation. Therefore, preprocessing of the acquired images is necessary. This process mainly includes image denoising, enhancement, and segmentation. To suppress or remove noise in the image and better highlight the walnut edge area, filtering of the acquired image is essential. Commonly used methods include mean filtering, median filtering, and Gaussian filtering. Image enhancement mainly improves image contrast by changing the grayscale range. Image segmentation mainly involves separating the walnut fruit area from the background area. Ensuring the separation of the walnut from the background area allows for more accurate extraction, processing, and analysis of the internal and external mold growth characteristics of the walnut.

[0017] According to claim 1, a non-destructive testing method for the internal and external mold growth of walnuts that integrates X-ray and visual image information is characterized in that: in step four, feature extraction helps reduce the dimensionality of the data, extract key information from the data, and reduce the computational burden; common feature extraction methods include edge profiling, color histograms, and texture features. Texture features, as one of the important features of an image, can fully reflect the overall features of the image. Commonly used texture feature extraction methods include Gray-Level Co-occurrence Matrix (GLCM) and Local Binary Pattern (LBP). Color feature extraction is mainly carried out in different color spaces, commonly including RGB, HSI, and Lab color spaces. Color features can be defined by color space models, commonly including RGB, HSI, and L*a*b*. These color space models represent colors in different ways. To quantify these color features, color moments can be used to describe color distribution. The first moment is used to describe the average intensity of the color channels, and the second moment is used to describe the dispersion of the color distribution of the color channels. By extracting the first and second moments of each channel from the three color spaces (RGB, HSI, L*a*b*), 18 color features can be obtained. X-ray images are typically output as grayscale images with only one grayscale channel, unlike the multiple color channels of a color image. Therefore, in the HSI and L*a*b* color spaces, some color-related channels will have no valid data, resulting in null values ​​or 0 for these channels. In X-ray images, the values ​​of the three texture features—correlation, energy, and homogeneity—are not significantly different. This may be because the walnuts have become moldy, but haven't formed sufficiently large cavities or significant density differences to disrupt their overall structural consistency. External mold has a more significant impact on the contrast of X-ray images, while internal mold increases the image entropy, leading to higher uncertainty and complexity. Therefore, these features (contrast and entropy) can be used to preliminarily determine the mold state of the walnuts. The Continuous Projection Method (SPA) is preferred for feature selection. SPA is a forward loop feature variable selection algorithm that minimizes collinearity in the vector space, extracting effective information variables from high-dimensional data, eliminating redundant information in the original data, and solving the problem of collinearity between variables. After feature selection, these features need to be used to build a classification model to correctly classify the internal and external mold of the walnuts. The SPA feature selection process not only effectively reduces feature dimensionality but also maintains high predictive accuracy, avoiding the negative impact of excessive redundant features on model performance. Models built using SPA-optimized features exhibit greater generalization ability and more stable discrimination performance, effectively improving overall detection accuracy and achieving an optimal balance between feature dimensionality reduction and sensitive feature retention. After feature optimization, these features are used to build a classification model to correctly classify internal and external mold growth in walnuts.

[0018] The non-destructive testing method for the internal and external mold conditions of walnuts, which integrates X-ray and visual image information according to claim 1, is characterized in that: in step five, Extreme Learning Machine (ELM) is a fast supervised learning algorithm. Its goal is to use a randomly generated weight matrix from the input layer to the hidden layer, and then calculate the weights of the output layer through analytical solutions. ELM can effectively learn the features in the input data through randomly generated hidden layer weights and biases. ELM is a model composed of a single-layer feedforward neural network with excellent learning capabilities. It not only has high learning accuracy but also good generalization performance and strong fitting ability. It can adjust the number of neurons in the input and output layers according to different experimental conditions, and has good application effects in machine fault diagnosis and classification and non-destructive testing of agricultural products.

[0019] The method for non-destructive testing of internal and external mold growth in walnuts by fusing X-ray and visual image information is characterized by a device comprising an image data acquisition system, a data fusion processing system, and a transmission system. The image data acquisition system includes an X-ray emitter, a protective shield, an X-ray emitter support, a visual camera, a visual camera support, a testing equipment mounting bracket, a light source, a TDI detector, and a light source support. Both the TDI detector and the visual camera are connected to a computer. The acquired X-ray data and machine vision image data are fused and processed within the computer. The transmission system includes a frame, a control box, a V-belt, pulleys, a motor, a conveyor belt, and rollers.

[0020] The non-destructive testing method for the internal and external mold of walnuts, which integrates X-ray and visual image information, is characterized in that: in the transmission system, the control box (2) is set at the lower end of the frame (2) and supported by the crossbeam on the frame (2). The control box is equipped with a switch button (1) for starting and stopping the machine. The motor (6) is installed on the upper side of the frame (2), the pulley (4) is located on the side of the frame and connected to the roller (17). The motor pulley and the pulley (4) are connected by a V-belt (5). The conveyor belt (16) is set on the upper side of the frame (2), and the roller (17) is completely wrapped by the conveyor belt. The movement of the roller (17) drives the movement of the conveyor belt. The image data acquisition system has a protective cover (8) mounted on the upper side of the frame (8), a TDI detector (19) mounted on the lower end of the conveyor belt (16), an X-ray emitter (9) mounted on the X-ray generator bracket (13) and used in conjunction with the TDI detector (19), a visual camera (11) mounted on the visual camera bracket (12), the X-ray generator bracket (12) and the visual camera (11) mounted together on the detection equipment mounting bracket (13), and an LED fill light (14) mounted on the fill light bracket (18) and fixed to the lower end of the visual camera (11) and the detection equipment mounting bracket (13).

[0021] The beneficial effects of this invention are as follows: This invention utilizes the fact that X-rays can penetrate the walnut shell, revealing the density information of the walnut's internal structure, thereby enabling the identification of moldy areas inside the kernel. The density of the moldy part of the walnut differs from that of the normal part, and this difference can be displayed on X-ray images. Visual images can provide color and texture information of the walnut shell surface, identifying external mold characteristics such as color changes or spots. By fusing X-ray and visual image information, the mold situation inside and outside the walnut can be identified more accurately. Machine learning algorithms utilize statistical and computational models to identify patterns and regularities from data, enabling prediction and decision-making. They can efficiently process and analyze complex datasets and have wide applications in the field of non-destructive testing of agricultural products. Therefore, this invention combines X-ray and visual images to construct a machine learning classification model, achieving accurate detection of different mold conditions inside and outside the walnut. Furthermore, this invention optimizes the features extracted from the data, ensuring that the detection is not only accurate but also fast, to meet the deployment requirements of practical production applications.

[0022] This invention combines X-ray and machine vision technologies, giving full play to their respective advantages, and more efficiently distinguishes between normal walnuts and moldy walnuts. It plays an important role in promoting the non-destructive testing and classification of moldy walnuts and is of great significance to the commercial development of walnuts. Attached Figure Description

[0023] Figure 1 This is a technical roadmap for the combined application of X-ray image information and machine vision image information in this invention.

[0024] Figure 2 This is a schematic diagram of the overall device of the present invention.

[0025] Figure 3 and Figure 4 A schematic diagram of the detection system used in this invention.

[0026] The components in the attached diagram are labeled as follows: 1. Switch button; 2. Frame; 3. Control box; 4. Pulley; 5. V-belt; 6. Motor; 7. X-ray; 8. Protective cover; 9. X-ray emitter; 10. X-ray emitter bracket; 11. Visual camera; 12. Visual camera bracket; 13. Inspection equipment mounting bracket; 14. LED supplementary light; 15. Walnut; 16. Conveyor belt; 17. Roller; 18. Supplementary light bracket; 19. TDI detector. Detailed Implementation

[0027] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby providing a clearer and more definite definition of the scope of protection of the present invention.

[0028] For specific implementation examples and steps, please refer to [link / reference]. Figure 1 and Figure 2 Example implementation device reference Figure 3 and Figure 4 Examples of embodiments of the present invention include: Taking Xinjiang "Xinfeng" walnuts as an example, the non-destructive testing of internal mold in other walnut varieties can refer to the method in this implementation example. Specifically, based on the evaluation criteria of the tested samples, a new knowledge base can be established to enable non-destructive testing of such products.

[0029] The non-destructive testing system for internal and external mold growth in walnuts consists of an image data acquisition system, a data fusion processing system, and a transmission system. The image data acquisition system includes an X-ray emitter, a protective shield, an X-ray emitter bracket, a vision camera, a vision camera bracket, a testing equipment mounting frame, a light source, a TDI detector, and a light source bracket. Both the TDI detector and the vision camera are connected to a computer. The computer performs feature fusion processing on the acquired X-ray data and machine vision image data. The transmission system includes a frame, a control box, a V-belt, pulleys, a motor, a conveyor belt, and rollers.

[0030] The control box (2) is located at the lower end of the frame (2) and is supported by the crossbeam on the frame (2). The control box is equipped with a switch button (1) for starting and stopping the machine. The motor (6) is mounted on the upper side of the frame (2). The pulley (4) is located on the side of the frame and is connected to the roller (17). The motor pulley and the pulley (4) are connected by a V-belt (5). The conveyor belt (16) is located on the upper side of the frame (2). The roller (17) is completely wrapped by the conveyor belt. The movement of the roller (17) drives the movement of the conveyor belt. The image data acquisition system has a protective cover (8) mounted on the upper side of the frame (8), a TDI detector (19) mounted on the lower end of the conveyor belt (16), an X-ray emitter (9) mounted on the X-ray generator bracket (13) and used in conjunction with the TDI detector (19), a visual camera (11) mounted on the visual camera bracket (12), the X-ray generator bracket (12) and the visual camera (11) mounted together on the detection equipment mounting bracket (13), and an LED fill light (14) mounted on the fill light bracket (18) and fixed to the lower end of the visual camera (11) and the detection equipment mounting bracket (13).

[0031] The specific steps are as follows.

[0032] After manual selection, some normal walnuts of uniform size and quality with undamaged shells were stored in a dry indoor environment, while others were placed in a constant temperature and humidity chamber at a temperature of 25±1℃ and a relative humidity of 90±1% for one month to allow them to naturally mold. After removal, the walnuts were visually identified and classified into four categories according to the degree of mold growth inside and outside the walnuts. An X-ray foreign object detection system was used to collect initial data for each of the four categories of walnuts, obtaining X-ray images and corresponding visual images to construct an initial dataset, including four types: walnuts that are normal inside and out, walnuts that are normal inside but moldy outside, walnuts that are moldy inside but normal outside, and walnuts that are moldy inside and out.

[0033] X-ray and visual image datasets of walnuts were acquired using an X-ray inspection system. The device employed an HVC80804 X-ray source with a tungsten core, a 45° beam angle, and a 25° anode angle. The adjustable ranges for tube current and voltage were 30kV-80kV and 0.5mA-8.0mA, respectively. To provide sufficient penetration and clarity for accurate detection of internal mold growth in the walnuts, the X-ray tube current and voltage were set to 50 kV and 6 mA, respectively. Visual image acquisition, like the X-ray source, required additional illumination from LED supplementary lights due to the weak lighting conditions of the visual camera within a metal protective casing. In the visual parameter settings, the blue component was set to 500, and both supplementary lights 1 and 2 were set to 600 to ensure sufficient and uniform light source coverage, avoiding shadow interference in the images and enhancing the accuracy of surface mold detection. The power source for the conveyor system is an MS1H3-13C15CB Huichuan servo motor, with the following technical parameters: rated torque of 8.34 N / m and rated speed of 1500 rpm. The system can achieve a continuously adjustable speed range of 10-90 m / min to meet different detection requirements. In actual experimental operation, when the belt speed is lower than 30 m / min, the X-ray image shows obvious tearing and elongation, and the visual image also becomes distorted due to the slow speed. Ultimately, this study set the conveyor belt speed to 60 m / min, a commonly used speed in factory production, and all subsequent operations were performed under this setting.

[0034] The calibrated X-ray and visual inspection system acquires X-ray and visual images of healthy and moldy walnuts, respectively. When X-rays penetrate the walnut, the differences in absorption coefficients of different parts of the walnut, such as the shell, kernel, and moldy tissue, create a grayscale contrast image. The TDI detector captures the intensity differences of the X-rays after penetrating the walnut, generating a grayscale image. The moldy area appears as a shadow due to density changes.

[0035] At the start of the inspection, to ensure stable light source operation, the system automatically begins X-ray source preheating. After preheating, motor 6 rotates, driving the pulley via a V-belt, which in turn rotates roller 16, thus initiating the operation of the entire conveyor belt 16. Once the belt speed stabilizes, the walnut to be tested 15 is placed at one end of the conveyor belt. The walnut then enters the inspection area within the protective cover 8. LED supplementary lighting 14 provides illumination for the machine vision camera, and the vision camera 11 captures the machine vision image of the walnut. The walnut continues through the X-ray inspection area, where X-ray emitter 9 emits X-ray beams 7, illuminating the walnut 15. The TDI detector 19 detects the signal, acquiring the X-ray image of the walnut. This yields a dataset of X-ray and machine vision images.

[0036] After acquiring X-ray and visual images through an X-ray and machine vision inspection system, the initial images are preprocessed using methods such as noise reduction, enhancement, and morphological processing on a computer image processing system to remove the influence of factors such as illumination and mechanical noise on the original images.

[0037] Walnut image data processing and analysis using computers, including image feature extraction, feature optimization, and the collection and construction of walnut datasets.

[0038] Texture features such as energy, entropy, contrast, and correlation are extracted, and grayscale histogram features such as mean, variance, and peak are used to construct an X-ray feature set. Color features such as R, G, B, H, S, I, L, a, and b, as well as texture features, are extracted to construct a visual image feature set.

[0039] Since there is a significant correlation between internal and external image features and walnut mold status, the continuous projection method (SPA) is used to optimize different feature set combinations to obtain the features most relevant to walnut mold and reduce the redundancy of irrelevant features in the feature set. The optimized and screened effective feature set sensitive to internal and external moldy walnuts is used to construct a non-destructive detection database for moldy walnuts.

[0040] Utilizing a pre-selected feature set of X-ray and machine vision information, traditional machine learning algorithms such as Extreme Learning Machine (ELM) are employed to fuse X-ray and machine vision information. A high-precision real-time pattern classification system is constructed to process the X-ray and machine vision data and is linked to a database for learning and training, resulting in a knowledge base. A discrimination model for moldy walnuts is established at both the feature and decision levels. The original dataset is divided into training, validation, and test sets in a 7:2:1 ratio, ultimately enabling the discrimination of the presence or absence of mold in the walnuts being tested, thus distinguishing between four types: walnuts that are normal inside and out, walnuts that are normal inside but moldy outside, walnuts that are moldy inside but normal outside, and walnuts that are moldy inside and out.

[0041] Finally, it should be noted that the above description is merely an implementation example of the present invention and is not intended to limit the patent scope of the present invention. Any equivalent substitutions made using the technical features described in the present invention and the accompanying drawings, or direct or indirect applications to other related technical fields, should similarly fall within the protection scope of the present invention.

Claims

1. A non-destructive testing method for the internal and external mold growth of walnuts, integrating X-ray and visual image information, characterized in that... Follow these steps; Step 1: Preparation method of moldy walnuts: After manual selection, some normal walnuts of uniform size and quality with no broken shells are placed in a dry indoor environment for normal storage, and some are placed in a constant temperature and humidity chamber with an ambient temperature of 25±1℃ and a relative humidity of 90±1% for one month to allow them to mold naturally. After taking them out, they are identified by visual inspection and divided into four categories according to the degree of mold on the inside and outside of the walnuts. Step 2: Under stable and reliable experimental conditions, X-ray images and machine vision images of walnuts with different levels of mold were acquired. Step 3: Perform image preprocessing on the initial image to remove the effects of factors such as lighting and mechanical noise on the original image; Step 4: Extract image feature parameters, optimize features, and construct an effective feature dataset from the preprocessed X-ray and machine vision images. Extract feature sets that effectively represent different mold conditions in walnuts, including constructing texture feature sets for X-ray images and texture and color feature sets for machine vision images, and perform feature optimization to establish an effective feature set. Step 5: Based on the established feature dataset, construct an ELM discriminant model using machine learning algorithms.

2. The non-destructive testing method for the internal and external mold growth of walnuts, which integrates X-ray and visual image information according to claim 1, is characterized in that: In step two, X-ray and visual image information was collected from four types of walnuts with different levels of mold: walnuts with normal internal and external conditions, walnuts with normal internal conditions but moldy external conditions, walnuts with moldy internal conditions but normal external conditions, and walnuts with moldy internal and external conditions.

3. The non-destructive testing method for the internal and external mold growth of walnuts, which integrates X-ray and visual image information according to claim 1, is characterized in that: Step three involves preprocessing X-ray and machine vision images of walnuts with different mold conditions. This process mainly includes image denoising, enhancement, and segmentation. Gaussian filtering (window size 5×5) is used to eliminate image noise. The grayscale range is adjusted to improve image contrast to [0, 255]. Thresholding segmentation (Otsu's algorithm) is used to separate the walnut region from the background.

4. The non-destructive testing method for the internal and external mold growth of walnuts, which integrates X-ray and visual image information according to claim 1, is characterized in that: In step four, feature extraction involves using the Gray-Level Co-occurrence Matrix (GLCM) method to extract texture features such as energy, entropy, contrast, and correlation from the X-ray image. An X-ray feature set is constructed using gray-level histogram features such as mean, variance, and peak value. Color features such as R, G, B, H, S, I, L, a, and b, as well as texture features, are extracted from the visual image. The first and second moments of each channel are calculated, resulting in a total of 18 color features, which are then used to construct the machine vision image feature set.

5. The non-destructive testing method for the internal and external mold growth of walnuts, which integrates X-ray and visual image information according to claim 1, is characterized in that: In step four, feature optimization involves fusing the extracted X-ray image features and machine vision image features to construct an original feature set, and then using the continuous projection method (SPA) optimization algorithm to optimize the original feature set.

6. The non-destructive testing method for internal and external mold growth in walnuts, which integrates X-ray and visual image information according to claim 1, is characterized in that: The machine learning algorithm used in step five is the traditional machine learning algorithm of Extreme Learning Machine (ELM).

7. A non-destructive testing method for the internal and external mold growth of walnuts, integrating X-ray and visual image information, characterized in that... The device consists of an image data acquisition system, a data fusion processing system, and a transmission system; the image data acquisition system includes, The system comprises an X-ray emitter, a protective shield, an X-ray emitter bracket, a vision camera, a vision camera bracket, a detection equipment mounting bracket, a light source, a TDI detector, and a light source bracket. Both the TDI detector and the vision camera are connected to a computer. The computer performs feature fusion processing on the acquired X-ray data and machine vision image data. The transmission system includes a frame, a control box, a V-belt, pulleys, a motor, a conveyor belt, and rollers.

8. The non-destructive testing method for the internal and external mold growth of walnuts, which integrates X-ray and visual image information according to claim 7, is characterized in that: In the transmission system, the control box (2) is located at the lower end of the frame (2) and supported by the crossbeam on the frame (2). The control box is equipped with a switch button (1) for starting and stopping the machine. The motor (6) is mounted on the upper side of the frame (2), and the pulley (4) is located on the side of the frame and connected to the roller (17). The motor pulley and the pulley (4) are connected by a V-belt (5). The conveyor belt (16) is located on the upper side of the frame (2), and the roller (17) is completely wrapped by the conveyor belt. The movement of the roller (17) drives the conveyor belt to move smoothly. In the image data acquisition system, the protective cover (8) is mounted on the upper side of the frame (8) to shield external interference and protect the internal equipment. The TDI detector (19) is mounted at the lower end of the conveyor belt (16), and the X-ray emitter (9) is mounted on the X-ray generator bracket (13) and used in conjunction with the TDI detector (19). The TDI detector is used to capture the signal of the intensity difference of X-rays after penetrating the walnut. The visual camera (11) is mounted on the visual camera bracket (12). The X-ray generator bracket (12) and the visual camera (11) are mounted together on the inspection equipment mounting bracket (13). The LED supplementary light (14) is mounted on the supplementary light bracket (18) and fixed to the lower end of the visual camera (11) and the inspection equipment mounting bracket (13) to provide uniform illumination to enhance the accuracy of surface mold detection.