Vegetable waste multi-parameter rapid testing method and system

By automatically switching the spectrum and image acquisition modes, extracting and fusing the spectrum and image features, and inputting them to the deep neural network for detection, it solves the problems of low accuracy of traditional detection technology and difficulty in synchronous detection of multi-parameters, and realizes fast and accurate detection of vegetable waste with multiple parameters.

CN120028265AActive Publication Date: 2025-05-23BEIJING ACADEMY OF AGRICULTURE & FORESTRY SCIENCES
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510118515.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-05-23
Estimated Expiration
2045-01-24

Smart Images

  • Figure CN120028265A_ABST
    Figure CN120028265A_ABST
Patent Text Reader

Abstract

The invention discloses a vegetable waste multi-parameter rapid testing method and system, and belongs to the technical field of agricultural science and technology. Original data are obtained by automatically switching a spectrum acquisition mode and an image acquisition mode, spectral features (based on quaternion space embedding) and image features (combined with a deep convolutional network and texture analysis) are extracted respectively, and after fusion, the fused features are input into an optimized deep neural network for multi-parameter detection. According to the invention, spectrum and image information are integrated, the network performance is further improved by using a hybrid optimization algorithm, multi-parameter rapid detection of vegetable wastes is realized, the detection efficiency and accuracy are improved, the labor cost is reduced, and a scientific basis is provided for resource utilization and environment management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of agricultural science and technology, and more specifically to a method and system for rapidly measuring multiple parameters of vegetable waste. Background Art

[0002] As an important by-product of agricultural production, the rational treatment and resource utilization of vegetable waste plays an important role in improving the efficiency of agricultural resource utilization and reducing environmental pollution. However, in actual operation, the detection and management of vegetable waste face multiple challenges.

[0003] Traditionally, the key parameter detection technology of vegetable waste relies on laboratory analysis, which is costly and time-consuming. In addition, the existing rapid testing technology and equipment have problems such as low detection accuracy, many interference factors in complex scenarios, and difficulty in simultaneous detection of multiple parameters, which makes it difficult to meet the needs of large-scale and rapid detection. In addition, traditional detection methods usually only test a single parameter and lack a comprehensive and systematic multi-parameter analysis, making it difficult to comprehensively evaluate the safety and reuse potential of vegetable waste.

[0004] Therefore, how to propose a method and system for rapid multi-parameter measurement of vegetable waste to efficiently, accurately and conveniently realize simultaneous detection of multiple key parameters of vegetable waste is an urgent problem that technical personnel in this field need to solve. Summary of the invention

[0005] In view of this, the present invention provides a method and system for rapid multi-parameter detection of vegetable waste, which can realize rapid multi-parameter detection of vegetable waste and improve detection accuracy and efficiency.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] In one aspect, the present invention provides a method for rapid multi-parameter measurement of vegetable waste, comprising the following steps:

[0008] Automatically switch between the spectrum acquisition mode and the image acquisition mode according to preset conditions to obtain raw spectrum data and image data respectively;

[0009] Extracting spectral features based on the original spectral data, and extracting image features based on the image data; fusing the spectral features and the image features to obtain comprehensive features;

[0010] A parameter rapid measurement network is constructed, and the comprehensive features are input into the parameter rapid measurement network to obtain multi-parameter detection results of vegetable waste.

[0011] Preferably, extracting spectral features based on the original spectral data includes:

[0012] Calculating first-order derivative and second-order derivative spectra based on the original spectral data;

[0013] Normalizing the original spectral data, the first-order derivative spectrum and the second-order derivative spectrum;

[0014] The spectral data are aligned according to the wavenumber, corresponding to the three imaginary parts of the quaternion i, j, and k respectively, and the real part of the quaternion is zero. The normalized spectral processing data, the normalized first-order derivative spectrum, and the normalized second-order derivative spectrum are embedded in the quaternion space and expressed in the form of a pure quaternion spectrum matrix as the spectral feature.

[0015] Preferably, extracting image features based on the image data includes:

[0016] Preprocessing the image data to obtain image processing data;

[0017] Importing the image processing data into a deep convolutional network to obtain multi-scale features, and obtaining areas in the image processing data where the spectral reflectance difference is greater than a preset threshold condition through spectral data;

[0018] Acquire a region of interest of the image data according to the multi-scale features combined with the spectral reflectance difference region, acquire a gray level co-occurrence matrix of the region of interest, and acquire texture features according to the gray level co-occurrence matrix;

[0019] The image feature is generated according to the texture feature.

[0020] Preferably, the spectral feature and the image feature are spliced ​​to obtain the comprehensive feature.

[0021] Preferably, the parameter speed measurement network is constructed based on a deep neural network, including an input layer, a hidden layer, and an output layer;

[0022] The parameter speed measurement network adds a batch normalization layer after each hidden layer, and uses the dropout method to randomly delete a part of the neurons in each hidden layer.

[0023] Preferably, the parameter speed measurement network is optimized using a hybrid optimization algorithm, including:

[0024] Step 1. Initialize the genetic algorithm and Bayesian adaptive direct search algorithm parameters;

[0025] Step 2. Perform k-generation global search based on the genetic algorithm. In each generation, encode each individual in the population, i.e., a set of network parameter settings of the parameter speed measurement network, and calculate the fitness, which is the detection error of the multi-parameter detection result of vegetable waste;

[0026] Step 3. If the cutoff condition is met, the optimization is terminated; otherwise, the BADS local search is performed using the GA optimization result as the initial point;

[0027] Step 4. If the cutoff condition is met, the optimization is terminated; otherwise, the worst individual in the population is replaced with the optimization result of the BADS algorithm and then go to step 2.

[0028] On the other hand, the present invention also provides a vegetable waste multi-parameter rapid measurement system, which is used to implement the above-mentioned vegetable waste multi-parameter rapid measurement method, comprising:

[0029] A spectrum / image acquisition module, used to automatically switch between a spectrum acquisition mode and an image acquisition mode according to preset conditions, and acquire raw spectrum data and image data respectively;

[0030] A feature extraction module, used to extract spectral features based on the original spectral data, and to extract image features based on the image data; and to fuse the spectral features and the image features to obtain comprehensive features;

[0031] The result output module is used to construct a parameter rapid test network, input the comprehensive features into the parameter rapid test network, and obtain the multi-parameter detection results of vegetable waste.

[0032] Preferably, the spectrum / image acquisition module includes a halogen light source, a lens, a metasurface switcher, a near-infrared enhanced CMOS image sensor, and an acquisition circuit;

[0033] The halogen light source is used to provide illumination for near-infrared spectral data collection; the lens includes a light collecting system and a collimation system, the light collecting system is used to collect the light in the field of view into the lens after passing through an anti-reflection film, and the collimation system is used to condition the light into parallel light; the metasurface switch is placed behind the lens, and includes an angle adjustment motor and a metasurface structure sheet, the adjustment motor drives the metasurface structure sheet to block or leave the incident light path, when the metasurface structure sheet blocks the light path, the near-infrared spectrum is collected, and when the metasurface structure sheet leaves the light path, the RGB image is collected; the near-infrared enhanced CMOS image sensor and the acquisition circuit are used to collect incident light.

[0034] Preferably, the spectrum / image acquisition module also includes a background correction device, which includes a spectrum baseline correction whiteboard and an RGB correction color card, which are placed in the field of view to eliminate external natural light and background noise during the acquisition process.

[0035] It can be seen from the above technical solutions that compared with the prior art, the present invention discloses a method and system for rapid multi-parameter measurement of vegetable waste. First, the acquisition mode is automatically switched according to preset conditions to obtain the original spectrum and image data, and then the spectrum data is respectively derived, normalized, wave number aligned and embedded in the quaternion space to extract spectral features, and the image data is pre-processed, and the texture features of the region of interest are determined by the deep convolution network and the spectral reflectance difference, and then the spectrum and image features are spliced ​​into comprehensive features. Finally, a parameter rapid measurement network based on a deep neural network is constructed and optimized using a hybrid optimization algorithm, and the comprehensive features are input to obtain multi-parameter detection results. The present invention can integrate spectral and image information, realize rapid multi-parameter detection of vegetable waste, improve detection accuracy and efficiency, provide a reliable basis for the subsequent treatment and utilization of vegetable waste, and help related environmental protection and resource utilization work. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0037] Figure 1 A flow chart of the method provided by the present invention;

[0038] Figure 2 A system architecture diagram provided by the present invention;

[0039] Figure 3 This is the hardware connection diagram of the spectrum / image acquisition module. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in 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. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] The embodiment of the present invention discloses a method for rapid multi-parameter measurement of vegetable waste. Figure 1 , the method comprises the following steps:

[0042] S1. Automatically switch between the spectrum acquisition mode and the image acquisition mode according to preset conditions to obtain raw spectrum data and image data respectively.

[0043] A 50W halogen light source is used to ensure sufficient illumination for near-infrared spectrum acquisition. The lens's light collection system uses a multi-layer anti-reflection film, with a transmittance of more than 95% in the near-infrared band, and the collimation system can adjust the light into a beam with extremely high parallelism. The angle adjustment motor of the metasurface switch uses a stepper motor with an accuracy of 0.01°, and is equipped with a specially designed metasurface structure sheet to accurately switch the spectrum and image acquisition mode. The resolution of the near-infrared enhanced CMOS image sensor is set to 1280×1024, and the sampling frequency of the acquisition circuit is 50MHz, which can quickly and accurately collect data. The reflectivity of the spectral baseline correction whiteboard is stable at 98% in the near-infrared region, and the RGB correction color card uses X-Rite Color Checker Passport to ensure the accuracy of color correction.

[0044] In a laboratory environment, vegetable waste samples are evenly spread on the sample table, and the preset conditions of the acquisition system are set to automatically switch between the spectrum and image acquisition modes at regular intervals. After starting the system, the halogen light source emits light. In the spectrum acquisition mode, the metasurface structure sheet blocks the light path, and the light is processed by the lens and the near-infrared enhanced CMOS image sensor collects near-infrared spectrum data (i.e., original spectrum data); when switching to the image acquisition mode, the metasurface structure sheet leaves the light path and collects RGB image data (i.e., image data). After each acquisition, the system automatically collects the spectrum baseline correction whiteboard and RGB correction color card data for subsequent background correction.

[0045] S2. Extract spectral features based on the original spectral data, and extract image features based on the image data; and fuse the spectral features and image features to obtain comprehensive features.

[0046] S21. Extract spectral features based on the original spectral data, including:

[0047] S211. Calculate the first-order derivative and second-order derivative spectra based on the original spectral data.

[0048] The Savitzky-Golay filtering algorithm was used to smooth the raw spectral data, and then the central difference method was used to calculate the first-order derivative spectrum and the second-order derivative spectrum.

[0049] For the original spectral data S(λ), the calculation formula of the first-order derivative spectrum S'(λ) is:

[0050]

[0051] Where h is the wavelength interval. The second-order derivative spectrum S" (λ) is calculated as:

[0052]

[0053] S212. Normalize the original spectral data, the first-order derivative spectrum and the second-order derivative spectrum.

[0054] This embodiment adopts the minimum-maximum normalization method to normalize the original spectrum data S(λ), the first-order derivative spectrum S'(λ) and the second-order derivative spectrum S"(λ) to the interval [0,1] respectively.

[0055] S213. Align the spectral data according to the wavenumber, corresponding to the three imaginary parts i, j, and k of the quaternion respectively, and the real part of the quaternion is zero. The normalized spectral processing data, the normalized first-order derivative spectrum and the normalized second-order derivative spectrum are embedded in the quaternion space and expressed in the form of a pure quaternion spectrum matrix as spectral features.

[0056] First, convert the wavelength into wave numbers. (Unit: cm -1 ) and wavelength λ (unit: nm) are related as follows:

[0057] Determine the target wavenumber range to be 10000-1000cm -1 , with 10cm -1 The wavenumber alignment is performed at intervals. The linear interpolation method is used to align the spectral data. The aligned normalized original spectral data A, normalized first-order derivative spectral data B, and normalized second-order derivative spectral data C correspond to the three imaginary parts of the quaternion i, j, and k respectively, and the real part of the quaternion is zero, forming a pure quaternion spectral matrix Q, where each quaternion element q is expressed as:

[0058] q=0+Ai+Bj+Ck.

[0059] According to the basic theory of quaternion algebra, the three types of data need to be combined in the same matrix form. The first-order derivative and second-order derivative spectral matrices are expanded to matrices with the same form as the original spectral matrix. On the premise that the derivative spectral data remains unchanged, the missing columns are replaced with a completion matrix with all elements set to 0 to form a matrix with the same form as the original spectral matrix, and then the quaternion spectral matrix is ​​constructed.

[0060] By combining the original spectral data, first-order derivative spectral data, and second-order derivative spectral data in a quaternion spectral matrix, multiple spectral information can be used simultaneously. The original spectral data can reflect the absorption and reflection characteristics of the basic components of vegetable waste, the first-order derivative spectral data can highlight the rate of change information of the spectral curve, and the second-order derivative spectral data is more sensitive to the curvature change of the spectral curve. This multi-parameter fusion method can more comprehensively characterize the internal components and structural characteristics of vegetable waste, thereby improving the accuracy of detection.

[0061] S22. Extracting image features based on the image data, including:

[0062] S221. Preprocess the image data to obtain image processing data.

[0063] The collected color image is converted into a grayscale image, and the grayscale image is smoothed using mean filtering.

[0064] S222. Import the image processing data into a deep convolutional network to obtain multi-scale features, and obtain the area in the image processing data where the spectral reflectance difference is greater than a preset threshold condition through spectral data.

[0065] Use the pre-trained VGG16 network to extract the multi-scale features of the image. The pre-processed grayscale image is resized to 224×224 pixels and input into the VGG16 network. The VGG16 network contains multiple convolutional layers and pooling layers. Through different levels of convolution and pooling operations, the multi-scale features of the image are extracted.

[0066] The spectral data is used to obtain the areas in the image where the spectral reflectance difference is greater than a preset threshold (set to 0.1).

[0067] S223. Obtaining a region of interest of the image data according to the multi-scale features combined with the spectral reflectance difference region, obtaining a gray level co-occurrence matrix of the region of interest, and obtaining texture features according to the gray level co-occurrence matrix;

[0068] Combined with the multi-scale features extracted by the VGG16 network, the region of interest of the image data is determined by using threshold segmentation and morphological operations. The spectral reflectance difference image is firstly segmented by threshold to obtain a binary image, and then morphological operations such as dilation and erosion are used to remove noise and small interference areas, and finally the region of interest is determined.

[0069] For the region of interest, calculate its gray level co-occurrence matrix (GLCM). The gray level co-occurrence matrix P(i, j, d, θ) represents the probability of the occurrence of pixel pairs with gray values ​​i and j under the condition of distance d and direction θ. In this embodiment, the distance d=1 and the directions are 0°, 45°, 90°, and 135° respectively to calculate the gray level co-occurrence matrix. According to the gray level co-occurrence matrix, the texture features such as contrast, correlation, energy, and entropy are calculated, and the calculation formulas are:

[0070]

[0071] Where, is the gray level, μ i , μ j is the mean of the gray levels of i and j, σ i , σ j is the standard deviation of the gray levels of i and j.

[0072] S224. Generate image features based on texture features.

[0073] The calculated texture features (contrast, correlation, energy and entropy) in different directions are concatenated to form an image feature vector.

[0074] S23. The spectral features (pure quaternion spectral matrix converted into feature vectors) and the image feature vectors are concatenated to obtain a comprehensive feature vector. In this process, it is necessary to ensure that the spectral features and the image features can match in dimension. Specifically, the two can be matched in a certain dimension through appropriate transformations (such as stretching, compression, etc.).

[0075] S3. Construct a parameter rapid test network, input the comprehensive features into the parameter rapid test network, and obtain the multi-parameter detection results of vegetable waste.

[0076] Among them, the parameter speed measurement network is constructed based on a deep neural network, including an input layer, a hidden layer, and an output layer. The number of neurons in the input layer is determined according to the dimension of the comprehensive feature vector to ensure that the comprehensive features can be fully input into the network. The hidden layer is set to 3-5 layers, and the number of neurons in each layer is adjusted according to experience and experiments, generally ranging from dozens to hundreds, such as 128, 64, and 32. These hidden layers are used to gradually abstract and extract the input features and mine the complex relationships in the data. The number of neurons in the output layer is determined by the number of vegetable waste parameters that need to be detected. The vegetable waste parameters in this embodiment include organic matter (organic carbon), moisture, nitrogen, etc.

[0077] The parameter velocity network adds a batch normalization layer after each hidden layer to standardize the input of the middle layer of the neural network, making the data distribution more stable, speeding up the network training speed and improving the generalization ability of the model. The specific operation is to calculate the mean and variance of the input data of each hidden layer in a small batch, and then perform a normalization transformation, and then scale and offset the normalized data through two learnable parameters (scaling parameter γ and offset parameter β). Assuming the input data is x, the calculation formula of batch normalization is:

[0078]

[0079] where μ B is the mean of the small batch data, is the variance of the small batch data, ∈ is a minimum value (usually 10 -5 ) to prevent the denominator from being zero, and γ and β are parameters learned during the training process.

[0080] Since the network has a large number of neurons, the dropout method is used to randomly delete some neurons in each hidden layer to prevent overfitting.

[0081] This embodiment uses a hybrid optimization algorithm to optimize the parameter speed measurement network, and the optimization steps are as follows:

[0082] Step 1. Initialize the genetic algorithm and Bayesian adaptive direct search algorithm parameters.

[0083] For GA, set the population size, which determines the number of individuals in each generation; determine the elite ratio, set it to 0.1, that is, the best 10% of individuals in each generation are directly retained to the next generation; set the crossover probability to 0.8 to control the probability of crossover between individuals; set the mutation probability to 0.05 to determine the possibility of individual mutation. For the BADS algorithm, initialize the initial grid step and the minimum grid step, the initial grid step is set to 0.1, and the minimum grid step is set to 0.001. These parameters affect the accuracy and scope of local search.

[0084] Step 2. Perform k-generation global search based on the genetic algorithm. In each generation, a set of network parameter settings (such as the number of hidden layer neurons, learning rate, batch normalization layer parameters, dropout probability, etc.) of the parameter measurement network are encoded for each individual in the population.

[0085] For each individual in the population, the corresponding network parameters are applied to the parameter rapid test network, and the training data is used for forward propagation. The difference between the network output and the true label is calculated as the fitness. In this embodiment, the fitness is measured by the mean square error (MSE) of the multi-parameter detection results of vegetable waste. The smaller the MSE value, the closer the network prediction result is to the true value, and the higher the fitness. A new generation of population is generated through selection, crossover and mutation operations. The selection operation uses roulette selection or tournament selection based on the fitness of the individual, so that individuals with high fitness have a greater probability of being selected to enter the next generation; the crossover operation exchanges genes for the selected individuals with a set crossover probability to generate new individuals; the mutation operation randomly changes the genes of the individuals with a mutation probability to increase the diversity of the population. After multiple generations of genetic operations, the population gradually approaches the global optimal solution.

[0086] Step 3. If the cutoff condition is met (the maximum number of iterations is reached or the fitness is no longer improved), the optimization is terminated; otherwise, the BADS local search is performed using the GA optimization result as the initial point.

[0087] The BADS algorithm alternates between a local Bayesian optimization process and a systematic grid search. In the Bayesian optimization process, a Gaussian process is used to fit a subset of the evaluation points at the current iteration step, and new evaluation points are selected based on a low confidence limit strategy, weighing between search areas with higher uncertainty (high Gaussian process uncertainty) and areas with higher probability (low Gaussian process average). When the search process continues to fail, it enters the grid search phase, taking steps forward in each direction and evaluating points on the grid until an improvement is found or all directions have been tried. If successful, the step size is doubled, otherwise it is halved. In this way, the BADS algorithm searches for the optimal solution more accurately near the current point.

[0088] Step 4. If the cutoff condition is met, the optimization is terminated; otherwise, the worst individual in the population is replaced with the optimization result of the BADS algorithm and then the process goes to step 2 until the cutoff condition is met.

[0089] In this embodiment, the optimized parameter rapid test network is trained as follows:

[0090] A large amount of vegetable waste sample data is collected, and these samples contain known true values ​​of multiple parameters. The sample data is divided according to a certain ratio (such as 70% training set, 20% validation set, and 10% test set). The optimized parameter rapid test network is trained using the training set data. During the training process, the weights and biases of the network are continuously adjusted to minimize the loss function (such as the mean square error loss function). A suitable optimizer (Adam optimizer in this embodiment) is used to update the network parameters. The Adam optimizer combines the advantages of momentum optimization and RMSProp algorithm, and can adaptively adjust the learning rate to accelerate the training convergence speed.

[0091] After the training is completed, the comprehensive feature vector is input into the trained parameter rapid test network for forward propagation calculation. The network output is the predicted value of the multi-parameter of vegetable waste, and the multi-parameter detection result is obtained. By comparing with the true parameter value of the test set sample, the detection performance of the network is evaluated using appropriate evaluation indicators (such as root mean square error RMSE, mean absolute error MAE, etc.). The smaller the RMSE and MAE values, the more accurate the detection results of the network are, and the more effective it is in detecting the multi-parameter information of vegetable waste.

[0092] On the other hand, Figure 2 As shown, the present invention also proposes a vegetable waste multi-parameter rapid measurement system, which is used to implement the above-mentioned vegetable waste multi-parameter rapid measurement method, comprising:

[0093] A spectrum / image acquisition module, used to automatically switch between a spectrum acquisition mode and an image acquisition mode according to preset conditions, and acquire raw spectrum data and image data respectively;

[0094] A feature extraction module is used to extract spectral features based on the original spectral data and image features based on the image data; and to fuse spectral features and image features to obtain comprehensive features;

[0095] The result output module is used to construct a parameter rapid test network, input the comprehensive features into the parameter rapid test network, and obtain the multi-parameter detection results of vegetable waste.

[0096] Preferably, the spectrum / image acquisition module refers to Figure 3 , including halogen light source, lens, metasurface switcher, near-infrared enhanced CMOS image sensor, and acquisition circuit;

[0097] The halogen light source is used to provide illumination for near-infrared spectral data collection; the lens includes a light collecting system and a collimation system. The light collecting system is used to collect the light in the field of view into the lens after passing through the anti-reflection film, and the collimation system is used to condition the light into parallel light; the metasurface switcher is placed behind the lens, including an angle adjustment motor and a metasurface structure sheet. The adjustment motor drives the metasurface structure sheet to block or leave the incident light path. When the metasurface structure sheet blocks the light path, the near-infrared spectrum is collected, and when the metasurface structure sheet leaves the light path, the RGB image is collected; the near-infrared enhanced CMOS image sensor and the acquisition circuit are used to collect the incident light.

[0098] Preferably, the spectrum / image acquisition module also includes a background correction device, including a spectrum baseline correction whiteboard and an RGB correction color card, which are placed in the field of view to eliminate external natural light and background noise during the acquisition process.

[0099] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0100] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for rapid multi-parameter measurement of vegetable waste, characterized in that: The following steps are involved: Automatically switch between the spectrum acquisition mode and the image acquisition mode according to preset conditions to obtain raw spectrum data and image data respectively; Extracting spectral features based on the original spectral data, and extracting image features based on the image data; fusing the spectral feature and the image feature to obtain a comprehensive feature; A parameter rapid measurement network is constructed, and the comprehensive features are input into the parameter rapid measurement network to obtain multi-parameter detection results of vegetable waste.

2. A vegetable waste multi-parameter rapid measurement method according to claim 1, characterized in that: Extracting spectral features based on the original spectral data includes: Calculating first-order derivative and second-order derivative spectra based on the original spectral data; Normalizing the original spectral data, the first-order derivative spectrum and the second-order derivative spectrum; The spectral data are aligned according to the wavenumber, corresponding to the three imaginary parts of the quaternion i, j, and k respectively, and the real part of the quaternion is zero. The normalized spectral processing data, the normalized first-order derivative spectrum, and the normalized second-order derivative spectrum are embedded in the quaternion space and expressed in the form of a pure quaternion spectrum matrix as the spectral feature.

3. A vegetable waste multi-parameter rapid measurement method according to claim 1, characterized in that: Extracting image features based on the image data includes: Preprocessing the image data to obtain image processing data; Importing the image processing data into a deep convolutional network to obtain multi-scale features, and obtaining areas in the image processing data where the spectral reflectance difference is greater than a preset threshold condition through spectral data; Acquire a region of interest of the image data according to the multi-scale features combined with the spectral reflectance difference region, acquire a gray level co-occurrence matrix of the region of interest, and acquire texture features according to the gray level co-occurrence matrix; The image feature is generated according to the texture feature.

4. The method for rapid multi-parameter measurement of vegetable waste according to claim 1, characterized in that: The spectral feature and the image feature are spliced ​​to obtain the comprehensive feature.

5. The method for rapid multi-parameter measurement of vegetable waste according to claim 1, characterized in that: The parameter speed measurement network is constructed based on a deep neural network, including an input layer, a hidden layer, and an output layer; The parameter speed measurement network adds a batch normalization layer after each hidden layer, and uses the dropout method to randomly delete a part of the neurons in each hidden layer.

6. A vegetable waste multi-parameter rapid measurement method according to claim 5, characterized in that: Optimizing the parameter speed measurement network using a hybrid optimization algorithm includes: Step 1. Initialize the genetic algorithm and Bayesian adaptive direct search algorithm parameters; Step 2. Perform k-generation global search based on the genetic algorithm. In each generation, encode each individual in the population, i.e., a set of network parameter settings of the parameter speed measurement network, and calculate the fitness, which is the detection error of the multi-parameter detection result of vegetable waste; Step 3. If the cutoff condition is met, the optimization is terminated; otherwise, the BADS local search is performed using the GA optimization result as the initial point; Step 4. If the cutoff condition is met, the optimization is terminated; otherwise, the worst individual in the population is replaced with the optimization result of the BADS algorithm and then go to step 2.

7. A vegetable waste multi-parameter rapid measurement system, characterized in that: include: A spectrum / image acquisition module, used to automatically switch between a spectrum acquisition mode and an image acquisition mode according to preset conditions, and acquire raw spectrum data and image data respectively; A feature extraction module, used for extracting spectral features based on the original spectral data, and extracting image features based on the image data; fusing the spectral feature and the image feature to obtain a comprehensive feature; The result output module is used to construct a parameter rapid test network, input the comprehensive features into the parameter rapid test network, and obtain the multi-parameter detection results of vegetable waste.

8. The vegetable waste multi-parameter rapid measurement system according to claim 7, characterized in that: The spectrum / image acquisition module includes a halogen light source, a lens, a metasurface switch, a near-infrared enhanced CMOS image sensor, and an acquisition circuit; The halogen light source is used to provide illumination for near-infrared spectral data collection; the lens includes a light collecting system and a collimation system, the light collecting system is used to collect the light in the field of view into the lens after passing through an anti-reflection film, and the collimation system is used to condition the light into parallel light; the metasurface switch is placed behind the lens, and includes an angle adjustment motor and a metasurface structure sheet, the adjustment motor drives the metasurface structure sheet to block or leave the incident light path, when the metasurface structure sheet blocks the light path, the near-infrared spectrum is collected, and when the metasurface structure sheet leaves the light path, the RGB image is collected; the near-infrared enhanced CMOS image sensor and the acquisition circuit are used to collect incident light.

9. A vegetable waste multi-parameter rapid measurement system according to claim 8, characterized in that: The spectrum / image acquisition module also includes a background correction device, which includes a spectrum baseline correction whiteboard and an RGB correction color card, which are placed in the field of view and are used to deduct external natural light and background noise during the acquisition process.

Citation Information

Patent Citations

  • Method for detecting pesticide residue concentration of vegetables based on hyperspectral imaging

    CN108872091A

  • Vegetable waste comprehensive treatment device and method

    CN109821854A

  • Near-infrared spectrum parallel fusion quantitative modeling method based on quaternion convolutional neural network

    CN112098358A

  • Rapid nondestructive analysis method for quality of bean halves in fermentation period by fusing multi-dimensional characteristics

    CN117723675A

  • Snapshot spectrum recovery method based on near-infrared metasurface

    CN118190866A