A portable pesticide detection method and device based on double fluorescent hydrogel
Patent Information
- Application Number
- CN202611055016.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2046-07-16
AI Technical Summary
若说明书仅宣称检测限、线性范围或误差降低,而没有给出配对样品、标准仪器标签和测试条件,则相应数值不宜作为确认性技术效果写入申请文本
1.本方案无需使用昂贵的外置窄带滤光片,仅凭普通的彩色摄像头即可完成双荧光信号的精确采集。这为基于智能手机或低成本边缘计算终端的现场检测奠定了硬件可行性。
Smart Images

Figure CN122567628B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of quantitative analysis, and in particular to a portable pesticide detection method and device based on dual-fluorescent hydrogels. Background Technology
[0002] Rapid on-site detection of pesticide residues typically requires a balance between detection sensitivity, ease of operation, and equipment cost. Ratio fluorescence sensors utilize the ratio between the target response fluorescence signal and the reference fluorescence signal for readout, which can reduce the impact of probe load, excitation light intensity, and local thickness inhomogeneity on the detection results.
[0003] Existing patent searches indicate that ratiometric fluorescent pesticide sensors and smartphone color readings are already adjacent technological paths; filterless fluorescence image detection also has solutions based on chip structure or local light field. Existing solutions typically do not simultaneously disclose how to form a complete closed loop under field conditions of ordinary color cameras and no external narrowband filters, through flicker background subtraction, color temperature orthogonalization, pixel-level crosstalk demixing, and a label-consistent concentration estimation model.
[0004] If the ratio of dual fluorescence signals is calculated directly using the red, green, and blue channels of a color camera, the DC component of ambient light, the direction of color temperature change, and the overlap of the responses of the two fluorescent dyes in the camera channels will all introduce bias. If the instruction manual only claims the detection limit, linear range, or error reduction without providing paired samples, standard instrument labels, and test conditions, the corresponding values should not be included in the application text as confirmatory technical effects. Summary of the Invention
[0005] The present invention aims to at least solve one of the technical problems existing in related technologies. To this end, the present invention provides a portable pesticide detection method and device based on dual-fluorescent hydrogels.
[0006] This invention provides the first technical solution.
[0007] A portable pesticide detection method based on dual-fluorescent hydrogels, comprising the following steps: The modulation excitation light source is controlled to alternately light up and turn off at a preset frequency, and a color camera is used to capture in-phase and out-of-phase images respectively when the modulation excitation light source is lit and turned off; wherein the exposure parameters of the in-phase image and the out-of-phase image are kept consistent; Perform difference calculations on the in-phase image and the out-of-phase image to extract the pure fluorescence response image; The pure fluorescence response image is mapped to the chromaticity plane to obtain the chromaticity plane coordinate vector; based on the pre-acquired direction of ambient light color temperature change, the chromaticity plane coordinate vector is orthogonally decoupled to output a color temperature insensitive fluorescence component orthogonal to the direction of ambient light color temperature change. Obtain a pre-established chromatic crosstalk demixing matrix; use the chromatic crosstalk demixing matrix to perform calculations on the color temperature insensitive fluorescence component to separate the pure signal intensity of the target response dye and the pure signal intensity of the reference dye; A pixel-level pure signal ratio is generated based on the pure signal intensity of the target response dye and the pure signal intensity of the reference dye. Obtain the detection area on the dual-fluorescent hydrogel sensor; perform statistical calculations on the pixel-level pure signal ratio within the detection area to obtain a ratio statistic. The ratio statistic is input into a preset concentration estimation model for concentration mapping to obtain and output the target pesticide concentration.
[0008] Furthermore, while controlling the modulation excitation light source to alternately light up and turn off at a preset frequency, the exposure timestamp of the color camera is recorded; If the exposure timestamps of the in-phase image and the out-of-phase image acquired within the same detection period do not match, the exposure is saturated, or the change in ambient light between adjacent frames exceeds a preset threshold, then the current frame group is discarded. The dual-fluorescent hydrogel sensor contains the reference dye in a stable luminescent state and the target response dye that changes luminescence under the action of the target pesticide, and both dyes are fixed in the hydrogel matrix. The matrix material of the hydrogel matrix is selected from one or more of polyacrylamide, sodium alginate, gelatin or polyvinyl alcohol.
[0009] Further, the step of performing difference calculations on the in-phase image and the out-of-phase image to extract the pure fluorescence response image specifically includes: When the frame interval between adjacent frames is uniform and the change in ambient light meets the stability condition, calculate the pure fluorescence response pixel vector after flicker demodulation; the pure fluorescence response pixel vector is equal to the difference between the in-phase image pixel vector and the out-of-phase image pixel vector. in, This is the pure fluorescence response pixel vector after flicker demodulation, containing R, G, and B channel values; To modulate the in-phase image pixel vector acquired when the excitation light source is lit; To modulate the inverted image pixel vector acquired when the excitation light source is extinguished; When the frame intervals of the in-phase image and the out-of-phase image are not uniform, a weighted differential pure fluorescence response pixel vector is calculated; the weighted differential pure fluorescence response pixel vector is equal to the product of the differential weight of the preceding out-of-phase frame and the first difference, plus the product of the differential weight of the following out-of-phase frame and the second difference; wherein the first difference is the in-phase image pixel vector minus the preceding out-of-phase image pixel vector, and the second difference is the in-phase image pixel vector minus the following out-of-phase image pixel vector; in, This is the weighted difference of the pure fluorescence response pixel vector; Differential weights for preceding inverted frames; Differential weights for subsequent inverted frames; satisfy It is calculated by normalizing the inter-frame time interval; To modulate the in-phase image pixel vector acquired when the excitation light source is lit; The pixel vector of the preceding inverted image; This is the pixel vector of the subsequent inverted image, which is the pixel vector of the current inverted image.
[0010] Further, the step of mapping the pure fluorescence response image to the chromaticity plane to obtain the chromaticity plane coordinate vector specifically includes: Obtain a pre-calibrated color conversion matrix; the color conversion matrix is obtained by fitting camera spectral sensitivity calibration data or standard color chart with narrowband light source calibration data. The color vector of the pure fluorescence response image is mapped to the chromaticity plane coordinate vector; the chromaticity plane coordinate vector is equal to the product of the color transformation matrix and the color vector of the pure fluorescence response image; in, This is either a chromaticity plane coordinate vector or a quasi-orthogonal transformation input vector. This is a color transformation matrix; This is the pixel vector of pure fluorescent response after flicker demodulation.
[0011] Furthermore, the step of orthogonally decoupling the chromaticity plane coordinate vector based on the pre-acquired direction of ambient light color temperature change, and outputting a color temperature-insensitive fluorescence component orthogonal to the direction of ambient light color temperature change, specifically includes: Obtain the vector of direction of ambient light color temperature change; The rotation angle is determined based on the ambient light color temperature change direction vector, and the chromaticity plane coordinate vector is decoupled by rotation transformation. The transpose of the component aligned with the ambient light color temperature change direction and the color temperature insensitive fluorescence component orthogonal to the color temperature change direction is equal to the product of the rotation transformation matrix constructed based on the rotation angle and the chromaticity plane coordinate vector. in, The component aligned with the direction of ambient light color temperature change; The color temperature insensitive fluorescence component is orthogonal to the direction of color temperature change; This is either a chromaticity plane coordinate vector or a quasi-orthogonal transformation input vector. This is the vector representing the direction of change in ambient light color temperature. Q(θ) is a rotation transformation matrix with parameter θ, where θ is the direction vector of ambient light color temperature change. Sure.
[0012] Furthermore, the method for obtaining the chroma crosstalk demixing matrix includes: The response vectors of the first calibration sample containing only the target response dye and the response vectors of the second calibration sample containing only the reference dye were collected respectively. The collected response vector is fitted and calculated using the least squares method or pseudo-inverse operation to obtain the chroma crosstalk demixing matrix.
[0013] Further, the step of generating a pixel-level pure signal ratio based on the pure signal intensity of the target response dye and the pure signal intensity of the reference dye specifically includes: The pixel-level pure signal ratio is equal to the pure signal intensity of the target response dye divided by the sum of the pure signal intensity of the reference dye and the minimum guaranteed amount in the denominator. in, This represents the pure signal ratio at the pixel level. The pure signal intensity of the target response dye; The pure signal intensity of the reference dye; To maintain a small margin in the denominator, this is used to avoid unstable ratios when the reference signal is close to zero.
[0014] Furthermore, the concentration estimation model is a multinomial model using calibrated regression coefficients; the step of inputting the ratio statistic into the preset concentration estimation model for concentration mapping, obtaining and outputting the target pesticide concentration, specifically includes: The predicted value of the target pesticide concentration is equal to the sum of the products of the calibration regression coefficients of each order from zero to the highest order, and the corresponding powers of the ratio statistic. in, The target pesticide concentration is the predicted value; To calibrate the regression coefficients; This is a statistical measure of the ratio of the hydrogel detection area. To calibrate the highest order of the regression polynomial; m is the summation index variable.
[0015] Furthermore, it also includes an anomaly handling step, which stops outputting the confirmatory target pesticide concentration value and outputs a prompt message when any of the following situations occur: The area of the detection region on the dual fluorescent hydrogel sensor is smaller than a preset area threshold or the boundary is obscured. Based on the component aligned with the direction of ambient light color temperature change, it was determined that the ambient light color temperature disturbance exceeded a preset threshold. The pure signal intensity of the reference dye is lower than a preset minimum threshold. The condition number of the chroma crosstalk demixing matrix is greater than a preset condition number threshold. The ratio statistic exceeds the preset calibration range.
[0016] A second technical solution is proposed based on the first one.
[0017] A portable pesticide detection device based on dual-fluorescent hydrogel, used to perform the aforementioned portable pesticide detection method based on dual-fluorescent hydrogel, includes: The synchronization control module is used to control the modulation excitation light source to alternately light up and turn off at a preset frequency, and to control the color camera to acquire in-phase and out-of-phase images respectively when the modulation excitation light source is lit and turned off; The fluorescence response extraction module is used to perform difference calculations on the in-phase image and the out-of-phase image, extract and output a pure fluorescence response image; The quasi-orthogonal color space module is used to map the pure fluorescence response image to the chromaticity plane to obtain the chromaticity plane coordinate vector, and to orthogonally decouple the chromaticity plane coordinate vector according to the pre-acquired ambient light color temperature change direction, and output the color temperature insensitive fluorescence component orthogonal to the ambient light color temperature change direction; The chromatic crosstalk demixing module is used to perform calculations on the color temperature insensitive fluorescence component using a pre-established chromatic crosstalk demixing matrix, and to separate and output the pure signal intensity of the target response dye and the pure signal intensity of the reference dye. A ratio image generation module is used to calculate and output a pixel-level pure signal ratio based on the pure signal intensity of the target response dye and the pure signal intensity of the reference dye. The detection area statistics module is used to obtain the detection area of the dual fluorescent hydrogel sensor, and to perform statistical calculations on the pixel-level pure signal ratio within the detection area, and output the ratio statistics. The concentration estimation module is used to input the ratio statistics into a preset concentration estimation model for concentration mapping, and to obtain and output the target pesticide concentration.
[0018] The above-described one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects: 1. This solution eliminates the need for expensive external narrowband filters, enabling precise acquisition of dual fluorescence signals using only a standard color camera. This establishes hardware feasibility for on-site detection based on smartphones or low-cost edge computing terminals.
[0019] 2. In response to complex on-site environments, the solution utilizes controlled light source flicker combined with image difference algorithms to effectively remove DC background from ambient light. At the same time, it creatively applies quasi-orthogonal color space mapping to rotate and decouple the chromaticity coordinates in the direction of color temperature change, completely eliminating the "color temperature drift" interference caused by cloud changes or lighting switching.
[0020] 3. The problem of response overlap that inevitably exists in the red-green-blue (RGB) channels of a camera with dual fluorescent dyes was solved. By introducing a chromaticity crosstalk demixing matrix calibrated with a single dye, the true physical intensities of the target response fluorescence and the reference fluorescence were purely separated at the algorithm level, significantly improving the accuracy of signal extraction.
[0021] 4. The solution incorporates a comprehensive, multi-dimensional anomaly triggering mechanism (such as exposure timestamp verification, fluorescence minimum value protection, and unmixing matrix condition number monitoring). When data quality or calibration conditions are not met, the device will decisively intercept and prompt for retesting, eliminating the problem of "false negatives" or "false positives" often output by ordinary rapid testing equipment.
[0022] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0024] Figure 1 This is a flowchart of the portable pesticide detection method based on dual fluorescent hydrogels of the present invention; Figure 2 This is a flowchart of the data processing and abnormal circuit breaking algorithm in the portable pesticide detection method based on dual fluorescent hydrogel of the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention. The following embodiments are used to illustrate this invention but cannot be used to limit the scope of this invention.
[0026] like Figure 1 The diagram illustrates the flowchart of the portable pesticide detection method based on dual-fluorescent hydrogels of the present invention.
[0027] like Figure 2 The diagram shows a flowchart of the data processing and abnormal circuit breaking algorithm in the portable pesticide detection method based on dual fluorescent hydrogels of the present invention.
[0028] The device includes a dual-fluorescent hydrogel sensor, a modulated excitation light source, a color camera, a synchronization control module, a fluorescence response extraction module, a quasi-orthogonal color space module, a chromatic crosstalk demixing module, a ratio image generation module, a detection area statistics module, a concentration estimation module, and an anomaly handling module.
[0029] The dual-fluorescent hydrogel sensor contains a target-responsive fluorescent dye and a reference fluorescent dye. The target-responsive dye exhibits fluorescence enhancement, weakening, or peak position change in response to the target pesticide or its reaction products, while the reference fluorescent dye remains relatively stable under the same detection conditions. Both dyes are immobilized within a hydrogel matrix, which can be selected from one or more of polyacrylamide, sodium alginate, gelatin, or polyvinyl alcohol. The sensor is typically disc-shaped or square, with a thickness of 1–5 mm and a detection area diameter of 5–15 mm. The outer surface of the sensor can be encapsulated between two transparent films (such as polyethylene terephthalate (PET) film or polymethyl methacrylate (PMMA) film) to protect the hydrogel and facilitate handling. A blank reference area or boundary marking area can be incorporated into the sensor to aid in detection area identification and ambient light quality checks.
[0030] The synchronization control module controls the excitation light source to modulate at a preset frequency and records the camera's exposure timestamp. The wavelength range of the excitation light source is determined based on the excitation spectrum of the selected fluorescent dye; typically, LED light sources of 405nm, 450nm, 488nm, or 532nm can be selected. In-phase images are acquired when the excitation light source is lit, and in-phase images are acquired when the excitation light source is off or in a low-excitation state; the exposure parameters of the in-phase and in-phase images remain consistent. If the timestamps do not match, the exposure is saturated, or the ambient light abruptly exceeds a threshold between adjacent frames, that frame group is not included in the concentration estimation.
[0031] The fluorescence response extraction module calculates the pure fluorescence response image according to equation (1): (1) in, This is the pure fluorescence response pixel vector after stroboscopic demodulation (containing R, G, and B channel values); To modulate the in-phase image pixel vector acquired when the excitation light source is lit; This is used to modulate the inverted image pixel vector acquired when the excitation light source is extinguished.
[0032] The input to equation (1) is adjacent in-phase and out-of-phase images within the same detection period, and the output is a pure fluorescence response image, which is then entered into the quasi-orthogonal color space module. This difference is used to reduce the influence of ambient light DC background; if the ambient light changes of adjacent frames do not meet the approximate stability condition, the anomaly handling module discards the frame group or prompts for re-acquisition.
[0033] The quasi-orthogonal color space module maps the pure fluorescence response color vector to the chromaticity plane according to equation (2): (2) in, It is a chromaticity plane coordinate vector or a quasi-orthogonal transformation input vector (two-dimensional vector); The color conversion matrix (a 3×2 matrix, obtained by fitting camera spectral sensitivity calibration data or standard color chart with narrowband light source calibration data); This is the pure fluorescence response pixel vector after stroboscopic demodulation (containing R, G, and B channel values); The color conversion matrix in equation (2) is derived from camera spectral sensitivity calibration data or standard color chart and narrowband light source calibration data. This camera color conversion matrix is calibrated based on the camera model, lens, diffuser, and excitation light source configuration. The value range of the matrix elements is obtained by fitting the aforementioned calibration data and is used within normalized chromaticity coordinates. Recalibration is required when the camera model, lens, diffuser, or excitation light source changes; if the calibration residual exceeds a threshold, the matrix is not used for density output.
[0034] The quasi-orthogonal color space module establishes the color temperature direction and orthogonal direction based on equation (3): (3) in, The component aligned with the direction of ambient light color temperature change; The color temperature insensitive fluorescence component is orthogonal to the direction of color temperature change; This is either a chromaticity plane coordinate vector or a quasi-orthogonal transformation input vector. This is the vector representing the direction of change in ambient light color temperature.
[0035] The formula uses a rotation transformation matrix. Rotate at a specific angle This angle It is based on the pre-calibrated ambient light color temperature change direction vector It was determined that.
[0036] After rotation transformation, the original chromaticity plane is decoupled into two mutually orthogonal two-dimensional coordinate axis components: Component: Fully aligned with the direction of ambient light color temperature change, used for quality inspection and color temperature disturbance assessment.
[0037] Component: Orthogonal to the direction of color temperature change, it is a fluorescent component that is insensitive to changes in ambient light color temperature. It will be passed to the next step for separating the actual fluorescent dye signal.
[0038] The direction of color temperature change in equation (3) is obtained by principal component analysis or linear fitting of multiple blank hydrogel or reference region images under known color temperature illumination conditions. The component aligned with the direction of color temperature change after rotation is used for quality inspection, and the component orthogonal to it is used as the color temperature insensitive fluorescence component and input into the chromaticity crosstalk demixing module. If the color temperature direction fitting is unstable or the orthogonal residual exceeds the limit, recalibration is prompted.
[0039] The chromatic crosstalk demixing module separates the pure signal intensities of the target response dye and the reference dye according to equation (4): (4) in, The pure signal intensity of the target response dye; The pure signal intensity of the reference dye; The color temperature insensitive three-dimensional fluorescence feature vector is obtained by mapping and reconstructing the color temperature insensitive fluorescence component orthogonal to the direction of color temperature change after stripping the ambient light color temperature alignment component by the quasi-orthogonal color space module. It represents the equivalent response of pure fluorescence in the red, green and blue channels after removing ambient light interference. This refers to the color temperature insensitive fluorescence component that is orthogonal to the direction of color temperature change.
[0040] Here is the chroma crosstalk demixing matrix, with dimension 1. The matrix is used to perform dimensionality reduction mapping on the three-dimensional fluorescence feature vector through the chromaticity crosstalk demixing matrix, thereby achieving linear decoupling of the luminescence intensity of the two dyes.
[0041] Because the spectra of the target response fluorescent dye and the reference fluorescent dye overlap (i.e., crosstalk) in the camera's color channels, the channel readings of the color camera cannot be used directly.
[0042] Here, the chromatic crosstalk unmixing matrix is pre-fitted from single-dye calibrated samples (samples containing only one dye) using the least squares method or pseudo-inverse operation. The color temperature-insensitive fluorescence component extracted in the previous step (here in the form of channel components) The matrix multiplication process (represented by the matrix multiplication) performs a linear demixing operation. This matrix multiplication step allows for the clear separation of the mixed color signals, thus accurately obtaining the pure signal intensities corresponding to each of the two dyes.
[0043] The chromatic crosstalk unmixing matrix in equation (4) is obtained from the single-dye calibration samples: calibration samples containing only the target response fluorescent dye and only the reference fluorescent dye are prepared respectively. The response vectors of the target response dye and the reference dye are acquired on the same portable image acquisition device, and the unmixing matrix is obtained by least squares method or pseudo-inverse operation. The value range of the matrix elements is obtained by fitting the single-dye calibration samples. The matrix is updated when the dye batch, hydrogel batch, camera or light source changes; if the matrix condition number is too large, the device does not output the confirmatory concentration value.
[0044] The ratio image generation module calculates the pixel-level pure signal ratio according to equation (5): (5) in, This represents the pure signal ratio at the pixel level. The pure signal intensity of the target response dye; The pure signal intensity of the reference dye.
[0045] To ensure a small margin in the denominator (such as twice the camera noise level), this is used to avoid unstable ratios when the reference signal is close to zero.
[0046] If the reference pure signal is below the minimum threshold or the target response pure signal is below the noise threshold, the device will mark the corresponding pixel as low confidence and exclude it from the detection area statistics.
[0047] The detection area statistics module obtains the detection area ratio statistics based on equation (6): (6) in, This is a statistical measure of the ratio of the hydrogel detection area. This represents the pixel-level pure signal ratio.
[0048] This is a masked region mean operator (function); it's a composite spatial statistical function: ROI (Region of Interest) represents the "region of interest" or "detection region". The operator first uses prior image algorithms (such as boundary marker recognition, brightness thresholding, morphological constraints, etc.) to define an effective computational boundary. `mean_` represents calculating the arithmetic mean. The operator calculates the mean for all valid, high-confidence pixels within the ROI boundary. The values are summed and divided by the total number of valid pixels to obtain the average level of the region.
[0049] The input to equation (6) is the pixel-level pure signal ratio within the detection region of the dual-fluorescent hydrogel, and the output is the input features of the concentration estimation model. The detection region can be determined by hydrogel boundary markers, brightness thresholds, and morphological constraints; that is, the detection region can be based on in-phase images. The brightness threshold and morphological constraints are determined, or they are determined by the hydrogel boundary markers; If the detection area is insufficient, the boundary is occluded, or the proportion of outlier pixels is too high, a retest will be prompted.
[0050] When using a calibration regression model, the concentration estimation module outputs the target pesticide concentration according to equation (7): (7) in, The target pesticide concentration is the predicted value; To calibrate the regression coefficients; This is a statistical measure of the ratio of the hydrogel detection area. To calibrate the highest order of the regression polynomial and to prevent the model from overfitting in small sample calibration, it is usually taken as a positive integer and the default order is no more than the third.
[0051] m is the summation index variable. It represents the order of the polynomial currently being calculated, increasing from 0 to the highest order q.
[0052] The concentration calibration regression coefficients are obtained by fitting paired samples consisting of standard instrument labels and portable image processing results. Cross-validation is used to select the regression order and coefficients, and the value range is determined by the concentration range of the calibrated samples and the regression order. When using a convolutional neural network model, the input is a ratio image of the detection area, and the labels are also derived from the concentration of paired samples measured by the standard instrument. If the input to be tested exceeds the calibration range, the concentration estimation module outputs an out-of-range warning or a concentration range, without outputting a confirmatory value.
[0053] In an alternative implementation with non-uniform frame intervals, the fluorescence response extraction module calculates the weighted differential response according to equation (8): (8) in, This is the weighted difference of the pure fluorescence response pixel vector; Differential weights for preceding inverted frames; The differential weights for subsequent inverted frames; satisfying It is calculated by normalizing the inter-frame time interval.
[0054] To modulate the in-phase image pixel vector acquired when the excitation light source is lit; The pixel vector of the preceding inverted image; This is the pixel vector of the inverted image in the subsequent sequence. That is, the pixel vector of the current inverted image .
[0055] The weighted differential weights in equation (8) include the weights of the preceding and following inverted frames, derived from the inter-frame timestamps. They are calculated based on the time interval between the preceding and following inverted frames and the in-phase frames, and obtained by normalizing the inter-frame time intervals. The values range from 0 to 1, and the sum of the two is 1. By default, each is 0.5 when the frame intervals are uniform. Each group of non-uniformly spaced frames is updated according to the timestamp. When the timestamp is missing, the preceding and following inverted frames are incomplete, or the synchronization jitter exceeds the threshold, the adjacent frame differential in equation (1) is returned or a re-acquisition is prompted.
[0056] During device implementation, the synchronous control module outputs trigger signals to the excitation light source and camera; the fluorescence response extraction module outputs a pure fluorescence response image; the quasi-orthogonal color space module outputs color temperature-insensitive fluorescence components and performs reconstruction; the chromaticity crosstalk demixing module outputs two pure signal intensities; the ratio image generation module outputs a pure signal ratio image; the concentration estimation module outputs the concentration or concentration range; and the anomaly handling module outputs low confidence prompts, out-of-bounds prompts, or retest prompts.
[0057] The device will stop outputting confirmatory concentration values and prompt for recalibration or retesting under any of the following circumstances: Frame synchronization error (timestamp mismatch, exposure saturation, sudden change in ambient light); Detection of the detection area failed (the area is too small or the boundary is occluded). The reference fluorescence signal is below the baseline threshold; The condition number of the chroma crosstalk demixing matrix exceeds the threshold. The variance or absolute value of the color temperature alignment component exceeds the preset color temperature perturbation threshold. The input is outside the calibration range.
[0058] The specific scenarios in which this method can be applied are illustrated with examples below.
[0059] In field applications involving apples, leafy vegetables, or water samples, images are acquired and processed following the steps described above after the sensor comes into contact with the sample. Before use on different matrices, matrix-matched calibration samples and standard instrument labels should be established.
[0060] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A portable pesticide detection method based on dual-fluorescent hydrogels, characterized in that the steps include... include: The modulation excitation light source is controlled to alternately light up and turn off at a preset frequency, and a color camera is used to capture in-phase and out-of-phase images respectively when the modulation excitation light source is lit and turned off; wherein the exposure parameters of the in-phase image and the out-of-phase image are kept consistent; Perform difference calculations on the in-phase image and the out-of-phase image to extract the pure fluorescence response image; The pure fluorescence response image is mapped to the chromaticity plane to obtain the chromaticity plane coordinate vector; based on the pre-acquired direction of ambient light color temperature change, the chromaticity plane coordinate vector is orthogonally decoupled to output a color temperature insensitive fluorescence component orthogonal to the direction of ambient light color temperature change. Obtain a pre-established chromatic crosstalk demixing matrix; use the chromatic crosstalk demixing matrix to perform calculations on the color temperature insensitive fluorescence component to separate the pure signal intensity of the target response dye and the pure signal intensity of the reference dye; A pixel-level pure signal ratio is generated based on the pure signal intensity of the target response dye and the pure signal intensity of the reference dye. Obtain the detection area on the dual-fluorescent hydrogel sensor; perform statistical calculations on the pixel-level pure signal ratio within the detection area to obtain a ratio statistic. The ratio statistic is input into a preset concentration estimation model for concentration mapping to obtain and output the target pesticide concentration; The step of mapping the pure fluorescence response image to the chromaticity plane to obtain the chromaticity plane coordinate vector specifically includes: Obtain a pre-calibrated color conversion matrix; the color conversion matrix is obtained by fitting camera spectral sensitivity calibration data or standard color chart with narrowband light source calibration data. The color vector of the pure fluorescence response image is mapped to the chromaticity plane coordinate vector; the chromaticity plane coordinate vector is equal to the product of the color transformation matrix and the color vector of the pure fluorescence response image; in, This is either a chromaticity plane coordinate vector or a quasi-orthogonal transformation input vector. This is a color transformation matrix; This is the pure fluorescent response pixel vector after flicker demodulation; The step of orthogonally decoupling the chromaticity plane coordinate vector based on the pre-acquired direction of ambient light color temperature change, and outputting a color temperature-insensitive fluorescence component orthogonal to the direction of ambient light color temperature change, specifically includes: Obtain the vector of direction of ambient light color temperature change; The rotation angle is determined based on the ambient light color temperature change direction vector, and the chromaticity plane coordinate vector is decoupled by rotation transformation. The transpose of the component aligned with the ambient light color temperature change direction and the color temperature insensitive fluorescence component orthogonal to the color temperature change direction is equal to the product of the rotation transformation matrix constructed based on the rotation angle and the chromaticity plane coordinate vector. in, The component aligned with the direction of ambient light color temperature change; The color temperature insensitive fluorescence component is orthogonal to the direction of color temperature change; This is either a chromaticity plane coordinate vector or a quasi-orthogonal transformation input vector. This is the vector representing the direction of change in ambient light color temperature. Q(θ) is a rotation transformation matrix with parameter θ, where θ is the direction vector of ambient light color temperature change. Sure; The methods for obtaining the chroma crosstalk demixing matrix include: The response vectors of the first calibration sample containing only the target response dye and the response vectors of the second calibration sample containing only the reference dye were collected respectively. The collected response vector is fitted and calculated using the least squares method or pseudo-inverse operation to obtain the chroma crosstalk demixing matrix.
2. The portable pesticide detection method based on dual-fluorescent hydrogel according to claim 1, characterized in that, While controlling the modulation excitation light source to alternately light up and turn off at a preset frequency, the exposure timestamp of the color camera is recorded; If the exposure timestamps of the in-phase image and the out-of-phase image acquired within the same detection period do not match, the exposure is saturated, or the change in ambient light between adjacent frames exceeds a preset threshold, then the current frame group is discarded. The dual-fluorescent hydrogel sensor contains the reference dye in a stable luminescent state and the target response dye that changes luminescence under the action of the target pesticide, and both dyes are fixed in the hydrogel matrix. The matrix material of the hydrogel matrix is selected from one or more of polyacrylamide, sodium alginate, gelatin or polyvinyl alcohol.
3. The portable pesticide detection method based on dual-fluorescent hydrogel according to claim 1, characterized in that, The step of performing difference calculations on the in-phase image and the out-of-phase image to extract the pure fluorescence response image specifically includes: When the frame interval between adjacent frames is uniform and the change in ambient light meets the stability condition, calculate the pure fluorescence response pixel vector after flicker demodulation; the pure fluorescence response pixel vector is equal to the difference between the in-phase image pixel vector and the out-of-phase image pixel vector. in, This is the pure fluorescence response pixel vector after flicker demodulation, containing R, G, and B channel values; To modulate the in-phase image pixel vector acquired when the excitation light source is lit; To modulate the inverted image pixel vector acquired when the excitation light source is extinguished; When the frame intervals of the in-phase image and the out-of-phase image are not uniform, a weighted differential pure fluorescence response pixel vector is calculated; the weighted differential pure fluorescence response pixel vector is equal to the product of the differential weight of the preceding out-of-phase frame and the first difference, plus the product of the differential weight of the following out-of-phase frame and the second difference; wherein the first difference is the in-phase image pixel vector minus the preceding out-of-phase image pixel vector, and the second difference is the in-phase image pixel vector minus the following out-of-phase image pixel vector; in, This is the weighted difference of the pure fluorescence response pixel vector; Differential weights for preceding inverted frames; Differential weights for subsequent inverted frames; satisfy It is calculated by normalizing the inter-frame time interval; To modulate the in-phase image pixel vector acquired when the excitation light source is lit; The pixel vector of the preceding inverted image; This is the pixel vector of the subsequent inverted image, which is the pixel vector of the current inverted image.
4. The portable pesticide detection method based on dual-fluorescent hydrogel according to claim 1, characterized in that, The step of generating a pixel-level pure signal ratio based on the pure signal intensity of the target response dye and the pure signal intensity of the reference dye specifically includes: The pixel-level pure signal ratio is equal to the pure signal intensity of the target response dye divided by the sum of the pure signal intensity of the reference dye and the minimum guaranteed amount in the denominator. in, This represents the pure signal ratio at the pixel level. The pure signal intensity of the target response dye; The pure signal intensity of the reference dye; To maintain a small margin in the denominator, this is used to avoid unstable ratios when the reference signal is close to zero.
5. The portable pesticide detection method based on dual-fluorescent hydrogel according to claim 1, characterized in that, The concentration estimation model is a multinomial model using calibrated regression coefficients; the step of inputting the ratio statistic into the preset concentration estimation model for concentration mapping to obtain and output the target pesticide concentration specifically includes: The predicted value of the target pesticide concentration is equal to the sum of the products of the calibration regression coefficients of each order from zero to the highest order, and the corresponding powers of the ratio statistic. in, The target pesticide concentration is the predicted value; To calibrate the regression coefficients; This is a statistical measure of the ratio of the hydrogel detection area. To calibrate the highest order of the regression polynomial; m is the summation index variable.
6. The portable pesticide detection method based on dual-fluorescent hydrogel according to claim 1, characterized in that, It also includes an exception handling step, which stops outputting the confirmatory target pesticide concentration value and outputs a prompt message when any of the following situations occur: The area of the detection region on the dual fluorescent hydrogel sensor is smaller than a preset area threshold or the boundary is obscured. Based on the component aligned with the direction of ambient light color temperature change, it was determined that the ambient light color temperature disturbance exceeded a preset threshold. The pure signal intensity of the reference dye is lower than a preset minimum threshold. The condition number of the chroma crosstalk demixing matrix is greater than a preset condition number threshold. The ratio statistic exceeds the preset calibration range.
7. A portable pesticide detection device based on dual-fluorescent hydrogel, used to perform the portable pesticide detection method based on dual-fluorescent hydrogel as described in any one of claims 1-6, characterized in that, include: The synchronization control module is used to control the modulation excitation light source to alternately light up and turn off at a preset frequency, and to control the color camera to acquire in-phase and out-of-phase images respectively when the modulation excitation light source is lit and turned off; The fluorescence response extraction module is used to perform difference calculations on the in-phase image and the out-of-phase image, extract and output a pure fluorescence response image; The quasi-orthogonal color space module is used to map the pure fluorescence response image to the chromaticity plane to obtain the chromaticity plane coordinate vector, and to orthogonally decouple the chromaticity plane coordinate vector according to the pre-acquired ambient light color temperature change direction, and output the color temperature insensitive fluorescence component orthogonal to the ambient light color temperature change direction; The chromatic crosstalk demixing module is used to perform calculations on the color temperature insensitive fluorescence component using a pre-established chromatic crosstalk demixing matrix, and to separate and output the pure signal intensity of the target response dye and the pure signal intensity of the reference dye. A ratio image generation module is used to calculate and output a pixel-level pure signal ratio based on the pure signal intensity of the target response dye and the pure signal intensity of the reference dye. The detection area statistics module is used to obtain the detection area of the dual fluorescent hydrogel sensor, and to perform statistical calculations on the pixel-level pure signal ratio within the detection area, and output the ratio statistics. The concentration estimation module is used to input the ratio statistics into a preset concentration estimation model for concentration mapping, and to obtain and output the target pesticide concentration.
Citation Information
Patent Citations
Method and device for detecting color reducibility of mobile phone camera and medium
CN121531118A
Rapid detection system for grain pesticide residues
CN122109081A