Ethiprole colloidal gold test strip chroma quantification method and system based on skewness compensation
By employing CIE Lab color space conversion and morphological operations, the signal truncation problem caused by microfluidic asymmetry in the quantitative analysis of colloidal gold test strips was solved, enabling accurate quantitative detection of low-concentration etoxazole residues and improving the sensitivity and accuracy of the detection system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU KUAIJIEKANG BIOTECH CO LTD
- Filing Date
- 2026-05-22
- Publication Date
- 2026-06-19
AI Technical Summary
Existing colloidal gold test strip quantitative analysis technology ignores the physical model mismatch between the asymmetry of micro-hydrodynamics and the assumption of macro-Gaussian symmetry distribution when processing low-concentration samples. This leads to signal truncation and photoelectric noise coupling, causing distortion of the linearity of the standard curve of the detection system in the low-concentration range. As a result, it cannot meet the requirements of accurate quantification of trace residues in the field of food safety.
The algorithm employs CIE Lab color space conversion to achieve illumination decoupling, utilizes morphological operations to construct a background model, and introduces asymmetric boundary recognition and skewness compensation mechanisms to recover the weak "long trail" signal truncated by traditional algorithms, thereby improving detection sensitivity and linear accuracy.
It effectively solves the problems of signal loss in low-concentration samples and interference from ambient light, improves the sensitivity and linearity accuracy of etoxazole residue detection, and achieves precise quantification of etoxazole residue.
Smart Images

Figure CN122245489A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of quantitative analysis technology for colloidal gold test strips, and more specifically, to a method and system for colorimetric quantification of etoxazole colloidal gold test strips based on skewness compensation. Background Technology
[0002] Etoxazole, a highly effective acaricide, is widely used in pest control for various crops. However, excessive residues pose a potential threat to human health. Therefore, rapid, accurate, and quantitative on-site detection of etoxazole residues in agricultural products is of great significance. Colloidal gold immunochromatography (GICA), with its advantages of low cost and ease of operation, has become the mainstream method for pesticide residue screening. With the improvement of computer vision and mobile terminal processing capabilities, image analysis of test strips using smartphones or portable readers is gradually replacing traditional subjective human interpretation, driving the transformation of detection results from qualitative to quantitative.
[0003] In existing quantitative analysis technologies for colloidal gold test strips, several methods have been developed to improve detection accuracy. Chinese Patent CN104181295B discloses an image processing method for quantitative analysis of multi-line colloidal gold test strips. This method accumulates data curves by summing the images of the test strip window area along a direction perpendicular to the liquid flow, and then uses a quadratic curve to fit the background area between the detection lines. The detection result is determined by calculating the maximum difference between the data curve and the fitted background curve, aiming to eliminate interference from uneven liquid flow and differences in dryness. Chinese Patent CN104198695B discloses a method for analyzing the color development results of colloidal gold test strips. This method identifies control lines, test lines, and background reference areas, establishes a relationship between the color development level of the test line and the concentration of the analyte, and calculates the colorimetric intensity using the colorimetric grayscale values of each area, thereby achieving quantitative analysis of the target substance concentration. These existing technologies, through mathematical fitting and regional grayscale calculation, have to some extent solved the problem of the inability to quantify traditional qualitative interpretations.
[0004] However, existing image analysis methods often overlook the physical model mismatch between the asymmetry of microscopic hydrodynamics and the assumption of macroscopic Gaussian symmetry when processing trace and low-concentration samples. In the microscopic process of colloidal gold immunochromatography, when nanoparticles flow through the antibody band with the chromatography solvent, they exhibit a significant "asymmetric dune accumulation effect" due to the combined influence of fluid resistance and antigen-antibody binding rate: the upstream water-facing side forms a steep edge due to rapid particle capture, while the downstream back water-facing side forms an extremely long chromatic tail due to inertial diffusion of the fluid. Most existing algorithms are based on the ideal "Gaussian symmetry assumption," using a fixed-width integral window or symmetric peak fitting. This processing method forcibly removes the weak signals carrying key quantitative information in the downstream tail region. For low-concentration etoxazole samples, the main chromatic integral quantities are often dispersed in this "long tail" region, which is difficult for the human eye to perceive and is easily submerged by the noise of the nitrocellulose membrane matrix, resulting in a systematic truncation of physical quantity sampling. Furthermore, under uncontrolled lighting conditions, the channel coupling characteristics of the traditional RGB color space make it difficult for algorithms to distinguish between ambient light fluctuations and subtle chemical color development, further exacerbating the difficulty of signal extraction. This signal truncation and photoelectric noise coupling caused by physical model mismatch directly distorts the linearity of the standard curve of the detection system in the low concentration range, leading to frequent false negatives and missed detections in on-site testing, failing to meet the stringent requirements for accurate quantification of trace residues in the food safety field. Summary of the Invention
[0005] To overcome the aforementioned deficiencies of existing technologies, this invention provides a colorimetric quantification method and system for etoxazole colloidal gold test strips based on skewness compensation. It achieves illumination decoupling through CIE Lab color space conversion, utilizes morphological operations to construct a background model to eliminate matrix noise, and introduces a hydrodynamic-based asymmetric boundary recognition and skewness compensation mechanism. This invention can physically recover the weak "long tail" signal truncated by traditional algorithms, effectively solving the problems of signal loss in low-concentration samples and ambient light interference, and improving the sensitivity and linear accuracy of etoxazole residue detection.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A skewness-compensated method for colorimetric determination of etoxazole colloidal gold test strips includes:
[0008] Obtain the original ROI image of the etoxazole colloidal gold test strip to be tested, convert the original ROI image to the CIE Lab color space to generate a perceptual uniform chromaticity data set, and extract the illumination-invariant a component data matrix from the perceptual uniform chromaticity data set.
[0009] Construct morphological structural elements, perform morphological opening operations on the a-component data matrix using morphological structural elements to obtain the illumination trend background surface, and obtain the pure chromaticity response surface based on the illumination trend background surface and the a-component data matrix.
[0010] A longitudinal chromaticity distribution curve is generated based on the pure chromaticity response surface. The fluid hindrance peak point is identified on the longitudinal chromaticity distribution curve and the asymmetric integration boundary is determined. The longitudinal chromaticity distribution curve is numerically integrated within the asymmetric integration boundary and skewness compensation is performed to obtain the final etoxazole concentration characteristic value.
[0011] The method for obtaining the original ROI image of the etoxazole colloidal gold test strip to be tested includes:
[0012] The original RGB image of the etoxazole colloidal gold test strip to be tested was acquired. The effective region containing the test line and control line was located and cropped in the original RGB image to obtain the original ROI image.
[0013] The method for obtaining the pure chromaticity response surface includes:
[0014] The background surface of the illumination trend is fitted to obtain the estimated background surface; the pure color response surface is obtained by subtracting the estimated background surface from the a-component data matrix.
[0015] The method for generating a longitudinal chromaticity distribution curve based on a pure chromaticity response surface includes:
[0016] The pure chromaticity response surface is divided into a detection line analysis section and a quality control line analysis section along the longitudinal direction. Within the detection line analysis section, the pure chromaticity response surface is summed column by column along the direction perpendicular to the chromatography liquid flow to generate a one-dimensional longitudinal chromaticity distribution curve.
[0017] The method for identifying the peak point of fluid hindrance is as follows:
[0018] The maximum value of the chromaticity is searched by traversing the longitudinal chromaticity distribution curve, and the maximum value is defined as the fluid retardation peak point.
[0019] The asymmetric integral boundary includes the upstream accumulation cutoff boundary and the downstream diffusion cutoff boundary;
[0020] The method for determining the upstream accumulation cutoff boundary includes:
[0021] A gradient scan is performed upstream from the peak point of fluid hindrance in the direction of chromatographic flow. When the absolute value of the first difference of N1 consecutive scan positions is lower than the preset noise reference threshold, the starting position of the scan position sequence consisting of the N1 consecutive scan positions is determined as the upstream accumulation cutoff boundary, where N1 is the number of points for continuous boundary determination.
[0022] The method for determining the downstream diffusion cutoff boundary includes:
[0023] The physical distance between the fluid stagnation peak point and the upstream accumulation cutoff boundary is calculated as the upstream accumulation characteristic length. A fluid tailing diffusion factor is introduced to construct a dynamic downstream search window. Gradient scanning is performed within the dynamic downstream search window using the same method as for determining the upstream accumulation cutoff boundary to lock the downstream diffusion cutoff boundary.
[0024] The numerical integration of the longitudinal chromaticity distribution curve within the asymmetric integration boundary refers to the numerical integration of the longitudinal chromaticity distribution curve in the region between the upstream accumulation cutoff boundary and the downstream diffusion cutoff boundary to obtain the basic chromaticity integral.
[0025] The method for performing the skewness compensation calculation includes:
[0026] Calculate the skewness value of the longitudinal chromaticity distribution curve in the region between the upstream accumulation cutoff boundary and the downstream diffusion cutoff boundary. Calculate the tailing signal compensation coefficient based on the skewness value. Multiply the tailing signal compensation coefficient by the basic chromaticity integral to obtain the final etoxazole concentration characteristic value.
[0027] The method for calculating the trailing signal compensation coefficient based on the skewness value includes:
[0028] Determine if the skewness value is greater than zero: If the skewness value is greater than zero, calculate the trailing signal compensation coefficient based on the skewness value and the preset empirical correction constant; if the skewness value is less than or equal to zero, set the trailing signal compensation coefficient to 1.
[0029] A skewness-compensated colorimetric system for etoxazole colloidal gold test strips, used to implement the aforementioned skewness-compensated colorimetric method for etoxazole colloidal gold test strips, the system comprising:
[0030] Illumination decoupling extraction module: used to acquire the original ROI image of the etoxazole colloidal gold test strip to be tested, convert the original ROI image to the CIE Lab color space to generate a perceptual uniform chromaticity data set, and extract the illumination-invariant a component data matrix from the perceptual uniform chromaticity data set;
[0031] Background noise suppression module: used to construct morphological structural elements, perform morphological opening operations on the a-component data matrix using morphological structural elements to obtain the illumination trend background surface, and obtain the pure chromaticity response surface based on the illumination trend background surface and the a-component data matrix.
[0032] Skewness compensation quantization module: Generates a longitudinal chromaticity distribution curve based on the pure chromaticity response surface, identifies the fluid hindrance peak point on the longitudinal chromaticity distribution curve and determines the asymmetric integration boundary, performs numerical integration on the longitudinal chromaticity distribution curve within the asymmetric integration boundary and performs skewness compensation calculation to obtain the final etoxazole concentration characteristic value.
[0033] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0034] This invention utilizes CIE Lab color space transformation to extract the α-component data matrix, achieving physical-level decoupling between ambient light intensity and chemical colorimetric information, eliminating nonlinear interference from light and shadow fluctuations in uncontrolled environments on the detection results. By constructing a background surface for illumination trends and obtaining a pure chromaticity response surface through morphological opening operations, it effectively suppresses low-frequency matrix noise introduced by nitrocellulose membrane surface roughness and chromatography watermarks, improving the signal-to-noise ratio of weak colorimetric signals. Crucially, based on the asymmetric integral boundary determination and skewness compensation calculation of fluid hindrance peak points, it precisely matches the asymmetric stacking and long tailing effect of colloidal gold nanoparticles during microfluidic chromatography. It incorporates the weak downstream tailing signal, systematically truncated due to physical model mismatch in traditional symmetric window algorithms, into the quantitative scope through statistical methods, thereby correcting signal loss bias in the low-concentration range and achieving accurate quantification of etoxazole residues. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present 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 only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 A flowchart of the method for colorimetric quantification of etoxazole colloidal gold test strips based on skewness compensation provided in an embodiment of the present invention;
[0037] Figure 2 This is a schematic diagram of the ROI region of the etoxazole colloidal gold test strip provided in an embodiment of the present invention;
[0038] Figure 3 This is a schematic diagram of the asymmetric stacking morphology of colloidal gold nanoparticles provided in an embodiment of the present invention;
[0039] Figure 4 This is a flowchart of skewness compensation calculation provided in an embodiment of the present invention;
[0040] Figure 5 A functional block diagram of the etoxazole colloidal gold test strip colorimetric system based on skewness compensation provided in an embodiment of the present invention. Detailed Implementation
[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0042] Example 1
[0043] Please see Figure 1 As shown, this embodiment provides a colorimetric method for etoxazole colloidal gold test strips based on skewness compensation, including:
[0044] Step S10: Obtain the original ROI image of the etoxazole colloidal gold test strip to be tested, convert the original ROI image to the CIE Lab color space to generate a perceptual uniform chromaticity data set, and extract the illumination-invariant a component data matrix from the perceptual uniform chromaticity data set.
[0045] Further, step S10 includes:
[0046] Step S11: Acquire the original RGB image of the etoxazole colloidal gold test strip to be tested, locate and crop the effective area containing the test line and control line in the original RGB image to obtain the original ROI image;
[0047] Step S12: Map each pixel in the original ROI image from the RGB color space to the CIE Lab color space using a non-linear transformation matrix to generate a perceptually uniform chromaticity data set; extract the a-component data matrix from the perceptually uniform chromaticity data set; the a-component data matrix is the illumination-invariant chromaticity data after removing illumination interference.
[0048] Specifically, step S10 uses color space conversion and component decoupling technology to physically separate the highly coupled brightness and chromaticity information in the original RGB image, obtaining a light-invariant data matrix that is only related to the color rendering degree of colloidal gold nanoparticles and is independent of external lighting conditions. The RGB color space is an additive color model designed based on the physical characteristics of display devices. Its red, green, and blue components have a high degree of numerical correlation; a change in the value of any component simultaneously reflects a change in the object's own color and fluctuations in ambient light intensity. These two types of information cannot be mathematically separated through simple linear operations. For example, when a tester photographs a test strip under strong sunlight in a field versus under indoor fluorescent lighting, although the actual color rendering degree of the colloidal gold nanoparticles on the test strip is exactly the same, the values of the RGB three channels may show significant differences. The R component in the RGB color space may increase by dozens of gray levels under strong light, and the G and B components also undergo irregular changes, leading to serious deviations in subsequent chromaticity calculations based on RGB values. The CIE Lab color space is a perceptually uniform color space defined by the International Commission on Illumination (ICI) based on the characteristics of human visual perception. Its design principle stems from the physiological fact that the human eye's perception mechanisms of luminance and chromaticity are independent. The CIE Lab color space contains three orthogonal components: the L component represents only luminance information, with values ranging from 0 (corresponding to pure black) to 100 (corresponding to pure white); the a component represents red-green hue information, with positive values corresponding to red and negative values to green; and the b component represents yellow-blue hue information, with positive values corresponding to yellow and negative values to blue. These three components are mathematically orthogonal, meaning that changes in illumination primarily cause fluctuations in the L component, while changes in the values of the a and b components mainly reflect the color properties of the material itself on the object's surface.
[0049] The raw RGB image was acquired using the camera module of the mobile terminal device. The digital image acquired by the camera module was stored in the form of a pixel matrix, with each pixel containing an eight-bit unsigned integer grayscale value for the R, G, and B channels. The region of interest was located based on the physical edge features of the test strip; see [link to relevant documentation]. Figure 2 This is a schematic diagram of the ROI region of the etoxazole colloidal gold test strip provided in the embodiments of this application. ROI (Region of Interest) refers to the region of interest. Figure 2As shown, the test strip extends along the direction of the chromatography solvent flow, with the sample pad and absorption pad located at both ends, and the detection line and control line distributed in the middle area. Specifically, the etoxazole colloidal gold test strip has a regular rectangular outline. The nitrocellulose membrane on the surface of the test strip presents a uniform milky white background, and the detection line and control line show a purplish-red banded color feature on the nitrocellulose membrane. The positioning process uses an edge detection algorithm to identify the physical boundary of the test strip. The edge detection algorithm calculates the gray-level gradient values between adjacent pixels in the image and marks pixels with gradient values exceeding a preset gradient threshold as edge points. The gradient threshold is set based on the contrast characteristics between the edge of the test strip and the background, and is generally selected as the minimum gradient value that can distinguish the edge of the test strip from the background. The edge points form closed boundary contours through connectivity analysis, and the spatial position and size range of the test strip in the image are determined based on the boundary contours. After determining the overall position of the test strip, the effective area is cropped according to the relative positional relationship of the detection line and control line on the test strip. The detection line is located at a preset fixed position in the chromatographic direction of the test strip. This preset fixed position is determined by the design specifications of the test strip, combined with… Figure 2 The direction of the chromatographic liquid flow is indicated in the diagram, with the control line located downstream of the test line. A fixed distance ratio exists between the two lines and between each line and the edge of the test strip. For example, if the ratio of the distance between the test line and the edge of the sample pad to the total length of the test strip is a fixed constant in the test strip's design specifications, then the expected position coordinates of the test line can be calculated based on the identified test strip length and edge position. A certain redundancy range is then extended near these expected position coordinates as the boundary of the region of interest, thereby constructing a... Figure 2 The ROI region, indicated by the dashed rectangle, has a redundancy range determined by the positional tolerances allowed by the manufacturing process, ensuring that the detection lines and control lines are completely contained within the cropped area. The location and cropping of the ROI reduces the processing scope of the original image from the entire image to a localized region containing only the relevant information. All subsequent calculations are performed only within the ROI. This operation eliminates interference from irrelevant image elements such as the background desktop, the inspector's fingers, and light reflections, while significantly reducing the number of pixels involved in the calculations, thus lowering the computational load and improving processing efficiency.
[0050] In step S12, the color space conversion is achieved through a nonlinear transformation matrix, and the conversion process is divided into two cascaded stages. The first stage converts the RGB color space to the CIE XYZ color space. The CIE XYZ color space is a device-independent color space defined based on the spectral response characteristics of human eye cone cells, serving as an intermediate transition space between RGB and CIE Labs. The RGB to XYZ conversion uses linear matrix multiplication. The elements of the conversion matrix depend on the color profile of the RGB image acquisition device, which describes the mapping relationship between the device's RGB values and standard chromaticity coordinates. For example, for mobile terminal devices using the sRGB standard, the RGB to XYZ conversion matrix is a fixed three-row, three-column numerical matrix. The matrix elements are defined by the sRGB standard specification, and those skilled in the art can directly consult relevant international standards to obtain the matrix values. Before performing matrix multiplication, the RGB values represented by the eight-bit unsigned integers need to be normalized to a continuous range of 0 to 1. The normalization method is to divide the original grayscale value by the maximum grayscale value. The second stage converts the CIE XYZ color space to the CIE Lab color space using a non-linear root-cubic-function conversion. The L component is calculated using the root-cubic-function of the Y component in the CIE XYZ color space, the a component is calculated using the difference between the root-cubic-functions of the X and Y components, and the b component is calculated using the difference between the root-cubic-functions of the Y and Z components. After these two stages of conversion, the RGB triplet of each pixel in the original region of interest image is converted into a Lab triplet, forming a perceptually uniform chromaticity data set containing the Lab values of all pixels.
[0051] The extraction of the a-component data matrix is based on the correspondence between the optical absorption characteristics of colloidal gold nanoparticles and the physical meaning of each component in the CIE Lab color space. The surface plasmon resonance effect of colloidal gold nanoparticles gives them a characteristic purplish-red appearance in the visible light band. In the CIE Lab color space, this purplish-red color is mainly represented by a positive response in the a-component; the stronger the red component, the larger the a-component value. While the L-component can reflect changes in image brightness, these changes are simultaneously influenced by both the color depth of the colloidal gold and the intensity of ambient light. These two influences are superimposed in the L-component and cannot be distinguished, therefore the L-component is unsuitable as a feature channel for colorimetric quantification. The b-component characterizes changes in yellow-blue tint. Nitrocellulose membranes themselves often exhibit a slightly yellowish background, and watermarks on the membrane surface caused by residual chromatography solvent may also appear slightly yellow after drying. This yellow background information is mainly reflected in the b-component, mixing with the purplish-red color signal of the target analyte. Therefore, the b-component is also unsuitable as a feature channel for colorimetric quantification. The a-component is highly sensitive to color changes along the red-green axis but less sensitive to changes in brightness and yellow-blue color. The purplish-red color development of colloidal gold nanoparticles produces a significant positive response on the a-component, while the milky white background and slightly yellow impurities of the nitrocellulose membrane show near-zero or small negative responses on the a-component, creating a clear numerical difference between the signal and the background. The operation of extracting the a-component data matrix from the perceived uniform colorimetric data set involves selecting the a-component value from the Lab triplet of each pixel, discarding the L and b components, and organizing the a-component values of all pixels into a two-dimensional matrix according to their original spatial arrangement. Mathematically, the a-component data matrix is equivalent to a single-channel grayscale image. The value of each element in the matrix is only related to the red saturation at the corresponding pixel location. Red saturation directly reflects the local enrichment degree of colloidal gold nanoparticles on the nitrocellulose membrane surface, and the enrichment degree of colloidal gold nanoparticles has a known functional relationship with the concentration of etoxazole molecules in the sample.
[0052] The a-component data matrix output in step S10 serves as the input data for the morphological operation in step S20. This a-component data matrix has eliminated large-scale brightness fluctuations caused by changes in ambient light intensity, ensuring that the morphological opening operation in step S20 accurately constructs a background surface that reflects only the microscopic morphological undulations of the nitrocellulose membrane surface, without misinterpreting light shadows as physical morphological features of the membrane surface. If the original RGB image or L-component image is directly used as the input for the morphological operation, the shadow areas generated by the light and the watermark / impurity areas on the membrane surface may exhibit similar grayscale values. The morphological opening operation cannot distinguish the essential differences between the two, and the constructed background estimation surface will simultaneously contain both light distribution information and membrane surface morphology information. Subsequent subtraction operations cannot completely eliminate light interference. The generation of the longitudinal chromaticity distribution curve in step S30 depends on the illumination invariant characteristics provided in step S10. The value of each point on the chromaticity distribution curve directly reflects the spatial distribution density of colloidal gold nanoparticles in the direction of the chromatography liquid flow. If the chromaticity value is mixed with the light intensity fluctuation component, the peak position and peak shape characteristics of the chromaticity distribution curve will be distorted. The boundary recognition algorithm based on the asymmetric hydrodynamic model in step S30 will not be able to accurately distinguish between the real particle packing boundary and the illumination shadow boundary, and the determination of the integration region will produce a systematic deviation.
[0053] Step S10 achieves physical-level decoupling of brightness and chromaticity information, separating the intertwined light intensity fluctuations and colloidal gold color development in the original image into two independent data dimensions, retaining only the chromaticity dimension related to etoxazole concentration detection. This eliminates the influence of ambient lighting conditions on the detection results, allowing operators to obtain consistent chromaticity analysis results regardless of whether the shooting conditions are backlit or directly in sunlight. The detection scenarios have expanded from controlled laboratory environments to uncontrolled open-air environments such as fields and farmers' markets, lowering the barrier to entry for the detection equipment and broadening its applicability. The contrast between the purplish-red colloidal gold color development signal and the milky white nitrocellulose membrane background is maximized in the a-component image. The weak color development signal of weakly positive samples is numerically highlighted as a significant positive shift relative to zero background. The sensitivity of signal extraction has been improved from relying on subjective human judgment to quantifiable mathematical calculations, enabling the algorithm to accurately identify critical concentration samples that are difficult to distinguish with the naked eye. The region of interest (ROI) localization operation excludes image areas outside the detection and control lines from the analysis scope. Irrelevant information such as reflections from the plastic slots at the edge of the test strip, discoloration from water absorption in the sample pad, and textures on the background table do not interfere with subsequent analysis, ensuring the accuracy and stability of the analysis results. Step S10 enables the conversion of raw images captured by the camera module of ordinary mobile terminal devices into colorimetric quantitative data with laboratory-grade detection accuracy. While maintaining operational convenience, it endows the rapid on-site detection method with professional instrument-level detection capabilities, achieving a balance between portability and accuracy.
[0054] Step S20: Construct morphological structural elements, perform morphological opening operation on the a-component data matrix using morphological structural elements to obtain the illumination trend background surface, and obtain the pure chromaticity response surface based on the illumination trend background surface and the a-component data matrix.
[0055] Further, step S20 includes:
[0056] Step S21: Construct morphological structural elements according to the preset physical width range of the detection line; the size of the morphological structural elements is greater than the maximum physical width of the detection line and less than the overall width of the original ROI image; perform morphological opening operation on the a component data matrix using the morphological structural elements to obtain the illumination trend background surface;
[0057] Step S22: Perform surface fitting on the background surface of the illumination trend to obtain the background estimation surface; subtract the background estimation surface from the a component data matrix to obtain the pure color response surface.
[0058] Specifically, step S20 separates and removes the residual membrane surface background noise in the a-component data matrix output from step S10, obtaining a pure chromaticity response surface containing only the colorimetric signal of the detection line. As the core carrier material of the colloidal gold immunochromatographic test strip, the nitrocellulose membrane is not an ideal optical plane; rather, it exhibits a micro-scale fibrous mesh structure and macro-scale surface undulations. When the chromatography liquid flows across the nitrocellulose membrane surface, it leaves irregular watermarks. After the liquid evaporates, these watermarks remain on the membrane surface as pale streaks. Furthermore, the nitrocellulose membrane itself may introduce slightly yellow impurities during the production process, which are unevenly distributed on the membrane surface. Although step S10 has eliminated the global brightness fluctuations caused by changes in ambient light intensity by extracting the a-component data matrix, the local morphological undulations and impurity distribution on the membrane surface will still manifest as low-frequency background noise in the a-component data matrix. The a-component data matrix is considered as a three-dimensional surface, where the horizontal and vertical axes correspond to the spatial positions of pixels, and the vertical axis corresponds to the magnitude of the a-component value. The colorimetric signal of the detection line appears as a local peak on the surface, while the background noise on the membrane surface appears as basal undulations. The weak positive detection line corresponding to a low concentration of etoxazole has a relatively low colorimetric signal peak. When the amplitude of the basal undulations is on the same order of magnitude as the height of the signal peak, the signal peak will be submerged by the basal undulations, causing the boundary recognition algorithm in subsequent step S30 to be unable to accurately distinguish between the signal region and the background region. The goal of step S20 is to construct a mathematical model to estimate the morphology of the basal undulations and subtract it from the original data, making the signal peak stand out from the undulating basal surface, appearing as an isolated pulse on the zero plane.
[0059] Morphological structuring elements are the core tools for performing morphological operations. A structuring element can be understood as a detector with a specific shape, which compares and performs operations with local pixel values as it slides pixel-by-pixel across the image. In step S21, when constructing the morphological structuring element, the shape is chosen to be rectangular or elliptical. Rectangular structuring elements have higher computational efficiency and are suitable for situations where the detection lines are regular stripes; elliptical structuring elements have smoother edge transitions and are suitable for situations where the detection lines have a certain curvature at the edges. The determination of the structuring element size follows two constraints: a lower bound constraint requires the structuring element size to be greater than the maximum physical width of the detection line, and an upper bound constraint requires the structuring element size to be less than the overall width of the original ROI image. The physical basis of the lower bound constraint is that morphological opening operations can eliminate local protrusions smaller than the structuring element size. If the structuring element size is smaller than the detection line width, the detection line signal cannot be completely eliminated, and the generated background estimate will contain some signal components, leading to signal loss in subsequent subtraction operations. The physical basis of the upper bound constraint is that an excessively large structuring element size will result in an overly smooth background estimate, failing to capture the details of local morphological undulations on the membrane surface, and significantly reducing the background noise suppression effect. The specific values of the structural element size between the upper and lower bounds can be optimized and determined by processing multiple images of standard test strips with known concentrations and comparing their signal-to-noise ratios. The size value that achieves a signal-to-noise ratio of 15dB or higher is selected as a preset parameter and fixed in the algorithm.
[0060] Morphological opening operations consist of erosion and dilation operations chained together, with erosion preceding dilation. The erosion operation is implemented as follows: a structuring element is placed at each pixel position in the α-component data matrix; the current pixel's value is replaced by the minimum α-component value among all pixels within the structuring element's coverage area; this process is repeated across all pixel positions to obtain the erosion result matrix. The physical effect of erosion is to weaken local protrusion features, thus suppressing peaks smaller than the structuring element. The dilation operation is implemented symmetrically with erosion: a structuring element is placed at each pixel position in the erosion result matrix; the current pixel's value is replaced by the maximum value among all pixels within the structuring element's coverage area; this process is repeated across all pixel positions to obtain the dilation result matrix. The physical effect of dilation is to restore the large-scale morphological features suppressed by erosion, thus preserving background undulations larger than the structuring element. The cascaded execution of corrosion and dilation gives the opening operation selective filtering properties: local protrusions smaller than the structural element, after being suppressed in the corrosion stage, cannot be recovered in the dilation stage because their spatial range is insufficient to reach the maximum value selection mechanism, and are therefore permanently eliminated. Background undulations larger than the structural element, although suppressed overall in the corrosion stage, have a sufficiently large spatial range to be recovered to near their original height in the dilation stage through the maximum value selection mechanism. The output of the opening operation is the illumination trend background surface, which retains the low-frequency morphological undulation information of the film surface, while the high-frequency color development signal of the detection lines has been eliminated.
[0061] Mathematically, the illumination trend background surface is still a discrete pixel matrix. The matrix elements may exhibit abrupt changes in spatial position due to morphological operations. These abrupt changes manifest as sudden changes in values between adjacent pixels, which contradicts the continuous and smooth characteristics of illumination distribution and film surface morphology in the real physical world. If the illumination trend background surface is directly used for subsequent subtraction operations, artifacts will be generated at the abrupt changes in the pure chromaticity response surface. These artifacts may be misjudged as signal boundaries during the gradient scan in subsequent step S30. Step S22 performs surface fitting on the illumination trend background surface using a polynomial surface fitting method. The pixel position coordinates of the illumination trend background surface are used as independent variables, and the corresponding pixel values are used as dependent variables. The polynomial coefficients are solved using the least squares method to minimize the sum of squared residuals between the fitted surface and the original discrete data points. The choice of polynomial order needs to balance fitting accuracy and the risk of overfitting: too low an order will prevent the fitted surface from accurately describing the details of the background morphology, while too high an order may include local noise in the fit, introducing new artifacts. For example, a second-order polynomial surface can describe the overall tilt trend and single-curvature bending of the background, suitable for cases with relatively simple membrane surface morphology; a third-order polynomial surface can describe the local undulations of the background, suitable for complex cases with multiple watermark regions on the membrane surface. The specific choice of polynomial order can be determined through cross-validation: the pixels of the background surface under illumination trends are randomly divided into training and validation sets. Polynomial surfaces of different orders are fitted on the training set, and the fitting error is calculated on the validation set. The order that minimizes the error on the validation set is selected as the preset parameter. The output of the surface fitting is a background estimation surface, which is spatially continuous and smooth, eliminating the abrupt changes introduced by morphological operations and more accurately reflecting the true distribution of background noise on the membrane surface.
[0062] The pure chromaticity response surface is obtained through pixel-level subtraction: the value of each pixel in the a-component data matrix is subtracted from the value at the corresponding position in the background estimation surface, and the difference constitutes the pixel value of the pure chromaticity response surface. The subtraction operation removes the background component from the original data, retaining only the signal component. In the a-component data matrix, the pixel values in the detection line color region are composed of two superimposed parts: one part is the signal response generated by the color development of colloidal gold nanoparticles, and the other part is the background response generated by the background morphology of the film surface; the pixel values in the non-detection line region only contain the background response. The background estimation surface contains only the estimated value of the background response in both the detection line and non-detection line regions. After the subtraction operation, the pixel values in the detection line region become pure signal responses, and the background component is canceled out; the pixel values in the non-detection line region become near-zero residual values, containing only the background estimation error. The substrate of the pure chromaticity response surface is flattened to near the zero plane, and the weak positive signal peaks that were originally hidden in the background undulations become isolated protrusions on the zero plane, significantly enhancing the contrast between the signal and the background.
[0063] Step S20 achieves physical separation of the signal from the background. Without step S20, the technical solution will face multiple negative impacts: the colorimetric signal intensity of the detection line corresponding to low-concentration etoxazole samples is weak, and the height of the signal peak is on the same order of magnitude as the amplitude of background fluctuations. If background fluctuations are not suppressed, the signal peak will be hidden in the background. The peak search algorithm in step S30 may misjudge local high points of background fluctuations as signal peaks, leading to incorrect boundary identification and integration calculations, resulting in false negatives. Even if the signal peak is correctly identified, the base shift introduced by background fluctuations will cause the integration calculation to include additional background components. The calculated colorimetric integral will be systematically higher than the true signal integral, resulting in a positive bias in the concentration quantification result and impairing the linearity of the standard curve in the low-concentration range. Simultaneously, the surface morphology of the nitrocellulose membrane varies between different batches of test strips, and the degree of watermark residue on the test strip membrane surface also differs under different storage conditions. If background noise is not suppressed, these batch-to-batch and individual differences will directly transmit to the detection results, leading to a decrease in the reproducibility of the detection method. The introduction of step S20 fundamentally eliminates the above-mentioned problems, enabling subsequent step S30 to perform boundary identification and integral calculation in a clean, stable, and standardized signal environment.
[0064] Step S20 constructs a mathematical estimation model of the membrane surface background morphology and uses subtraction to remove background components from the original data. Based on this, weak positive signals stand out from the undulating background, and the signal-to-background contrast ratio increases from a low level close to 1:1 to a high contrast state where the signal is significantly higher than the background. Faint detection lines, difficult to distinguish with the naked eye, are transformed into significant pulses on the zero plane after mathematical processing. The signal detection sensitivity also jumps from the physiological limit of human visual judgment to the mathematical precision limit of digital image processing algorithms. Morphological opening operations possess selective filtering characteristics, which can completely preserve the local protrusion features of the detection line color signal while accurately capturing the large-scale background features formed by the undulations of the membrane surface morphology. This allows the seemingly contradictory needs of signal protection and background estimation to be balanced within the same computational framework. The entire process requires no pre-labeling or manual selection of the signal area, possesses fully automated operation capabilities, and exhibits good adaptability to different batches of test strips. The smoothing process of surface fitting eliminates discrete step artifacts introduced by morphological operations, ensuring the spatial continuity of the background estimation surface. This prevents false edges from appearing on the pure chromaticity response surface obtained after subtraction, allowing the gradient scanning algorithm in subsequent step S30 to accurately identify the true signal boundaries without artifact interference. Step S20, relying on the synergistic combination of morphological operations and surface fitting, achieves accurate modeling and effective suppression of background noise on the nitrocellulose membrane surface, purifying the chemical colorimetric signal from the complex optical background. This processing improves the signal quality standard of test strip images captured by ordinary mobile terminal devices, laying a clean and reliable data foundation for the asymmetric boundary recognition and skewness compensation integration in subsequent step S30.
[0065] Step S30: Generate a longitudinal chromaticity distribution curve based on the pure chromaticity response surface; identify the fluid hindrance peak point on the longitudinal chromaticity distribution curve and determine the asymmetric integration boundary; perform numerical integration on the longitudinal chromaticity distribution curve within the asymmetric integration boundary and perform skewness compensation calculation to obtain the final etoxazole concentration characteristic value; the asymmetric integration boundary includes the upstream accumulation cutoff boundary and the downstream diffusion cutoff boundary.
[0066] Further, step S30 includes:
[0067] Step S31: Divide the pure chromaticity response surface longitudinally into a detection line analysis section and a quality control line analysis section. Within the detection line analysis section, sum the pure chromaticity response surface pixel by pixel along the direction perpendicular to the chromatography liquid flow to generate a one-dimensional longitudinal chromaticity distribution curve. Traverse the longitudinal chromaticity distribution curve to search for the maximum value of the chromaticity value, and define the maximum value point as the fluid hindrance peak point.
[0068] Specifically, step S30 converts the pure colorimetric response surface output in step S20 into quantitative characteristic values that accurately reflect the etoxazole concentration. In the pure colorimetric response surface, the detection line and the control line are arranged sequentially along the direction of the chromatography solvent flow, with a blank interval region between the two lines whose width is not less than the width of either line. This method performs independent colorimetric quantification processes for the detection line and the control line: First, based on the preset relative positional relationship between the detection line and the control line in the test strip design specifications, and the lowest grayscale characteristic of the blank interval region between the two lines, the pure colorimetric response surface is divided longitudinally into a detection line analysis section and a control line analysis section. The specific division method is as follows: The pure colorimetric response surface is summed pixel-by-pixel along the direction of the chromatography flow to obtain a preliminary global longitudinal colorimetric distribution curve. On this curve, the detection line and control line appear as two independent peak regions, with a valley region between them where the colorimetric value is close to zero. The minimum colorimetric value point in this valley region is searched between the two peak regions, and this minimum point is used as the boundary between the detection line and control line analysis sections. Along the direction of the chromatography flow, the region from the starting edge of the pure colorimetric response surface to the boundary point is defined as the detection line analysis section, and the region from the boundary point to the ending edge of the pure colorimetric response surface is defined as the control line analysis section. Subsequently, peak identification, boundary determination, and integration calculation are performed within each analysis section to obtain the colorimetric characteristic values of the detection line and the control line. The colorimetric characteristic value of the detection line is used for the quantitative calculation of etoxazole concentration, and the colorimetric characteristic value of the control line is used to determine whether the test strip chromatography process was completed normally and whether the test result is valid. The following steps illustrate the process using the test line analysis section as an example; the processing flow for the control line analysis section is the same. The working principle of the colloidal gold immunochromatographic test strip relies on the directional migration of colloidal gold nanoparticles carried by the chromatographic liquid flow through the capillary network of a nitrocellulose membrane. When the liquid flows through the test line region, the pre-fixed specific antibodies on the test line undergo an immunobinding reaction with the antigens coupled to the surface of the colloidal gold nanoparticles, causing some nanoparticles to be captured and retained at the test line location, forming a visible purple-red band. At the microscopic scale, this capture process does not occur uniformly across the entire width of the test line, but exhibits significant spatial asymmetry. See [link to documentation]. Figure 3 This is a schematic diagram of the asymmetric stacking morphology of colloidal gold nanoparticles provided in the embodiments of this application. Figure 3 As shown, the horizontal axis indicates the direction of the chromatography flow, and the height of the curve characterizes the chromatographic response intensity of particle packing. Antibodies in the upstream direction of the flow first come into contact with the flow front carrying nanoparticles, where the nanoparticles are rapidly and massively captured, forming a steep packing edge. This corresponds to... Figure 3In the region marked "steep upstream," the curve rises rapidly and reaches its peak. As the liquid flow continues downstream, the number of nanoparticles available for capture gradually decreases. Simultaneously, already captured particles may undergo slight displacement due to the scouring effect of subsequent liquid flow, resulting in a gradually decaying, long-tailed particle distribution downstream. Figure 3 The downstream tailing pattern, as shown in the diagram, indicates that the curve gradually declines from its peak along the direction of the chromatography flow, as indicated by the arrow. This asymmetric spatial distribution of particles directly reflects the asymmetric peak shape of the chromatographic distribution curve, and its morphological characteristics can be compared to sand dunes formed by wind: steep windward slopes and gently extending leeward slopes. Existing technologies widely employ Gaussian fitting algorithms or symmetric window integration methods, all of which assume that the chromatographic distribution follows a symmetric distribution law. This assumption fundamentally deviates from the physical mechanism of immunochromatography. Forcibly applying a symmetric model to an asymmetric distribution leads to the truncation or omission of effective signals in the downstream tailing region, resulting in a systematically lower calculated chromatographic integral value than the true value. This causes a negative bias in the concentration quantification results, which is particularly severe for low-concentration samples, and significantly impairs the linearity of the standard curve in the low-concentration range.
[0069] The vertical chromaticity distribution curve is generated by performing a dimension-reduction projection operation on the pure chromaticity response surface. The pure chromaticity response surface is a two-dimensional pixel matrix. The rows of the matrix correspond to the horizontal positions perpendicular to the chromatography flow, and the columns correspond to the vertical positions parallel to the chromatography flow. The values of the matrix elements correspond to the background-corrected α-component chromaticity values at each pixel position. The column-by-column pixel summation operation is as follows: for each column in the pure chromaticity response surface, the chromaticity values of all pixels in that column are arithmetically summed, and the sum is used as the ordinate of the vertical chromaticity distribution curve at that column position. After summing all column positions, a one-dimensional vertical chromaticity distribution curve is drawn using the column index as the x-axis and the corresponding sum as the y-axis. The significance of summing column by column lies in integrating the chromaticity distribution of the detection line in the horizontal direction, eliminating local chromaticity fluctuations caused by uneven antibody coating or lateral diffusion of nanoparticles, so that the curve only reflects the chromaticity change pattern along the direction of chromatography flow, and the peak shape of the vertical chromaticity distribution curve can intuitively present the asymmetric stacking morphology of nanoparticles under the action of hydrodynamics. The identification of the fluid hindrance peak point is achieved through a traversal search algorithm: first, based on the proportional relationship between the distance of the detection line and the edge of the sample pad in the test strip design specifications, combined with the test strip size information identified in step S11, the expected position interval of the detection line on the vertical chromaticity distribution curve is calculated. The setting of this expected position interval needs to exclude the area where the quality control line is located to avoid misidentification; within the expected position interval of the detection line, starting from the starting position, the chromaticity values of adjacent positions are compared point by point, and the maximum chromaticity value encountered in the current traversal and its corresponding position index are recorded. After the traversal is completed, the output position index is the horizontal coordinate position of the fluid hindrance peak point, denoted as Pmax. The fluid hindrance peak point physically corresponds to the position with the highest nanoparticle packing density within the detection line region, and serves as a geometric reference for constructing the asymmetric integral boundary.
[0070] Step S32: Perform gradient scanning upstream from the fluid retardation peak point in the direction of chromatographic liquid flow. When the absolute value of the first difference of N1 consecutive scanning positions is lower than the preset noise reference threshold, determine the starting position of the scanning position sequence formed by the N1 consecutive scanning positions as the upstream accumulation cutoff boundary.
[0071] The upstream accumulation cutoff boundary is determined based on a gradient scanning strategy. Starting from the fluid hindrance peak point Pmax, the system scans upstream point by point in the opposite direction of the chromatographic flow. During the scan, the change in chromatographic value between the current scan position and its adjacent positions is calculated. This change in chromatographic value is approximated using a first-order difference, which is calculated by subtracting the chromatographic value of the previously processed position from the chromatographic value of the current scan position. In other words, when scanning upstream, the chromatographic value of the current position is subtracted from the chromatographic value of its adjacent position closer to the peak point. In the asymmetric dune model, a steep upstream slope means a sharp drop in chromatographic value when scanning upstream from the peak point, resulting in a large negative value for the first-order difference. As the scan position moves further away from the peak point and approaches the physical edge of the detection line, the curve flattens and enters the background noise region, and the absolute value of the first-order difference gradually decreases. The boundary determination is based on the absolute value of the first-order difference and a preset noise baseline threshold ε. noise Comparison between: When the absolute value of the first-order difference of N1 consecutive scan positions is less than ε noise When the curve has moved out of the signal region and into the background noise region, the starting position of the scan position sequence consisting of the N1 consecutive scan positions is determined as the upstream stacking cutoff boundary, denoted as Bleft. Noise reference threshold ε noise The setting is determined based on the background noise level of the pure chromaticity response surface in the non-detection line region: select background region pixels in the pure chromaticity response surface that are clearly located outside the detection line region, and calculate the standard deviation σ of their chromaticity values. background Noise reference threshold ε noise Set as a multiple of the standard deviation; for example, ε could be taken. noise Equal to two to three times σ background The specific choice of the multiplier needs to balance the sensitivity of boundary recognition with the noise resistance. If the multiplier is too small, noise fluctuations will be misjudged as signal boundaries, while if the multiplier is too large, signal edges will be missed. The number of points N1 for continuous boundary determination is determined based on the pixel resolution and the expected signal edge width. For example, 3 to 5 consecutive pixels can be used to determine a boundary. The introduction of the continuity requirement can filter out false boundary determinations caused by local noise pulses.
[0072] Step S33: Calculate the physical distance between the fluid stagnation peak point and the upstream accumulation cutoff boundary as the upstream accumulation feature length. Introduce a fluid tailing diffusion factor to construct a dynamic downstream search window. Within the dynamic downstream search window, execute the same gradient scanning strategy as in step S32. When the absolute value of the first-order difference of N1 consecutive scan positions is lower than a preset noise reference threshold, lock that position as the downstream diffusion cutoff boundary. If no scan position that meets the conditions is detected within the dynamic downstream search window, the end of the dynamic downstream search window is taken as the downstream diffusion cutoff boundary. The range of the dynamic downstream search window is the region extending from the fluid stagnation peak point along the flow direction, multiplied by the fluid tailing diffusion factor and the upstream accumulation feature length.
[0073] The upstream accumulation feature length Dleft is defined as the pixel distance between the fluid hindrance peak point Pmax and the upstream accumulation cutoff boundary Bleft. Physically, Dleft represents the spatial span of the steep upstream slope, reflecting the spatial range within which nanoparticles are rapidly captured on the water-facing side. Since the downstream tail region is formed by diffusion, its spatial span is necessarily greater than that of the upstream accumulation region. The proportional relationship between the two is quantified by the fluid tail diffusion factor k. The fluid tail diffusion factor k must be greater than 1. The physical basis for this is that during immunochromatography, the binding reaction between antibodies and antigens requires a certain contact time. When the liquid flow front rapidly passes through the antibody band, some nanoparticles are not captured in time and migrate downstream with the liquid flow. During migration, they gradually undergo binding reactions and deposit, forming a distribution area that is more extended than the upstream accumulation. The specific range of the fluid tailing diffusion factor k is determined through statistical analysis of the color distribution curves of standards with different concentrations: Multiple standard test strip images of known concentrations are acquired, and steps S10 to S32 are executed for each image. The actual signal boundary positions of each curve are manually marked. The ratio of the distance from the downstream boundary to the peak point to the distance from the upstream boundary to the peak point is calculated. The mean and fluctuation range of each sample ratio are statistically analyzed. The upper limit of the fluctuation range is multiplied by a safety margin coefficient to obtain the value of the fluid tailing diffusion factor k. The typical range of the safety margin coefficient is 1.05 to 1.15 to ensure that the dynamic downstream search window can completely cover the tailing area of samples of various concentrations. For example, if the statistical results show that the ratio of the downstream span to the upstream span is distributed between 1.2 and 1.8, and the upper limit of the fluctuation range is 1.8, after multiplying by a safety margin coefficient of 1.1, k can be taken as 2.0 to ensure complete coverage of the tailing area. The range of the dynamic downstream search window is defined as a pixel distance of k times Dleft extending downstream from the fluid stagnation peak point Pmax along the flow direction. The endpoint of the window is denoted as Pmax plus k times Dleft. Within the dynamic downstream search window, the same gradient scanning strategy as in step S32 is executed: starting from the fluid stagnation peak point Pmax, scanning point by point downstream along the flow direction, calculating the first-order difference between adjacent positions. The first-order difference is calculated by subtracting the chromaticity value of the previously processed position (i.e., the adjacent position closer to the peak point) from the chromaticity value of the current scan position. Since the chromaticity value gradually decays in the downstream tail region, the first-order difference is usually negative. When the absolute value of the first-order difference of N1 consecutive scan positions is lower than the noise reference threshold ε, the first-order difference is calculated. noise When the signal reaches the end of the dynamic downstream search window, this position is locked as the downstream diffusion cutoff boundary, denoted as Bright. If no boundary point meeting the conditions is detected after scanning to the end of the window, it means that the trailing signal extends beyond the window boundary. In this case, the end position of the window is taken as the downstream diffusion cutoff boundary Bright. This processing method ensures the closure of the integration region and avoids the inability to perform integration operations due to the failure to identify the boundary.
[0074] Step S34, see Figure 4 The basic chromaticity integral is obtained by numerically integrating the longitudinal chromaticity distribution curve in the region between the upstream accumulation cutoff boundary and the downstream diffusion cutoff boundary.
[0075] Step S35, see below. Figure 4 The skewness value of the longitudinal chromaticity distribution curve in the region between the upstream accumulation cutoff boundary and the downstream diffusion cutoff boundary is calculated. The tail signal compensation coefficient is calculated based on the skewness value. The tail signal compensation coefficient is multiplied by the basic chromaticity integral to obtain the final etoxazole concentration characteristic value.
[0076] The method for calculating the skewness value includes: calculating the third standard moment of the longitudinal chromaticity distribution curve in the region between the upstream accumulation cutoff boundary and the downstream diffusion cutoff boundary, and using it as the skewness value;
[0077] The method for calculating the trailing signal compensation coefficient based on the skewness value includes: determining whether the skewness value is greater than zero; if the skewness value is greater than zero, calculating the trailing signal compensation coefficient based on the skewness value and the empirical correction constant; if the skewness value is less than or equal to zero, setting the trailing signal compensation coefficient to 1.
[0078] The basic chromaticity integral is calculated by performing numerical integration on the longitudinal chromaticity distribution curve within the asymmetric integration boundary. The left boundary of the integration region is the upstream accumulation cutoff boundary Bleft, the right boundary is the downstream diffusion cutoff boundary Bright, and the lower boundary of the integration is the zero baseline. The zero baseline is set based on the background correction characteristics of the pure chromaticity response surface output in step S20: after the subtraction operation in step S22, the chromaticity values in the non-detection line region have been flattened to near zero, so the zero value is used as the lower boundary of the integration to represent the background reference when there is no signal. Numerical integration uses well-known numerical integration methods in the field, such as the trapezoidal rule or Simpson's rule, to divide the integration interval into several small segments. The area enclosed by the curve and the zero baseline in each segment is calculated and accumulated. The accumulated result is the basic chromaticity integral, denoted as IODbase. The basic chromaticity integral is the total cumulative intensity of the colorimetric signal of colloidal gold nanoparticles in the detection line region, which is positively correlated with the total number of nanoparticles captured, while the number of nanoparticles captured is inversely correlated with the concentration of etoxazole molecules in the sample.
[0079] Skewness compensation is achieved by calculating the statistical skewness of the chromaticity distribution within the integration region and constructing compensation coefficients accordingly. Skewness is a statistic describing the symmetry of a probability distribution, and its calculation is based on the third standard moment of the distribution. Skewness value. The calculation formula is:
[0080]
[0081] In the formula, xi Let be the chromaticity value at the i-th sampling position of the vertical chromaticity distribution curve within the integration region [Bleft, Bright]. The chromaticity value is directly read from the vertical coordinate data of the vertical chromaticity distribution curve; x̄ is the arithmetic mean of the chromaticity values at all sampling positions within the integration region, calculated as the sum of all x̄ values within the region. i The sum of the values is divided by the total number of sampling points, n; n is the total number of sampling points within the integration region, equal to the number of pixels between the downstream diffusion cutoff boundary Bright and the upstream stacking cutoff boundary Bleft plus 1. The numerator of the formula... The average of the cubed deviations of the chromaticity values at each sampling point from the mean is calculated. The cube operation preserves the sign information of the deviation direction; positive deviations contribute positive values, while negative deviations contribute negative values. The denominator of the formula... Normalization of the second moment eliminates the influence of distribution dispersion on skewness calculation, making the skewness value a dimensionless pure shape index. The sign and value of the skewness value γ reflect the asymmetric characteristics of the chromaticity distribution: when γ is greater than 0, it represents a positively skewed distribution, indicating that the numerical distribution of chromaticity values within the integration region exhibits asymmetric characteristics, with a few locations having extremely high chromaticity values (corresponding to peak regions), while most locations have lower chromaticity values (corresponding to tail regions). This statistical characteristic corresponds to a long tail shape with slow decay in the downstream direction of the chromaticity distribution curve, corresponding to slow signal attenuation in the downstream diffusion region; when γ equals 0, it represents a symmetrical distribution, with the left and right sides of the distribution curve having the same shape; when γ is less than 0, it represents a left-skewed distribution, with a long tail on the left side of the distribution curve. In the hydrodynamic model of immunochromatography, the packing distribution of nanoparticles should exhibit a right-skewed shape. A larger γ value indicates a more severe downstream tail, which also means that the weak signals at the ends of some tails may be submerged by noise due to their low values and not fully incorporated into the integration region, resulting in a systematic underestimation of the integral.
[0082] The calculation of the tail signal compensation coefficient α is based on the linear combination relationship between the skewness value γ and the empirical correction constant β. When γ>0: α=1+β×γ; when γ≤0: α=1. The empirical correction constant β is the integral compensation ratio corresponding to a unit skewness value, and its value is determined based on the standard calibration experiment: a series of test strip images corresponding to known concentrations of etoxazole standard are collected, and the complete processing flow of steps S10 to S35 is performed on each image to record the skewness value and the basic colorimetric integral of each sample; at the same time, the theoretical complete integral of each sample is determined by manual fine annotation. The theoretical complete integral can be determined by manual boundary recognition of high-resolution images under extremely low noise conditions; the integral loss ratio of each sample is calculated as 1-IODbase / IODtrue, and the integral loss ratio is linearly regressed against the skewness value. The regression slope is the value of the empirical correction constant β. For example, if the regression analysis shows that the slope of the linear relationship between the integral loss ratio and the skewness value falls within the range of 0.05 to 0.15, then β can be taken as the median value within this range as the preset parameter. When the skewness value γ is greater than 0, the tail signal compensation coefficient α is greater than 1. The specific value of α increases linearly with the increase of γ, reflecting the physical logic that the more severe the tailing, the greater the compensation force. When the skewness value γ is less than or equal to 0, it indicates that the chromaticity distribution has no significant right-skewed characteristics or exhibits left-skewed characteristics. There is no integral loss caused by downstream tailing. The tail signal compensation coefficient α is set to 1 to indicate that no compensation is required.
[0083] The final etoxazole concentration characteristic value IOD is obtained by multiplying the tailing signal compensation coefficient α by the base chromaticity integral IODbase: IOD = α × IODbase. When the chromaticity distribution exhibits a significant right skew, α is greater than 1, making IOD greater than IODbase. The difference is the signal loss at the tailing end, which is statistically compensated for. When the chromaticity distribution does not exhibit a significant right skew, α equals 1, making IOD equal to IODbase, and the integral is not adjusted. This compensation mechanism allows the final output concentration characteristic value IOD to more accurately reflect the actual total amount of colloidal gold nanoparticles in the detection line region, rather than merely measuring the clearly identified signal portion.
[0084] The illumination invariant property provided in step S10 ensures that the peak shape of the longitudinal chromaticity distribution curve reflects only the spatial distribution law of nanoparticles and is not affected by ambient lighting conditions. If the illumination decoupling in step S10 is missing, the chromaticity distribution curve will be mixed with false peak shapes caused by illumination shadows. The peak search algorithm in step S30 may misjudge the edge of illumination shadow as a fluid hindrance peak point, and the boundary identification result will be severely distorted. The zero-plane basis property provided in step S20 ensures that the baseline of the longitudinal chromaticity distribution curve is stably close to zero. If the background noise suppression in step S20 is missing, the baseline of the chromaticity distribution curve will fluctuate, the first difference will produce a significant non-zero value in the background region, the boundary judgment condition of the gradient scan algorithm will be frequently triggered by background fluctuations, generating a large number of false boundary points, and the integration region cannot be correctly determined.
[0085] Step S30 solves the fundamental problems of signal truncation and loss of weak trailing in traditional methods. Through the vertical dimension reduction projection in step S31, the two-dimensional pure chromaticity response surface is compressed into a one-dimensional vertical chromaticity distribution curve. This mathematical operation eliminates local high-frequency noise caused by uneven antibody streaking process or lateral diffusion of colloidal gold particles at the physical level through lateral integration. This extracts the macroscopic distribution characteristics that only reflect the concentration change along the liquid flow direction, and uses this to anchor the fluid hindrance peak point. Since the determination of this peak point depends only on the relative magnitude comparison of chromaticity values, the subsequent boundary positioning is freed from dependence on absolute color intensity. Even if there are background color differences or overall color intensity fluctuations in different batches of test strips, a consistent geometric reference benchmark can be obtained. Building upon this foundation, steps S32 to S33 construct a unique "left-to-right" asymmetric boundary identification strategy: First, a gradient scanning algorithm is used to lock the upstream accumulation cutoff boundary, precisely defining the signal starting point. Then, based on the physical law of "wide peaks and long tails at high concentrations, and narrow peaks and short tails at low concentrations" in fluid dynamics, the downstream search window is dynamically derived using the upstream feature length, achieving adaptive scaling of the integral boundary with sample concentration. This mechanism overcomes the dual dilemmas of traditional fixed-width window methods: signal truncation due to excessively narrow windows when detecting high-concentration samples, and excessive background noise introduced by excessively wide windows when detecting low-concentration samples. This ensures that the effective signal region is completely covered without redundancy. Steps S34 and S35 introduce a signal recovery mechanism based on statistical skewness. Addressing the unavoidable "long tail" effect in immunochromatography, the algorithm identifies latent signals that cannot be directly truncated by physical boundaries due to their intensity being below the noise threshold. By calculating the third standard moment (skewness value) of the distribution curve, the asymmetry of the signal distribution is quantitatively assessed, and compensation coefficients are generated to correct the basic integral. Essentially, this method uses statistical inference to "extract" and "replenish" the tail-end signal submerged in background noise into the total amount. This method raises the detection sensitivity from the physical recognition limit to the mathematical inference limit, preferentially corrects the systematic negative bias caused by signal loss in the low concentration range, and restores the standard curve from nonlinear bending to a linear response at the low concentration end. Ultimately, it achieves the groundbreaking benefit of enabling ordinary mobile terminal devices to have laboratory-level micro-quantitative analysis capabilities.
[0086] Example 2
[0087] This embodiment, based on Embodiment 1, provides a colorimetric quantification system for etoxazole colloidal gold test strips with skewness compensation, such as... Figure 5 As shown, it includes:
[0088] Illumination decoupling extraction module: used to acquire the original ROI image of the etoxazole colloidal gold test strip to be tested, convert the original ROI image to the CIE Lab color space to generate a perceptual uniform chromaticity data set, and extract the illumination-invariant a component data matrix from the perceptual uniform chromaticity data set;
[0089] Background noise suppression module: used to construct morphological structural elements, perform morphological opening operations on the a-component data matrix using morphological structural elements to obtain the illumination trend background surface, and obtain the pure chromaticity response surface based on the illumination trend background surface and the a-component data matrix.
[0090] Skewness compensation quantization module: Generates a longitudinal chromaticity distribution curve based on the pure chromaticity response surface, identifies the fluid hindrance peak point on the longitudinal chromaticity distribution curve and determines the asymmetric integration boundary, performs numerical integration on the longitudinal chromaticity distribution curve within the asymmetric integration boundary and performs skewness compensation calculation to obtain the final etoxazole concentration characteristic value.
[0091] Furthermore, in the light-induced decoupling extraction module, the method for obtaining the original ROI image of the etoxazole colloidal gold test strip to be tested includes: acquiring the original RGB image of the etoxazole colloidal gold test strip to be tested, locating and cropping the effective area containing the detection line and the control line in the original RGB image to obtain the original ROI image.
[0092] Furthermore, in the background noise suppression module, the method for obtaining the pure chromaticity response surface includes: performing surface fitting on the illumination trend background surface to obtain the background estimation surface; subtracting the background estimation surface from the a-component data matrix to obtain the pure chromaticity response surface.
[0093] Furthermore, in the skewness compensation quantization module, the method for generating the longitudinal chromaticity distribution curve based on the pure chromaticity response surface includes:
[0094] The pure chromaticity response surface is divided into a detection line analysis section and a quality control line analysis section along the longitudinal direction. Within the detection line analysis section, the pure chromaticity response surface is summed column by column along the direction perpendicular to the chromatography liquid flow to generate a one-dimensional longitudinal chromaticity distribution curve.
[0095] The method for identifying the fluid hindrance peak point is as follows: traverse the longitudinal chromaticity distribution curve to search for the maximum value of the chromaticity value, and define the maximum value point as the fluid hindrance peak point.
[0096] The asymmetric integral boundary includes the upstream accumulation cutoff boundary and the downstream diffusion cutoff boundary;
[0097] The method for determining the upstream accumulation cutoff boundary includes: performing a gradient scan upstream from the fluid retardation peak point in the direction of chromatographic flow; when the absolute value of the first difference of N1 consecutive scan positions is detected to be lower than a preset noise reference threshold, the starting position of the scan position sequence formed by the N1 consecutive scan positions is determined as the upstream accumulation cutoff boundary, where N1 is the number of points for continuous boundary determination.
[0098] The methods and systems of this application may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the method is for illustrative purposes only, and the steps of the method of this application are not limited to the order specifically described above, unless otherwise specifically stated.
[0099] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.
[0100] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for colorimetric measurement of etoxazole colloidal gold test strips based on skewness compensation, characterized in that, The method includes: Obtain the original ROI image of the etoxazole colloidal gold test strip to be tested, convert the original ROI image to the CIE Lab color space to generate a perceptual uniform chromaticity data set, and extract the illumination-invariant a component data matrix from the perceptual uniform chromaticity data set. Construct morphological structural elements, perform morphological opening operations on the a-component data matrix using morphological structural elements to obtain the illumination trend background surface, and obtain the pure chromaticity response surface based on the illumination trend background surface and the a-component data matrix. A longitudinal chromaticity distribution curve is generated based on the pure chromaticity response surface. The fluid hindrance peak point is identified on the longitudinal chromaticity distribution curve and the asymmetric integration boundary is determined. The longitudinal chromaticity distribution curve is numerically integrated within the asymmetric integration boundary and skewness compensation is performed to obtain the final etoxazole concentration characteristic value.
2. The method for colorimetric measurement of etoxazole colloidal gold test strips based on skewness compensation according to claim 1, characterized in that, The method for obtaining the original ROI image of the etoxazole colloidal gold test strip to be tested includes: The original RGB image of the etoxazole colloidal gold test strip to be tested was acquired. The effective region containing the test line and control line was located and cropped in the original RGB image to obtain the original ROI image.
3. The method for colorimetric measurement of etoxazole colloidal gold test strips based on skewness compensation according to claim 2, characterized in that, The method for obtaining the pure chromaticity response surface includes: The background surface of the illumination trend is fitted to obtain the estimated background surface; the pure color response surface is obtained by subtracting the estimated background surface from the a-component data matrix.
4. The method for colorimetric measurement of etoxazole colloidal gold test strips based on skewness compensation according to claim 3, characterized in that, The method for generating a longitudinal chromaticity distribution curve based on a pure chromaticity response surface includes: The pure chromaticity response surface is divided into a detection line analysis section and a quality control line analysis section along the longitudinal direction. Within the detection line analysis section, the pure chromaticity response surface is summed column by column along the direction perpendicular to the chromatography liquid flow to generate a one-dimensional longitudinal chromaticity distribution curve.
5. The method for colorimetric measurement of etoxazole colloidal gold test strips based on skewness compensation according to claim 4, characterized in that, The method for identifying the peak point of fluid hindrance is as follows: The maximum value of the chromaticity is searched by traversing the longitudinal chromaticity distribution curve, and the maximum value is defined as the fluid retardation peak point.
6. The method for colorimetric measurement of etoxazole colloidal gold test strips based on skewness compensation according to claim 5, characterized in that, The asymmetric integral boundary includes the upstream accumulation cutoff boundary and the downstream diffusion cutoff boundary; The method for determining the upstream accumulation cutoff boundary includes: A gradient scan is performed upstream from the peak point of fluid hindrance in the direction of chromatographic flow. When the absolute value of the first difference of N1 consecutive scan positions is lower than the preset noise reference threshold, the starting position of the scan position sequence consisting of the N1 consecutive scan positions is determined as the upstream accumulation cutoff boundary, where N1 is the number of points for continuous boundary determination.
7. The method for colorimetric measurement of etoxazole colloidal gold test strips based on skewness compensation according to claim 6, characterized in that, The method for determining the downstream diffusion cutoff boundary includes: The physical distance between the fluid stagnation peak point and the upstream accumulation cutoff boundary is calculated as the upstream accumulation characteristic length. A fluid tailing diffusion factor is introduced to construct a dynamic downstream search window. Gradient scanning is performed within the dynamic downstream search window using the same method as for determining the upstream accumulation cutoff boundary to lock the downstream diffusion cutoff boundary.
8. The method for colorimetric measurement of etoxazole colloidal gold test strips based on skewness compensation according to claim 7, characterized in that, The numerical integration of the longitudinal chromaticity distribution curve within the asymmetric integration boundary refers to the numerical integration of the longitudinal chromaticity distribution curve in the region between the upstream accumulation cutoff boundary and the downstream diffusion cutoff boundary to obtain the basic chromaticity integral.
9. The method for colorimetric measurement of etoxazole colloidal gold test strips based on skewness compensation according to claim 8, characterized in that, The method for performing the skewness compensation calculation includes: Calculate the skewness value of the longitudinal chromaticity distribution curve in the region between the upstream accumulation cutoff boundary and the downstream diffusion cutoff boundary. Calculate the tailing signal compensation coefficient based on the skewness value. Multiply the tailing signal compensation coefficient by the basic chromaticity integral to obtain the final etoxazole concentration characteristic value.
10. The method for colorimetric measurement of etoxazole colloidal gold test strips based on skewness compensation according to claim 9, characterized in that, The method for calculating the trailing signal compensation coefficient based on the skewness value includes: Determine if the skewness value is greater than zero: If the skewness value is greater than zero, calculate the trailing signal compensation coefficient based on the skewness value and the preset empirical correction constant; if the skewness value is less than or equal to zero, set the trailing signal compensation coefficient to 1.
11. A skewness-compensated etoxazole colloidal gold test strip colorimetric system, used to implement the skewness-compensated etoxazole colloidal gold test strip colorimetric method according to any one of claims 1-10, characterized in that, The system includes: Illumination decoupling extraction module: used to acquire the original ROI image of the etoxazole colloidal gold test strip to be tested, convert the original ROI image to the CIE Lab color space to generate a perceptual uniform chromaticity data set, and extract the illumination-invariant a component data matrix from the perceptual uniform chromaticity data set; Background noise suppression module: used to construct morphological structural elements, perform morphological opening operations on the a-component data matrix using morphological structural elements to obtain the illumination trend background surface, and obtain the pure chromaticity response surface based on the illumination trend background surface and the a-component data matrix. Skewness compensation quantization module: Generates a longitudinal chromaticity distribution curve based on the pure chromaticity response surface, identifies the fluid hindrance peak point on the longitudinal chromaticity distribution curve and determines the asymmetric integration boundary, performs numerical integration on the longitudinal chromaticity distribution curve within the asymmetric integration boundary and performs skewness compensation calculation to obtain the final etoxazole concentration characteristic value.
Citation Information
Patent Citations
An image processing method for quantitative analysis of multi-line colloidal gold test strips
CN104181295B
A method for analyzing the color development results of colloidal gold test strips
CN104198695B