In-situ nondestructive detection method of portable fresh corn quality detection system
Through the multiplexed mobile platform and lightweight quality detection network of the portable fresh corn quality detection system, the interference problem of outer bract tissue on optical detection is solved, and the in-situ non-destructive detection of the internal quality of fresh corn is achieved, and the accuracy and portability of the detection are improved.
Patent Information
- Application Number
- CN202510704862.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-08-12
AI Technical Summary
Traditional reflective and transmissive optical detection technologies are difficult to effectively collect optical information of the internal grains of fresh corn, and the absorption and scattering of outer bract tissues make it difficult to conduct in-situ non-destructive testing.
The portable fresh corn quality detection system is adopted, and a multiplexed mobile platform and a single spectrometer combined with an array probe is used to predict quality indicators through spatially resolved multi-channel spectral acquisition technology and lightweight quality detection networks, including scale compensation, dynamic time regularization and three-dimensional spatial mapping model to achieve non-destructive detection.
In-situ non-destructive testing at the fresh corn planting site is realized, which can effectively collect optical information of internal grains, avoid the influence of bracts and cobs, and improve the accuracy and portability of the detection.
Smart Images

Figure CN120468046A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of spectral technology, and in particular to an in-situ non-destructive detection method for a portable fresh corn quality detection system. Background Art
[0002] The edible part of fresh corn is the kernel. Kernel soluble solids, moisture content, and texture are not only quality parameters of concern to consumers but also crucial traits in the breeding process. In-situ testing of fresh corn quality is necessary to understand how its quality changes during growth, select varieties with superior traits, and determine the optimal harvest period.
[0003] Fresh corn consists of three parts: the husk, kernel, and cob. The outer husk tissue's wrapping effect presents challenges for optical nondestructive testing technologies such as machine vision, near-infrared spectroscopy, and hyperspectral imaging. Due to the absorption and scattering of light by the outer husk, traditional reflective and transmissive optical inspection techniques struggle to capture sufficient optical information reflecting the kernel's quality. Furthermore, the collected spectra contain a significant amount of husk tissue information, making them difficult to use for in-situ measurement of fresh corn kernel quality. Summary of the Invention
[0004] In response to the above-mentioned problems and technical requirements, this application proposes an in-situ non-destructive testing method for a portable fresh corn quality testing system. The technical solution of this application is as follows:
[0005] A portable fresh corn quality detection system for in-situ nondestructive testing is disclosed. The portable fresh corn quality detection system comprises a portable box, a light source, a spectrometer, a multiplexing mobile platform, a PLC controller, a point light source optical fiber, and K receiving optical fibers, where the integer parameter K is greater than or equal to 2.
[0006] The light source, spectrometer, multiplexing mobile platform, and PLC controller are all arranged in a portable box, and the PLC controller is electrically connected to the spectrometer and the multiplexing mobile platform. The light input port of the point light source optical fiber is connected to the light output port of the light source, and the light output port is led out of the portable box. The light output port of each receiving optical fiber is placed inside the portable box, and the light input port is led out of the portable box. The light output port of the point light source optical fiber and the light input ports of K receiving optical fibers are led out of the portable box and then integrated together to form the detection end face of the array probe. The data acquisition port of the spectrometer and the light output ports of the K receiving optical fibers are sequentially connected through the multiplexing mobile platform.
[0007] In-situ non-destructive testing methods include:
[0008] After the detection end face of the array probe is attached to the surface of the fresh corn, an emission spectrum is output by a light source and irradiated onto the surface of the fresh corn via a point light source optical fiber;
[0009] The PLC controller controls the multiplexing mobile platform to connect the data acquisition port of the spectrometer to the light outlet of each receiving optical fiber in sequence. The spectrometer obtains the spatially resolved spectrum of one channel through the connected receiving optical fibers and uploads it to the PLC controller.
[0010] The spatially resolved spectra of K channels are input into a pre-trained lightweight quality detection network through a PLC controller to obtain the quality index prediction results of fresh corn.
[0011] A further technical solution is that the in-situ non-destructive testing method further includes:
[0012] After the PLC controller performs scale compensation on the spatially resolved spectra of K channels, the dynamic time warping algorithm is used to perform time sequence alignment on the spatially resolved spectra of K channels;
[0013] A three-dimensional spatial mapping model is constructed according to the spatial position of the optical ports of each optical fiber on the detection end face of the array probe. The spatially resolved spectra of each channel after time alignment are bilinearly interpolated using the three-dimensional spatial mapping model to complete spatial consistency compensation, and then input into a pre-trained lightweight quality detection network.
[0014] A further technical solution is that the PLC controller performs scale compensation on the spatially resolved spectra of K channels, including:
[0015] Performing scale compensation on the spatially resolved spectrum obtained via any i-th receiving optical fiber according to the physical parameters of the i-th receiving optical fiber combined with the physical parameters of the reference optical fiber;
[0016] The physical parameters of each receiving optical fiber include the diameter of the receiving optical fiber and the spatial distance between the light input port of the receiving optical fiber and the light output port of the point light source optical fiber. The reference optical fiber is one of the receiving optical fibers.
[0017] A further technical solution is to dynamically compensate the spatially resolved spectrum obtained through the i-th receiving optical fiber according to the physical parameters of any i-th receiving optical fiber. i for:
[0018]
[0019] Among them, I i is the light intensity before dynamic compensation, d i is the spatial distance between the light port of the i-th receiving fiber and the light outlet of the point light source fiber, φ i is the diameter of the i-th receiving optical fiber; d ref is the spatial distance between the light port of the reference fiber and the light outlet of the point light source fiber, φ ref is the diameter of the reference fiber.
[0020] A further technical solution is that the multiplexed mobile platform includes a first acquisition board, a second acquisition board, and a linear electric slide. The first acquisition board is provided with a fixing hole, and the first acquisition board is fixed to a slider of the linear electric slide. The second acquisition board is arranged relative to the first acquisition board and is provided with K fixing holes in sequence along the linear electric guide rail of the linear electric slide.
[0021] The data acquisition port of the spectrometer is fixed in the fixed hole of the first acquisition board through a collimating lens, and the light outlets of K receiving optical fibers are respectively fixed in the K fixed holes of the second acquisition board through collimating lenses; the PLC controller is connected to and controls the slider of the linear electric slide to drive the first acquisition board to move to K sampling positions along the linear electric guide rail in sequence. At each sampling position, the fixed hole on the first acquisition board is aligned with a fixed hole on the second acquisition board, and the data acquisition port of the spectrometer and the light outlet of the receiving optical fiber are connected through the collimating lens.
[0022] Its further technical solution is that the lightweight quality detection network includes a local feature extraction module, a global feature extraction module, a feature fusion module and an output prediction module, and the spatially resolved spectra of K channels input into the lightweight quality detection network are input into the local feature extraction module and the global feature extraction module respectively;
[0023] The local feature extraction module extracts local features from the spatially resolved spectra of K channels to obtain local features and outputs them to the feature fusion module;
[0024] The global feature extraction module performs global feature modeling on the spatially resolved spectra of K channels to extract global temporal dependency features and outputs them to the feature fusion module;
[0025] The feature fusion module combines local features and global temporal dependency features in the channel dimension, performs adaptive weighted fusion using the channel attention mechanism, and then performs dimensionality reduction processing through the fully connected layer before outputting the fused feature vector to the output prediction module.
[0026] The output prediction module performs regression prediction on the fused feature vector and outputs the quality index prediction results.
[0027] Its further technical solution is that the local feature extraction module is built based on the 1D-CNN module and contains three convolutional layers. The convolution kernel sizes used in the three convolutional layers are 5, 3, and 3 respectively, with a step size of 1 and an activation function of ReLU.
[0028] The global feature extraction module is built based on the Transformer module and includes a layer of multi-head self-attention mechanism and a feedforward neural network. The number of heads of the multi-head self-attention mechanism is K, and the activation function of the feedforward neural network is ReLU.
[0029] Its further technical solution is that the portable fresh corn quality detection system includes 4 receiving optical fibers, the light outlets of the point light source optical fibers and the light inlets of the 4 receiving optical fibers are arranged in sequence along a straight line on the detection end face of the array probe; the diameters of the two receiving optical fibers with a smaller spatial distance between the light inlet and the light outlet of the point light source optical fiber are 400 μm, and the diameters of the two receiving optical fibers with a larger spatial distance between the light inlet and the light outlet of the point light source optical fiber are 600 μm.
[0030] A further technical solution is that the spatial distances between the light input ports of the four receiving optical fibers and the light output port of the point light source optical fiber are 2 mm, 3.2 mm, 4.4 mm, and 5.6 mm, respectively, from small to large.
[0031] A further technical solution is that the detection end face of the array probe is circumferentially covered with a soft light shield.
[0032] The beneficial technical effect of the present application is: the present application discloses an in-situ non-destructive detection method for a portable fresh corn quality detection system, the portable fresh corn quality detection system builds a circuit and optical path structure based on a portable box according to the principle of spatially resolved multi-channel spectral acquisition, and uses a multiplexed mobile platform combined with a spectrometer to realize spectral acquisition of multiple channels. The spatially resolved multi-channel spectral acquisition technology can well collect optical information reflecting the quality of the internal kernels of fresh corn, avoiding the influence of bracts and cobs, so that the portable fresh corn quality detection system can be used to perform in-situ non-destructive quality detection of fresh corn at the fresh corn planting site. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a schematic diagram of the system structure of a portable fresh corn quality detection system in one embodiment of the present application.
[0034] Figure 2 Schematic diagram of the optical port of the detection end face of the array probe 8.
[0035] Figure 3 It is a structural exploded diagram of a multiplexed mobile platform in one embodiment of the present application.
[0036] Figure 4 It is a flow chart of an in-situ non-destructive testing method in one embodiment of the present application.
[0037] Figure 5 This is a network structure diagram of a lightweight quality detection network in one embodiment of the present application. DETAILED DESCRIPTION
[0038] The specific implementation of this application will be further described below with reference to the accompanying drawings.
[0039] The present application discloses an in-situ non-destructive testing method for a portable fresh corn quality testing system. The portable fresh corn quality testing system for implementing the in-situ non-destructive testing method is built based on a portable box, so that the portable fresh corn quality testing system can be carried to the fresh corn planting site to perform in-situ non-destructive testing on the fresh corn during the growth process.
[0040] This portable fresh corn quality detection system includes a light source 1, a spectrometer 2, a multiplexing mobile platform 3, a programmable logic controller (PLC) 4, a point light source optical fiber 5, and K receiving optical fibers, where the integer parameter K is ≥ 2. The light source 1, spectrometer 2, multiplexing mobile platform 3, and PLC 4 are all housed in a portable enclosure. The PLC 4 is the control and data processing component of the portable fresh corn quality detection system and is electrically connected to the spectrometer 2 and multiplexing mobile platform 3.
[0041] Light source 1 utilizes a 100W bulb with a built-in focusing lens system and a high-coupling-efficiency fiber optic port to maximize output power, providing a continuous spectrum output from 360 to 2500 nm. The output power can be continuously adjusted using a knob. Spectrometer 2 consists of a CMOS detector coupled with a 32-bit RISC microcontroller, offering a spectral resolution of 0.2 nm to 10 nm and a spectral range of 180 to 1100 nm.
[0042] Please refer to Figure 1 The system structure diagram shown in Figure 1 For example, four receiving optical fibers are denoted as 61 to 64 . Figure 1 The portable box is not shown, and the actual portable box can adopt any box structure. In addition, the portable fresh corn quality detection system also includes a power supply module placed in the portable box for supplying power to the above-mentioned electrical components. Figure 1 Not shown in the figure.
[0043] The light inlet of the point source optical fiber 5 is connected to the light outlet of the light source 1, and the light outlet of the point source optical fiber 5 is led out of the portable case. The light outlet of each receiving optical fiber is placed inside the portable case, and the light inlet of the receiving optical fiber is led out of the portable case. The light outlet of the point source optical fiber 5 and the light inlets of the K receiving optical fibers are led out of the portable case and then integrated together to form the detection end face of the array probe 8. In addition, for ease of use, the portion of the point source optical fiber 5 and the K receiving optical fibers outside the portable case is fixed by a molding tube 9.
[0044] The portable fresh corn quality detection system is based on the spatial resolution multi-channel spectral acquisition technology. In one embodiment, after testing and verification, in order to obtain better spectral acquisition effect, the portable fresh corn quality detection system includes four receiving optical fibers such as Figure 1 The light outlet of the point light source optical fiber 5 and the light inlet of the four receiving optical fibers 61 to 64 are arranged in sequence along a straight line on the detection end face of the array probe 8. The schematic diagram of the detection end face of the array probe 8 is shown in FIG. Figure 2 shown.
[0045] The smaller the spatial distance between the light input port of the receiving fiber and the light output port of the point light source fiber 5, the stronger the light intensity received by the receiving fiber. Therefore, when the distance between the light input port of the receiving fiber and the light output port of the point light source fiber 5 is too close, the spectral data collected by the receiving fiber is prone to overexposure. When the distance between the light input port of the receiving fiber and the light output port of the point light source fiber 5 is too far, the signal intensity of the spectral data collected by the receiving fiber is too small to be easily detected. Therefore, in order to ensure that the receiving fiber has a better detection effect, this embodiment is designed from two aspects:
[0046] On the one hand, the diameters of the optical fibers were rationally designed, including designing the diameter of the point light source optical fiber 5 to be 1000 μm to ensure stable light source output. Furthermore, the diameters of the two receiving optical fibers (receiving optical fibers 61 and 62), which have a smaller distance between the light input and the light output of the point light source optical fiber 5, were designed to be 400 μm, and the diameters of the two receiving optical fibers (receiving optical fibers 63 and 64), which have a larger distance between the light input and the light output of the point light source optical fiber 5, were designed to be 600 μm.
[0047] On the other hand, the spatial distance between the light input port of each receiving optical fiber and the light output port of the point light source optical fiber 5 is reasonably designed. The spatial distances between the light input ports of the four receiving optical fibers 61, 62, 63, and 64 and the light output ports of the point light source optical fiber are 2 mm, 3.2 mm, 4.4 mm, and 5.6 mm, respectively, from small to large.
[0048] By reasonably designing the diameter and spatial distance of each optical fiber, it can be ensured that when each receiving optical fiber collects spectral data after a fixed exposure time, the spectral data collected by the receiving optical fiber close to the point light source optical fiber 5 will not be overexposed, and the spectral data collected by the receiving optical fiber far from the point light source optical fiber 5 will not be too small, and each receiving optical fiber has a good spectral collection effect.
[0049] In actual application, the detection end face of the array probe 8 is attached to the surface of fresh corn. In order to reduce the influence of external ambient light, the detection end face of the array probe 8 is also covered with a soft light shield in the circumference. In this way, when the detection end face of the array probe 8 is attached to the surface of the husk of fresh corn, the soft light shield achieves a light shielding effect, avoiding light leakage due to the uneven surface of the fresh corn, which cannot be fully attached and affects the spectrum collection.
[0050] When the light outlets of each receiving optical fiber are placed inside the portable case, they need to be connected to the data acquisition port of the spectrometer 2. To achieve portability, the spatial structure of the portable fresh corn quality detection system is limited. A single spectrometer only has a single-channel data acquisition function. To achieve multi-channel spectral data acquisition of K receiving optical fibers, if K spectrometers are used, the system volume will be too large, making it difficult to achieve portability. Therefore, this application uses a single spectrometer 2 to reduce the system volume to meet the portability requirement. In order to multiplex a single spectrometer 2 to achieve the acquisition of multiple spectra, the data acquisition port of the spectrometer 2 and the light outlets of the K receiving optical fibers are sequentially connected through a multiplexing mobile platform 3.
[0051] Please refer to Figure 3 The structural exploded diagram of the multiplexed mobile platform 3 is shown. The multiplexed mobile platform 3 includes a first acquisition board 31, a second acquisition board 32 and a linear electric slide. The linear electric slide includes a linear electric guide rail 33 and a slider 34 placed on the linear electric guide rail 33. The PLC controller 4 is connected to and controls the slider 34 of the linear electric slide to move along the linear electric guide rail 33.
[0052] The first acquisition board 31 is provided with a fixing hole 31 a , and the data acquisition port of the spectrometer 2 is fixed in the fixing hole 31 a of the first acquisition board 31 through a collimator 35 . The data acquisition port of the actual spectrometer 2 is connected to the collimator 35 via a transmission optical fiber 7 .
[0053] The second acquisition board 32 is provided with K fixed holes in sequence along the direction of the linear electric guide rail 33 of the linear electric slide. The light outlets of the K receiving optical fibers are fixed in the K fixed holes of the second acquisition board through collimating lenses. Figure 3 As shown, the second acquisition board 32 is provided with four fixing holes 32a, 32b, 32c and 32d, and the receiving optical fibers 61 to 64 are fixed in the fixing holes 32a, 32b, 32c and 32d respectively through collimating lenses 36a, 36b, 36c and 36d.
[0054] The first acquisition plate 31 is fixed on the slider 34 of the linear electric slide, and the second acquisition plate 32 is relatively fitted with the first acquisition plate 31. Please refer to Figure 1As shown. The PLC controller 4 controls the slider 34 of the linear electric slide to drive the first acquisition board 31 to move to K sampling positions along the linear electric guide rail 33 in sequence. When the first acquisition board 31 is at each sampling position, the fixed hole 31a on the first acquisition board 31 is aligned with a fixed hole on the second acquisition board 32, so that the data acquisition port of the spectrometer 2 and the light outlet of the receiving optical fiber connected to the fixed hole on the second acquisition board 32 are connected through the collimator. Figure 3 For example, aligning fixing hole 31a on first acquisition board 31 with fixing hole 32a on second acquisition board 32. At this point, the data acquisition port of spectrometer 2 and the receiving optical fiber 61 connected to fixing hole 32a are aligned via collimating lenses 35 and 36a on either side, thereby achieving docking between the data acquisition port of spectrometer 2 and the light outlet of receiving optical fiber 61. The same principle applies to all other sampling locations.
[0055] The in-situ non-destructive testing method for fresh corn using the portable fresh corn quality testing system includes the following steps, please refer to Figure 4 The flowchart shown:
[0056] Step 410 : After the detection end face of the array probe 8 is attached to the surface of the fresh corn, the emission spectrum is outputted by the light source 1 and irradiated to the surface of the fresh corn via the point light source optical fiber 5 .
[0057] In step 420, the PLC controller 4 controls the multiplexing mobile platform 3 to sequentially connect the data acquisition port of the spectrometer 2 to the light outlet of each receiving fiber. The spectrometer 2 acquires a spatially resolved spectrum of a channel via the currently connected receiving fiber and uploads it to the PLC controller 4. The single exposure duration is 20ms to 60ms, and is set to 40ms in actual use.
[0058] In step 430, the K-channel spatially resolved spectra are input into the pre-trained lightweight quality detection network via a PLC controller to obtain a predicted quality index for the fresh corn. The quality index here includes at least one of moisture content, soluble solids content, and hardness, determined based on the index type used when pre-training the lightweight quality detection network.
[0059] To improve the data learnability and stability of the K-channel spatially resolved spectra, the PLC controller performs data preprocessing on the K-channel spatially resolved spectra, including three aspects:
[0060] (1) Scale compensation of the spatially resolved spectra of K channels
[0061] First, the spatially resolved spectrum acquired via any i-th receiving fiber is scale-compensated based on the physical parameters of that fiber and the physical parameters of a reference fiber. The reference fiber is one of the receiving fibers. This allows for dynamic compensation of the intensity of the spatially resolved spectrum across each channel, ensuring that the signal strength across each channel approaches consistency.
[0062] The physical parameters of each receiving fiber include the diameter of the receiving fiber and the spatial distance between the light input port of the receiving fiber and the light output port of the point light source fiber. The physical parameters of any i-th receiving fiber are the light intensity I′ after dynamic compensation of the spatially resolved spectrum obtained through the i-th receiving fiber. i for:
[0063]
[0064] Among them, I i is the light intensity before dynamic compensation. i is the spatial distance between the light port of the i-th receiving fiber and the light outlet of the point light source fiber, φ i is the diameter of the i-th receiving optical fiber. ref is the spatial distance between the light port of the reference fiber and the light outlet of the point light source fiber, φ ref is the diameter of the reference fiber.
[0065] (2) Secondly, in order to solve the problem of spatiotemporal asynchrony of multi-channel data due to acquisition timing or slight displacement of samples, a dynamic time warping algorithm is used to align the spatially resolved spectra of K channels in order to eliminate the timing offset between channels.
[0066] (3) Compensate for spatial consistency of the spatially resolved spectra of the K channels. This involves constructing a three-dimensional spatial mapping model based on the spatial position of the optical ports of each optical fiber. The three-dimensional spatial mapping model is then used to perform bilinear interpolation on the missing or offset pixels in the spatially resolved spectra of each channel after time alignment to complete spatial consistency compensation and ensure spatial consistency of multi-channel data. The specific methods for constructing the three-dimensional spatial mapping model and performing bilinear interpolation can be referred to existing practices and will not be elaborated here.
[0067] Please refer to Figure 5 As shown in the network structure diagram, the lightweight quality detection network used in this step includes a local feature extraction module, a global feature extraction module, a feature fusion module and an output prediction module. The spatially resolved spectra of the K channels input into the lightweight quality detection network are input into the local feature extraction module and the global feature extraction module respectively.
[0068] The local feature extraction module extracts local features from the spatially resolved spectra of the K channels to obtain local features and outputs them to the feature fusion module. The global feature extraction module performs global feature modeling on the spatially resolved spectra of the K channels to extract global temporal dependency features and outputs them to the feature fusion module.
[0069] The feature fusion module concatenates local features and global temporal-dependent features along the channel dimension and then performs adaptive weighted fusion using a channel-attention mechanism. This fusion is then processed through a fully connected layer for dimensionality reduction, and the fused feature vector is output to the output prediction module. The dimensionality reduction layer uses the ReLU activation function. This process, through the introduction of the channel-attention mechanism for adaptive weighted fusion, enhances the representation of key information and suppresses interference from redundant features. Finally, the output prediction module performs regression prediction on the fused feature vector and outputs the quality indicator prediction results, using a linear activation function to output continuous prediction values.
[0070] In the above network structure, the local feature extraction module is built based on the 1D-CNN module, and the global feature extraction module is built based on the Transformer module. In order to adapt to the characteristics of fresh corn quality detection, the local feature extraction module contains three convolutional layers. The convolution kernel sizes used in the three convolutional layers are 5, 3, and 3 respectively, with a step size of 1 and an activation function of ReLU. Figure 5 As shown in the figure, the local feature extraction module includes a one-dimensional convolutional layer, a ReLU activation function, a one-dimensional convolutional layer, a ReLU activation function, a one-dimensional convolutional layer, a ReLU activation function, a global average pooling layer, a fully connected layer, a ReLU activation function, a Sigmoid activation function, and a Scale layer. The global feature extraction module includes a single multi-head self-attention mechanism with K heads and a feedforward neural network with ReLU activation function.
[0071] In addition, during actual detection, the detection end face of the array probe 8 can be attached to multiple different positions on the surface of fresh corn and the above-mentioned method can be used to detect and obtain quality index prediction results. The quality index prediction results at multiple different positions are then combined as the final quality index prediction results of fresh corn to further improve the detection accuracy.
Claims
1. A portable in-situ non-destructive testing method for fresh corn quality testing system, characterized in that: The portable fresh corn quality detection system includes a portable box, a light source, a spectrometer, a multiplexing mobile platform, a PLC controller, a point light source optical fiber and K receiving optical fibers, where the integer parameter K is ≥ 2; The light source, spectrometer, multiplexing mobile platform, and PLC controller are all arranged in a portable box. The PLC controller is electrically connected to the spectrometer and the multiplexing mobile platform. The light input port of the point light source optical fiber is connected to the light output port of the light source, and the light output port is led out of the portable box. The light output port of each receiving optical fiber is placed inside the portable box, and the light input port is led out of the portable box. The light output port of the point light source optical fiber and the light input ports of K receiving optical fibers are led out of the portable box and then integrated together to form the detection end face of the array probe. The data acquisition port of the spectrometer and the light outlets of K receiving optical fibers are connected in sequence through a multiplexing mobile platform; The in-situ non-destructive testing method comprises: After the detection end face of the array probe is attached to the surface of the fresh corn, an emission spectrum is output by a light source and irradiated onto the surface of the fresh corn via a point light source optical fiber; The PLC controller controls the multiplexing mobile platform to connect the data acquisition port of the spectrometer to the light outlet of each receiving optical fiber in sequence. The spectrometer obtains the spatially resolved spectrum of one channel through the connected receiving optical fibers and uploads it to the PLC controller. The spatially resolved spectra of K channels are input into a pre-trained lightweight quality detection network through a PLC controller to obtain the quality index prediction results of fresh corn.
2. The in-situ nondestructive testing method according to claim 1, characterized in that: The in-situ non-destructive testing method further comprises: After the PLC controller performs scale compensation on the spatially resolved spectra of K channels, the dynamic time warping algorithm is used to perform time sequence alignment on the spatially resolved spectra of K channels; A three-dimensional spatial mapping model is constructed according to the spatial position of the optical ports of each optical fiber on the detection end face of the array probe. The spatially resolved spectra of each channel after time alignment are bilinearly interpolated using the three-dimensional spatial mapping model to complete spatial consistency compensation, and then input into a pre-trained lightweight quality detection network.
3. The in-situ non-destructive testing method according to claim 2, characterized in that: The PLC controller performs scale compensation on the spatially resolved spectra of K channels including: Performing scale compensation on the spatially resolved spectrum obtained via any i-th receiving optical fiber according to the physical parameters of the i-th receiving optical fiber combined with the physical parameters of the reference optical fiber; The physical parameters of each receiving optical fiber include the diameter of the receiving optical fiber and the spatial distance between the light input port of the receiving optical fiber and the light output port of the point light source optical fiber. The reference optical fiber is one of the receiving optical fibers.
4. The in-situ non-destructive testing method according to claim 3, characterized in that: The intensity I′ after dynamic compensation of the spatially resolved spectrum obtained through the i-th receiving fiber according to the physical parameters of any i-th receiving fiber is i for: Among them, I i is the light intensity before dynamic compensation, d i is the spatial distance between the light port of the i-th receiving fiber and the light outlet of the point light source fiber, φ i is the diameter of the i-th receiving optical fiber; d ref is the spatial distance between the light port of the reference fiber and the light outlet of the point light source fiber, φ ref is the diameter of the reference fiber.
5. The in-situ non-destructive testing method according to claim 1, characterized in that: The multiplexing mobile platform includes a first acquisition board, a second acquisition board, and a linear electric slide. The first acquisition board is provided with a fixing hole, and the first acquisition board is fixed to the slider of the linear electric slide. The second acquisition board is arranged relative to the first acquisition board and is provided with K fixing holes in sequence along the linear electric guide rail of the linear electric slide. The data acquisition port of the spectrometer is fixed in the fixed hole of the first acquisition board through a collimating lens, and the light outlets of K receiving optical fibers are respectively fixed in the K fixed holes of the second acquisition board through collimating lenses; the PLC controller is connected to and controls the slider of the linear electric slide to drive the first acquisition board to move to K sampling positions along the linear electric guide rail in sequence, and at each sampling position, the fixed hole on the first acquisition board is aligned with a fixed hole on the second acquisition board, and the data acquisition port of the spectrometer and the light outlet of the receiving optical fiber are connected through the collimating lens.
6. The in-situ nondestructive testing method according to claim 1, characterized in that: The lightweight quality detection network includes a local feature extraction module, a global feature extraction module, a feature fusion module and an output prediction module. The spatially resolved spectra of K channels input into the lightweight quality detection network are input into the local feature extraction module and the global feature extraction module respectively. The local feature extraction module extracts local features from the spatially resolved spectra of K channels to obtain local features and outputs them to the feature fusion module; The global feature extraction module performs global feature modeling on the spatially resolved spectra of K channels to extract global temporal dependency features and outputs them to the feature fusion module; The feature fusion module combines local features and global temporal dependency features in the channel dimension, performs adaptive weighted fusion using the channel attention mechanism, and then performs dimensionality reduction processing through the fully connected layer before outputting the fused feature vector to the output prediction module. The output prediction module performs regression prediction on the fused feature vector and outputs the quality index prediction results.
7. The in-situ non-destructive testing method according to claim 6, characterized in that: The local feature extraction module is built based on the 1D-CNN module and contains three convolutional layers. The convolution kernel sizes used in the three convolutional layers are 5, 3, and 3 respectively, with a step size of 1 and the activation function is ReLU. The global feature extraction module is built based on the Transformer module and includes a layer of multi-head self-attention mechanism and a feedforward neural network. The number of heads of the multi-head self-attention mechanism is K, and the activation function of the feedforward neural network is ReLU.
8. The in-situ non-destructive testing method according to claim 2, characterized in that: The portable fresh corn quality detection system includes four receiving optical fibers, the light outlets of the point light source optical fibers and the light inlets of the four receiving optical fibers are arranged in sequence along a straight line on the detection end face of the array probe; the diameters of the two receiving optical fibers with the smaller spatial distance between the light inlets and the light outlets of the point light source optical fibers are 400 μm, and the diameters of the two receiving optical fibers with the larger spatial distance between the light inlets and the light outlets of the point light source optical fibers are 600 μm.
9. The in-situ non-destructive testing method according to claim 8, characterized in that: The spatial distances between the light input ports of the four receiving optical fibers and the light output port of the point light source optical fiber are 2 mm, 3.2 mm, 4.4 mm, and 5.6 mm, respectively, from small to large.
10. The in-situ non-destructive testing method according to claim 1, characterized in that: The detection end surface of the array probe is circumferentially covered with a soft light shield.
Citation Information
Patent Citations
Beef quality multi-parameter simultaneous detection method by multichannel near-infrared spectroscopy
CN102519906A
Fruit quality detection method based on spectral differential combination to eliminate influences of peel
CN110389104A
Optical change-over switch for optical communications or spectroscopy
DE19650386A1