CN116879184A - Fruit and vegetable pesticide residue detection method and system based on hyperspectral image - Google Patents

Fruit and vegetable pesticide residue detection method and system based on hyperspectral image Download PDF

Info

Publication number
CN116879184A
CN116879184A CN202310667493.3A CN202310667493A CN116879184A CN 116879184 A CN116879184 A CN 116879184A CN 202310667493 A CN202310667493 A CN 202310667493A CN 116879184 A CN116879184 A CN 116879184A
Authority
CN
China
Prior art keywords
fruit
vegetable
hyperspectral
image
spectrum
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310667493.3A
Other languages
Chinese (zh)
Inventor
杨光义
邹佳琦
宋阳
李卓鸿
胡磊
薛若尧
贺威
张洪艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan University WHU
Original Assignee
Wuhan University WHU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan University WHU filed Critical Wuhan University WHU
Priority to CN202310667493.3A priority Critical patent/CN116879184A/en
Publication of CN116879184A publication Critical patent/CN116879184A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30128Food products
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/10Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in agriculture

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Chemical & Material Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The invention provides a fruit and vegetable pesticide residue detection method and system based on hyperspectral images, and belongs to the technical field of food safety detection. Firstly, collecting fruit and vegetable samples added with pesticides of different types and different concentrations by adopting a spectrometer, and constructing an overcomplete end member spectrum library of the fruits and vegetables. Secondly, constructing a hyperspectral fruit and vegetable image mixed pixel sparse decomposition model with the space-spectrum synergy, and introducing an alternate direction multiplier method to realize quick solution of the hyperspectral fruit and vegetable image mixed pixel sparse decomposition model. And finally, analyzing chemical components and contents of residual pesticides in fruits and vegetables to be detected based on the solved abundance images, and rapidly evaluating the safety grade of the fruits and vegetables. The invention adopts the hyperspectral technology combined with the spectrum and the mixed pixel sparse decomposition theory to realize the detection of the pesticide residue of fruits and vegetables, and has the advantages of automation, no damage, no pollution, rapidness, high efficiency and the like.

Description

Fruit and vegetable pesticide residue detection method and system based on hyperspectral image
Technical Field
The invention relates to the technical field of food safety detection, and relates to a fruit and vegetable pesticide residue detection method and system based on hyperspectral images, in particular to a fruit and vegetable pesticide residue detection method and system based on a hyperspectral fruit and vegetable image mixed pixel sparse decomposition model.
Background
Currently, pesticide residue detection of fruits and vegetables also mainly depends on chemical, physical, biological and other means (document 1), and the main detection methods include a spectroscopic method (document 2), an enzyme inhibition method (document 3) and a chromatographic method (document 4). (1) spectroscopy: according to certain functional groups or hydrolysis products in the organophosphorus pesticide and special color developing agents, chemical reactions such as oxidation, sulfonation, complexation and the like are carried out in a specific environment, and color reactions with specific wavelengths are generated for qualitative or quantitative determination; (2) enzyme inhibition method: according to the principle that organophosphorus and carbamate pesticides can inhibit the activity of acetylcholine in the central nervous system and the peripheral nervous system of insects, the accumulation of acetylcholine as a nerve conduction medium is caused, normal nerve conduction is influenced, and the toxicity and death of insects are caused; (3) chromatography: the separation is achieved according to the difference of partition coefficients of the analyte between the stationary phase and the mobile phase, the concentration of the analyte is converted into an electric signal (voltage, current, etc.) which is easy to measure, and then the electric signal is sent to a recorder for recording, and the method mainly comprises thin layer chromatography, gas chromatography and high performance liquid chromatography. In addition, scientists have also proposed techniques for rapidly detecting pesticide residues, such as chemical rapid detection (document 5), immunoassay (document 6), and biopsy (document 7). However, these methods do not get rid of the limitations of the traditional means such as chemical analysis and biological experiments, the detection result depends on sampling, and the problems of high cost, long time, low efficiency and the like exist, so that many inconveniences are brought to the supervision work of the agricultural products before, during and after delivery, and the real-time or near real-time monitoring requirement is difficult to meet (document 8).
Z.Xiu-ping,M.Lin,H.Lan-qi,C.Jian-Bo,and Z.Li,“The optimization and establishment of QuEChERS-UPLC–MS/MS method for simultaneously detecting various kinds of pesticides residues in fruits and vegetables,”Journal of Chromatography B,vol.1060,pp.281-290,2017.
D.Liu,Y.Han,L.Zhu,W.Chen,Y.Zhou,J.Chen,and Z.Dou,“Quantitative detection of isofenphos-methyl in corns using surface-enhanced Raman spectroscopy(SERS)with chemometric methods,”Food Analytical Methods,vol.10,no.5,pp.1202-1208,2017.
Zhang Dengke, hao Chenglie, zhong Kai, et al, "research on the production of immobilized enzyme tablets for rapid detection of pesticide residues on fruits and vegetables," Anhui agricultural science, vol.45, no.28, pp.81-84,2017.
Zhang Bolun, pang Guofang, feng Chun, et al, "solid phase extraction combined with gas chromatography-triple quadrupole mass spectrometry" for determining 48 pesticide residues in high acid fruits, "analytical test journal, vol.6, no.003,2018.
Shang Tong A comparative study of rapid test card method and enzyme inhibition method for rapid detection of pesticide residue in vegetables, "Anhui agricultural science, vol.45, no.1, pp.102-104,2017.
[6] Rubing, liu Ying, wang Shuangjie, et al, "chemiluminescent enzyme-linked immunoassay for simultaneous detection of 3 organophosphorus pesticide residues," agronomic report, vol.19, no.1, pp.37-45,2017.
[7] Zhang Wencheng, gong Hongjing "rapid detection of pesticide residues in fruits and vegetables" research progress, "food science, vol.29, no.12, pp.752-755,2008.
[8] Li, cai Yue, yang Shengqin, chancurd, huang Xiangrong, ji Wenfang, "improved QuEChERS method is matched with GPC-GC-MS on-line combination system to measure 31 pesticide residues in fruits and vegetables", journal of Chinese health inspection, vol.21, no.2, pp.277-279,2011.
Disclosure of Invention
The invention provides a fruit and vegetable pesticide residue detection method and system based on a hyperspectral fruit and vegetable image mixed pixel sparse decomposition model, which aims to solve the problems of long time consumption, low efficiency and high cost in the detection process and belongs to the field of lossy detection in the detection method in the prior art.
The technical scheme adopted by the method is as follows: a fruit and vegetable pesticide residue detection method based on hyperspectral images comprises the following steps:
step 1: spraying pesticides with different types and different concentrations on fruits and vegetables, and preparing a fruit and vegetable sample after spraying the pesticides; carrying out typical spectrum acquisition on the prepared fruit and vegetable samples at random, calculating the average spectrum of each sample group, preprocessing spectrum data, and constructing a fruit and vegetable-pesticide overcomplete end member spectrum library;
step 2: based on the mapping relation between the hyperspectral image and the sparse expression theory, non-negative constraint, component sum as one constraint and TV total variation regularization constraint are integrated, and a hyperspectral fruit and vegetable image mixed pixel sparse decomposition model with the empty-spectrum synergy is constructed;
step 3: adopting an alternating direction multiplication method ADMM, constructing an augmented Lagrangian function to convert a constraint problem into an unconstrained problem, decomposing a complex optimization problem into a series of simple sub-problems by using a separation variable, and alternately optimizing and repeatedly iterating until a convergence condition is reached, so as to solve a hyperspectral fruit and vegetable image mixed pixel sparse decomposition model;
step 4: and analyzing chemical components and contents of residual pesticides in fruits and vegetables to be detected based on the solved abundance images.
Preferably, in step 1, the spectrum data preprocessing is to perform convolution smoothing filtering on the original spectrum data, and replace the original numerical value with the fitting value based on a least square fitting algorithm.
Preferably, in the step 2, the sparse decomposition model of the mixed pixels of the hyperspectral fruit and vegetable image with the synergistic effect of the space-spectrum is as follows:
wherein Y represents hyperspectral fruit and vegetable images to be processed, A represents a dictionary of an overcomplete end-member spectrum library of fruits and vegetables and pesticides, X is an abundance image, and the X is an abundance image, N is the model error and the noise contribution, I X I 1 X is more than or equal to 0 and is a non-negative constraint for sparse constraint,is a constraint; x is X i For the component information corresponding to the ith end member spectrum signal, N is the end member number, lambda TV The coefficients of the regularization term for the full variation of abundance are used to control the degree of smoothness of the abundance map segmentation. TV (X) is an abundance total variation regularization term:
wherein m and n are the length and width of the image, and p and q are the index values of the image rows and columns respectively; x is X p,q Representing the behavior p, the image features listed as q.
Preferably, the specific implementation of the step 3 comprises the following sub-steps:
step 3.1: taking the formula (1) as an original optimization problem (1), introducing a redundant variable matrix to perform equivalent conversion on the original optimization problem (1) to obtain an optimization problem (2):
wherein ,V1 ,V 2 ,V 3 ,V 4 ,V 5 And U is an auxiliary redundant variable matrix; lambda is a non-negative regularization parameter,Is an indication function if V 5 =0, then->Otherwise->H is a convolution matrix, and the discrete Fourier transform is utilized to convert the image from a space domain to a frequency domain for quick solution;
step 3.2: introducing auxiliary terms of each term as objective function cracking terms, and converting a constrained optimization problem (2) into an unconstrained problem (3):
wherein , and />The Lagrangian secondary penalty terms are adopted, the subscript F represents the F-norm of the matrix, and mu is the penalty factor; d (D) 1 ,D 2 ,D 3 ,D 4 ,D 5 Initialized to zero matrix equal to abundance diagram, U, V 1 ,V 2 ,V 3 ,V 4 ,V 5 Initializing to a zero matrix; so far, the construction of the augmented Lagrangian objective solution function based on the alternate direction multiplier strategy is completed;
step 3.3: the separation variable decomposes the complex optimization problem into a series of simple sub-problems using the following formula:
wherein H is a convolution matrix, the hyperspectral fruit and vegetable image is converted from a space domain to a frequency domain by using discrete Fourier transform to carry out quick solution, and k is the current iteration number;
iterative and alternate optimization of each target variable until reaching convergence condition GU (k) +BV (k) || F Epsilon or designated iteration number is less than or equal to epsilon
Stopping; wherein the convergence condition is thatEpsilon is a preset threshold;
finally solving the obtained abundance image, namely U in the optimization function; and analyzing the non-zero elements of the matrix U, and finding out an end member spectrum of the residual pesticide from a spectrum library according to the row labels of the non-zero elements in the matrix U, wherein the end member spectrum corresponds to chemical components of the residual pesticide in fruits and vegetables to be detected.
In the step 4, the safety level of the fruits and vegetables is further evaluated according to the obtained chemical components and content of the residual pesticides in the fruits and vegetables to be detected, a fruit and vegetable safety level evaluation lookup table corresponding to different chemical components and content of the pesticides is constructed, and then the safety level of the fruits and vegetables to be detected is rapidly evaluated by comparing the model solving result with the pesticide residue level lookup table.
The system of the invention adopts the technical proposal that: a fruit and vegetable pesticide residue detection system based on hyperspectral images comprises:
one or more processors;
and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the fruit and vegetable pesticide residue detection method based on the hyperspectral image.
The method adopts the hyperspectral technology combined with the spectrum and the mixed pixel sparse decomposition theory to realize the detection of the pesticide residues of the fruits and the vegetables, can be based on a sparse expression model and an alternative multiplier quick solving algorithm, can directly and quickly detect the pesticide residues of the fruits and the vegetables according to hyperspectral images, and has the advantages of automation, no damage, no pollution, rapidness, high efficiency and the like.
Drawings
The following examples, as well as specific embodiments, are used to further illustrate the technical solutions herein. In addition, in the course of describing the technical solutions, some drawings are also used. Other figures and the intent of the present invention can be derived from these figures without inventive effort for a person skilled in the art.
FIG. 1 is a block flow diagram of a method of an embodiment of the present invention.
FIG. 2 is a graph showing the comparison of the effects of the spectral data sets of fruits and vegetables before and after filtering, wherein (a) is Fuji, (b) is Gala, (c) is fructus Cnidii, (d) is yellow marshal, and (e) is Chinese cabbage;
FIG. 3 is a graph showing comparison of the effects of an agricultural chemical spectrum dataset I before and after filtration in an example of the present invention, wherein (a) is acetamiprid, (b) is carbendazim, (c) is imidacloprid, (d) is thiophanate-methyl, (e) is tebuconazole, (f) is beta-cypermethrin, (g) is bifenthrin, and (h) is abamectin.
Detailed Description
In order to facilitate the understanding and practice of the invention, those of ordinary skill in the art will now make further details with reference to the drawings and examples, it being understood that the examples described herein are for the purpose of illustration and explanation only and are not intended to limit the invention thereto.
Referring to fig. 1, the method for detecting pesticide residues on fruits and vegetables based on hyperspectral images provided by the invention comprises the following steps:
step S1: spraying pesticides with different types and different concentrations on fruits and vegetables, and preparing a fruit and vegetable sample after spraying the pesticides.
In this embodiment, fruits are exemplified by red Fuji apples, vegetables are exemplified by Chinese cabbage, and pesticide types are applicable to other fruits such as watermelon, banana and orange, and other vegetables such as cabbage, cucumber, eggplant, etc. The sprayed pesticide is commonly used in the market and comprises thiophanate-methyl, beta-cypermethrin, bifenthrin, tebuconazole, abamectin, imidacloprid, acetamiprid and carbendazim.
And cleaning apples and cabbages purchased in a supermarket for many times and naturally airing the apples and the cabbages, so that no pesticide remains on the surfaces of the apples and the cabbages. Respectively adding 50ml, 100ml, 150ml, 175ml, 200ml, 225ml and 250ml of water to dilute and prepare different pesticide concentrations, and uniformly spraying the pesticide concentrations on the surfaces of apples and cabbages. The corresponding concentration of the water addition amount of the pesticide used by the apples is shown in table 1, and the corresponding concentration of the water addition amount of the pesticide used by the cabbages is shown in table 2.
Table 1 table of the concentration of the pesticide used in apples
TABLE 2 lookup table of pesticide water addition amount to concentration for cabbage
Numbering device Water adding quantity (ml) Avermectin (%) Imidacloprid (%) Acetamiprid (%) Carbendazim (%)
1 50 0.0100 0.1400 0.0800 0.5000
2 75 0.0067 0.0933 0.0533 0.3333
3 100 0.0050 0.0700 0.0400 0.2500
4 125 0.0040 0.0560 0.0320 0.2000
5 150 0.0033 0.0467 0.0267 0.1667
6 175 0.0029 0.0400 0.0229 0.1429
7 200 0.0025 0.0350 0.0200 0.1250
8 225 0.0022 0.0311 0.0178 0.1111
9 250 0.0020 0.0280 0.0160 0.1000
Step S2: and carrying out typical spectrum acquisition on the prepared fruit and vegetable samples by utilizing a spectrometer, calculating the average spectrum of each sample group, and carrying out spectrum data pretreatment to construct a fruit and vegetable-pesticide overcomplete end member spectrum library.
In one embodiment, the spectral data is collected using an ASD FieldSpec 3 portable field clutter spectrometer provided by ASD Inc. (Analytical Spectral Devices) in the United states at a wavelength range of 1000-2500nm with a spectral spacing of 1.4nm between 350-1050nm and a spectral spacing of 2nm between 1000-2500 nm. The artificial light source matched with an ASD instrument is used for simulating sunlight, measurement is carried out in a darkroom, and the spectrum acquisition time is 18:30 to 22:30.
the specific spectrum acquisition process is as follows:
(1) Preheating the instrument for 15 minutes;
(2) Connecting a matched computer cable after preheating;
(3) Starting a computer;
(4) Opening an RS3 operation program;
(5) Setting a spectrum data storage position, a spectrum name and a starting number;
(6) Setting the lens type to be 5 degrees, and setting the spectrum, dark current and white board spectrum average times to be 20 times;
(7) The spectrometer is aligned to the whiteboard, the whiteboard is required to be filled with the view field of the lens, the Opt icon is clicked, and the spectrometer condition is optimized;
(8) Clicking a DC icon to collect dark current;
(9) Clicking on the WR icon. The instrument collects dark current again, then displays a straight line, and the reflectivity is 100%;
(10) Transferring the spectrometer to the measured target, and measuring the relative reflection spectrum curve of the target by the spectrometer.
And importing the spectrum data measured by the ASD spectrometer into ViewSpec Pro software, removing abnormal values, and then carrying out average value taking operation. Then, the data is imported into Matlab, a Savitzky-Golay filter is utilized to carry out convolution smoothing filtering on the original spectrum data, the basic principle is that fitting value is used to replace original numerical value based on least square fitting, the effects of removing high-frequency noise points, improving signal to noise ratio and smoothing original data sequences are achieved, and then the data are put in storage to construct an overcomplete end-member spectrum library.
Step S3: based on a sparse expression theory framework, the mapping relation between the hyperspectral image and the sparse expression theory is researched, the hyperspectral fruit and vegetable image mixed pixel sparse decomposition theory and method based on an overcomplete end member spectrum library are developed, and meanwhile, non-negative constraint, component sum 1 constraint and TV total variation regularization constraint are integrated, so that a hyperspectral fruit and vegetable image mixed pixel sparse decomposition model with the air-spectrum synergy is constructed.
In one embodiment, the auxiliary effect of physical meaning of end member components and image space information on spectrum unmixing is fully considered, non-negative constraint, component sum is a constraint and TV total variation regularization constraint is added into a hyperspectral mixed pixel sparse decomposition model, a full constraint hyperspectral fruit and vegetable image mixed pixel sparse decomposition model and method with empty-spectrum synergy are constructed, and a mathematical model is shown in a formula (1):
wherein Y represents hyperspectral fruit and vegetable images to be processed, A represents a dictionary of an overcomplete end-member spectrum library of fruits and vegetables and pesticides, X is an abundance image, and the X is an abundance image, N is the model error and the noise contribution, I X I 1 X is more than or equal to 0 and is a non-negative constraint for sparse constraint,is a constraint. X is X i For the component information corresponding to the ith end member spectrum signal, N is the end member number, lambda TV Regularization term coefficient for full variation of abundance for controlling abundanceThe degree of smoothness of the graph segments. TV (X) is an abundance total variation regularization term:
wherein m and n are the length and width of the image, and p and q are the index values of the image rows and columns respectively; x is X p,q Representing the behavior p, the image features listed as q.
Step S4: the method comprises the steps of adopting an alternating direction multiplication method ADMM, constructing an augmented Lagrangian function to convert a constrained problem into an unconstrained problem, decomposing a complex optimization problem into a series of simple sub-problems by separating variables, and carrying out alternating optimization and repeated iteration until convergence conditions are reached, so that the rapid solution of the hyperspectral fruit and vegetable image mixed pixel sparse decomposition model is realized.
In one embodiment, equation (1) is taken as the original optimization problem (1) and a redundancy variable V is introduced 1 ,V 2 ,V 3 ,V 4 ,V 5 And U performs equivalent conversion on the original optimization problem (1) to obtain an optimization problem (2):
wherein ,V1 ,V 2 ,V 3 ,V 4 ,V 5 And U is an auxiliary redundant variable matrix; lambda is a non-negative regularization parameter,Is an indication function if V 5 =0, then->Otherwise->H is a convolution matrix, and the discrete Fourier transform is utilized to convert the image from a space domain to a frequency domain for quick solution;
then, aiming at the optimization problem (2), an alternate direction multiplier strategy is applied, auxiliary items corresponding to the items are introduced as objective function cracking items, and the objective function is optimized, so that the expanded extended Lagrangian function can be constructed as follows:
wherein , and />The Lagrangian secondary penalty terms are adopted, the subscript F represents the F-norm of the matrix, and mu is the penalty factor; d (D) 1 ,D 2 ,D 3 ,D 4 ,D 5 Initialized to zero matrix equal to abundance diagram, U, V 1 ,V 2 ,V 3 ,V 4 ,V 5 Initializing to a zero matrix; so far, the construction of the augmented Lagrangian objective solution function based on the alternate direction multiplier strategy is completed;
finally, decomposing the optimization problem (4) into a series of sub-problems to perform optimization solution one by one:
wherein H is a convolution matrix, the hyperspectral fruit and vegetable image is converted from a space domain to a frequency domain by using discrete Fourier change to carry out quick solution, and k is the current iteration number.
Iterative and alternate optimization of each target variable until reaching convergence condition GU (k) +BV (k) || F Epsilon or the appointed iteration times, wherein the convergence condition is thatEpsilon is a preset threshold value. And finally solving the obtained abundance image, namely the U in the optimization function.
Finally solving the obtained abundance image, namely U in the optimization function; and analyzing the non-zero elements of the matrix U, and finding out an end member spectrum of the residual pesticide from a spectrum library according to the row labels of the non-zero elements in the matrix U, wherein the end member spectrum corresponds to chemical components of the residual pesticide in fruits and vegetables to be detected. The row containing non-zero elements in the U is an abundance diagram corresponding to the end member, namely the content of different pesticide residues in the fruits and vegetables to be detected. In the abundance map, the area with lighter color indicates that the content of pesticide residue is larger, the area with darker color corresponds to the small content of pesticide residue, and the area with black color indicates that no pesticide residue exists.
Step S5: and analyzing chemical components and contents of residual pesticides in fruits and vegetables to be detected based on the solved abundance images, and rapidly evaluating the safety grade of the fruits and vegetables.
In one embodiment, firstly, a fruit and vegetable safety grade evaluation lookup table containing different pesticide chemical components and contents is constructed, and then the safety grade of fruits and vegetables to be detected is rapidly evaluated by comparing a model solving result with a pesticide residue level lookup table.
Please refer to fig. 2, which is a graph comparing effects before and after filtering of a fruit and vegetable spectrum data set in the embodiment of the present invention, wherein (a) is red Fuji, (b) is ga la, (c) is snake fruit, (d) is yellow marshal, and (e) is cabbage;
please refer to fig. 3, which is a diagram showing the comparison of the effects of the pesticide spectrum data set i before and after filtration in the embodiment of the present invention, wherein (a) is acetamiprid, (b) is carbendazim, (c) is imidacloprid, (d) is thiophanate-methyl, (e) is tebuconazole, (f) is beta-cypermethrin, (g) is bifenthrin, and (h) is abamectin.
In fig. 2 and 3, the abscissa indicates wavelength in nanometers, and the ordinate indicates reflectance in percent. For apples, three lines respectively correspond to the spectral curves of the bottom, surrounding and top areas of the fruits and vegetables; for Chinese cabbage, two lines correspond to the white region and the green leaf region, respectively; for pesticides, the nine lines correspond to the spectral curves of different concentrations of pesticide in the pesticide stock solution, diluted with water added in amounts of 0ml, 50ml, 100ml, 150ml, 175ml, 200ml, 225ml and 250ml, respectively. Wherein the left graph is before filtering, and the right graph is after filtering. The figure shows that the filtering can remove high-frequency noise points, improve the signal-to-noise ratio and smooth the original data sequence.
The invention adopts the hyperspectral technology combined with the spectrum and the mixed pixel sparse decomposition theory to realize the detection of the pesticide residue of fruits and vegetables, and has the advantages of automation, no damage, no pollution, rapidness, high efficiency and the like.
It should be understood that the foregoing description of the preferred embodiments is not intended to limit the scope of the invention, but rather to limit the scope of the claims, and that those skilled in the art can make substitutions or modifications without departing from the scope of the invention as set forth in the appended claims.

Claims (6)

1. The fruit and vegetable pesticide residue detection method based on hyperspectral images is characterized by comprising the following steps of:
step 1: spraying pesticides with different types and different concentrations on fruits and vegetables, and preparing a fruit and vegetable sample after spraying the pesticides; carrying out typical spectrum acquisition on the prepared fruit and vegetable samples at random, calculating the average spectrum of each sample group, preprocessing spectrum data, and constructing a fruit and vegetable-pesticide overcomplete end member spectrum library;
step 2: based on the mapping relation between the hyperspectral image and the sparse expression theory, non-negative constraint, component sum as one constraint and TV total variation regularization constraint are integrated, and a hyperspectral fruit and vegetable image mixed pixel sparse decomposition model with the empty-spectrum synergy is constructed;
step 3: constructing an augmented Lagrangian function to convert a constrained problem into an unconstrained problem, decomposing a complex optimization problem into a series of simple sub-problems by using a separation variable, and alternately optimizing and repeatedly iterating until a convergence condition is reached, so as to solve a hyperspectral fruit and vegetable image mixed pixel sparse decomposition model;
step 4: and analyzing chemical components and contents of residual pesticides in fruits and vegetables to be detected based on the solved abundance images.
2. The hyperspectral image-based fruit and vegetable pesticide residue detection method as set forth in claim 1, wherein: in the step 1, the spectrum data preprocessing is to perform convolution smoothing filtering on the original spectrum data, and the fitting value is used for replacing the original numerical value based on a least square fitting algorithm.
3. The hyperspectral image-based fruit and vegetable pesticide residue detection method as set forth in claim 1, wherein: in the step 2, the sparse decomposition model of the mixed pixels of the hyperspectral fruit and vegetable image with the synergy of the space-spectrum is as follows:
wherein Y represents hyperspectral fruit and vegetable images to be processed, A represents a dictionary of an overcomplete end-member spectrum library of fruits and vegetables and pesticides, X is an abundance image, and the X is an abundance image, N is the model error and the noise contribution, I X I 1 X is more than or equal to 0 and is a non-negative constraint for sparse constraint,to sum as a constraint, X i For the component information corresponding to the ith end member spectrum signal, N is the end member number, lambda TV The coefficient of the regularization term of the full variation of the abundance is used for controlling the segmentation smoothness of the abundance map; TV (X) is an abundance total variation regularization term:
wherein m and n are the length and width of the image, and p and q are the index values of the image rows and columns respectively; x is X p,q Representing the behavior p, the image features listed as q.
4. The hyperspectral image-based fruit and vegetable pesticide residue detection method as set forth in claim 3, wherein: the specific implementation of the step 3 comprises the following sub-steps:
step 3.1: taking the formula (1) as an original optimization problem (1), introducing a redundant variable matrix to perform equivalent conversion on the original optimization problem (1) to obtain an optimization problem (2):
wherein ,V1 ,V 2 ,V 3 ,V 4 ,V 5 And U is an auxiliary redundant variable matrix; lambda is a non-negative regularization parameter,Is an indication function if V 5 =0, then->Otherwise->H is a convolution matrix, and the discrete Fourier transform is utilized to convert the image from a space domain to a frequency domain for quick solution;
step 3.2: introducing auxiliary terms of each term as objective function cracking terms, and converting a constrained optimization problem (2) into an unconstrained problem (3):
wherein ,andthe Lagrangian secondary penalty terms are adopted, the subscript F represents the F-norm of the matrix, and mu is the penalty factor; d (D) 1 ,D 2 ,D 3 ,D 4 ,D 5 Initialized to zero matrix equal to abundance diagram, U, V 1 ,V 2 ,V 3 ,V 4 ,V 5 Initializing to a zero matrix; to this end, a multiplier strategy based on alternating directionsThe construction of a slightly-augmented Lagrangian objective solution function is completed;
step 3.3: the separation variable decomposes the complex optimization problem into a series of simple sub-problems using the following formula:
wherein H is a convolution matrix, the hyperspectral fruit and vegetable image is converted from a space domain to a frequency domain by using discrete Fourier transform to carry out quick solution, and k is the current iteration number;
iterative and alternate optimization of each target variable until reaching convergence condition GU (k) +BV (k) || F Epsilon or less than or equal to the designated iteration times; wherein the convergence condition is thatEpsilon is a preset threshold;
finally solving the obtained abundance image, namely U in the optimization function; and analyzing the non-zero elements of the matrix U, and finding out an end member spectrum of the residual pesticide from a spectrum library according to the row labels of the non-zero elements in the matrix U, wherein the end member spectrum corresponds to chemical components of the residual pesticide in fruits and vegetables to be detected.
5. The hyperspectral image-based fruit and vegetable pesticide residue detection method as set forth in any one of claims 1 to 4, wherein: in step 4, the safety grade of the fruits and vegetables is further evaluated according to the obtained chemical components and content of the residual pesticides in the fruits and vegetables to be detected, a fruit and vegetable safety grade evaluation lookup table corresponding to different chemical components and content of the pesticides is constructed first, and then the safety grade of the fruits and vegetables to be detected is rapidly evaluated by comparing the model solving result with the pesticide residue level lookup table.
6. Fruit and vegetable pesticide residue detection system based on hyperspectral image, characterized by comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the hyperspectral image based fruit and vegetable pesticide residue detection method as set forth in any one of claims 1 to 5.
CN202310667493.3A 2023-06-06 2023-06-06 Fruit and vegetable pesticide residue detection method and system based on hyperspectral image Pending CN116879184A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310667493.3A CN116879184A (en) 2023-06-06 2023-06-06 Fruit and vegetable pesticide residue detection method and system based on hyperspectral image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310667493.3A CN116879184A (en) 2023-06-06 2023-06-06 Fruit and vegetable pesticide residue detection method and system based on hyperspectral image

Publications (1)

Publication Number Publication Date
CN116879184A true CN116879184A (en) 2023-10-13

Family

ID=88268773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310667493.3A Pending CN116879184A (en) 2023-06-06 2023-06-06 Fruit and vegetable pesticide residue detection method and system based on hyperspectral image

Country Status (1)

Country Link
CN (1) CN116879184A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117809070A (en) * 2024-03-01 2024-04-02 唐山市食品药品综合检验检测中心(唐山市农产品质量安全检验检测中心、唐山市检验检测研究院) Spectral data intelligent processing method for detecting pesticide residues in vegetables

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117809070A (en) * 2024-03-01 2024-04-02 唐山市食品药品综合检验检测中心(唐山市农产品质量安全检验检测中心、唐山市检验检测研究院) Spectral data intelligent processing method for detecting pesticide residues in vegetables
CN117809070B (en) * 2024-03-01 2024-05-14 唐山市食品药品综合检验检测中心(唐山市农产品质量安全检验检测中心、唐山市检验检测研究院) Spectral data intelligent processing method for detecting pesticide residues in vegetables

Similar Documents

Publication Publication Date Title
CN101915744B (en) Near infrared spectrum nondestructive testing method and device for material component content
Hoang Wavelet-based spectral analysis
Gogé et al. Optimization criteria in sample selection step of local regression for quantitative analysis of large soil NIRS database
Pollo et al. Chemometrics, comprehensive two-dimensional gas chromatography and “omics” sciences: Basic tools and recent applications
Stilo et al. Chromatographic fingerprinting by comprehensive two-dimensional chromatography: Fundamentals and tools
Cheng et al. Predicting leaf gravimetric water content from foliar reflectance across a range of plant species using continuous wavelet analysis
Song et al. Chlorophyll content estimation based on cascade spectral optimizations of interval and wavelength characteristics
Park et al. Improved prediction of biomass composition for switchgrass using reproducing kernel methods with wavelet compressed FT-NIR spectra
Shafri et al. Detection of stressed oil palms from an airborne sensor using optimized spectral indices
Berrier et al. Advanced data handling in comprehensive two-dimensional gas chromatography
CN116879184A (en) Fruit and vegetable pesticide residue detection method and system based on hyperspectral image
Baccolo et al. From untargeted chemical profiling to peak tables–A fully automated AI driven approach to untargeted GC-MS
Fadock et al. Visible-near infrared reflectance spectroscopy for nondestructive analysis of red wine grapes
Zhao et al. Deep learning assisted continuous wavelet transform-based spectrogram for the detection of chlorophyll content in potato leaves
Liu et al. Evaluating the characteristics of soil vis-NIR spectra after the removal of moisture effect using external parameter orthogonalization
Takahama et al. Atmospheric particulate matter characterization by Fourier transform infrared spectroscopy: a review of statistical calibration strategies for carbonaceous aerosol quantification in US measurement networks
Ju et al. Rapid Identification of Atmospheric Gaseous Pollutants Using Fourier‐Transform Infrared Spectroscopy Combined with Independent Component Analysis
Wang et al. Simultaneous detection of different properties of diesel fuel by near infrared spectroscopy and chemometrics
Tan et al. Mutual information-induced interval selection combined with kernel partial least squares for near-infrared spectral calibration
CN113686811A (en) Spectral data processing method based on double sensors
Zhang et al. Machine learning applications for multi-source data of edible crops: A review of current trends and future prospects
Zhang et al. Hyperspectral model based on genetic algorithm and SA-1DCNN for predicting Chinese cabbage chlorophyll content
CN110887798B (en) Nonlinear full-spectrum water turbidity quantitative analysis method based on extreme random tree
Yao et al. Prediction of total nitrogen content in different soil types based on spectroscopy
Yu et al. Ensemble calibration model of near-infrared spectroscopy based on functional data analysis

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination