A method for automatically determining reagents for fluorescent immunoassay and colloidal gold method
Through the automatic judgment method, image processing and logical judgment technology, the problems of low efficiency and unclear boundaries in the determination of reagents in fluorescence immunology and colloidal gold are solved, and the accuracy, stability and quantitative analysis of reagent reaction results are achieved.
Patent Information
- Application Number
- CN202210071655.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-21
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2042-01-21
AI Technical Summary
The existing fluorescent immunology and colloidal gold reagents have problems such as low manual judgment efficiency, easy fatigue, and unclear Yin-Yang boundaries and unquantitative results in semi-automatic instrument determination.
A fluorescence immunology method and colloidal gold reagent automatic determination method are proposed. By collecting image data after reagent reaction, preliminary processing, filtering, and morphological analysis are carried out, and peaks and troughs are detected using Newton's gradient algorithm, combining quality control lines and test lines calculating the peak area ratio of the quality control line and the test line to achieve accurate or quantitative analysis of the reagent reaction results.
It realizes rapid and accurate calculation of reagent reaction results, reduces manual judgment errors and errors in semi-automatic instrument judgment, has the ability to automatically position, correct and result analysis, the results are stable and reliable, and quantitative standards are met.
Smart Images

Figure CN114511522B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an automatic determination method for fluorescent immunoassay and colloidal gold method reagents, and is particularly suitable for automatic determination of fluorescent immunoassay and colloidal gold method reagents. Background Art
[0002] The automatic determination method of fluorescent immunoassay and colloidal gold reagents is a key technology to realize the automation and intelligent determination of (C / T) similar reaction types of medical test reagents. It can quickly and accurately calculate the qualitative or quantitative results of the concentration of the detected object after the reagent reaction, which is more accurate and stable than manual identification. It effectively solves the problems of manual determination errors, low efficiency, and easy fatigue of reagent reaction results.
[0003] At present, the determination of fluorescent immunoassay and colloidal gold reagents is mostly done manually or by semi-automatic instruments. Manual determination has the problems of low efficiency, reliance on experience, inability to quantify, and easy fatigue. The semi-automatic instrument determination method easily leads to unclear boundaries between positive and negative, unclear interfaces between weak positive and positive, and non-quantification. Summary of the invention
[0004] The purpose of the present invention is achieved through the following technical solutions:
[0005] The present invention provides a method for automatically determining reagents for fluorescent immunoassay and colloidal gold method, which specifically comprises the following steps:
[0006] S1: Call the corresponding configuration parameters according to the reagent type and collect image data after the reagent reaction;
[0007] S2: Preliminary processing of the acquired image data to obtain a waveform curve after the reagent reaction;
[0008] S3: filtering the waveform curve after the reaction obtained in S2, performing morphological analysis and removing the base value to obtain a stable and smooth waveform curve;
[0009] S4: Use Newton gradient algorithm to detect the peaks and valleys of the stable and smooth waveform curve obtained in S3, and calculate the peak and valley positions and the integral area of the area set at the peak position;
[0010] S5: Perform logical judgment on the quality control line and the test line respectively:
[0011] If the peak height of the quality control line is less than coefficient 1*base value, it is judged that there is no quality control line, and the result after the reagent reaction is judged to be invalid, where coefficient 1 is the parameter of the quality control line and base value is the background value;
[0012] If the peak height of the quality control line is greater than coefficient 1*base value, and the peak height of the test line is less than coefficient 2*base value, it is judged that there is no test line, and the result after the reagent reaction is negative, where coefficient 2 is the parameter of the test line;
[0013] If the peak height of the quality control line is greater than the coefficient 1*base value, and the peak height of the test line is greater than the coefficient 2*base value, the ratio of the peak area of the quality control line / the peak area of the test line is calculated, and the ratio of the peak area of the quality control line / the peak area of the test line is logically judged with the set positive and negative limits. If the ratio of the peak area of the quality control line / the peak area of the test line is greater than the set positive and negative limits, it is judged as negative. Otherwise, the quantitative result is calculated according to the intensity calibration curve to obtain the qualitative data or quantitative data of the concentration of the detected substance after the reagent reaction.
[0014] Preferably, in S1, if the reagent type is determined to be a colloidal gold method reagent, the parameters that need to be configured include: recognition mode RegMode, number of test lines RegCount, positive and negative boundary Week_Gray, weak positive Gray, ROI left pixel value BigROI_L, ROI upper pixel value BigROI_T, ROI width BigROI_W, ROI height BigROI_H, detection area starting column initial value Startcol, maximum distance between test line and quality control line MaxDis0To1, minimum distance between test line and quality control line MinDis0To1, detection area height boxHeight, detection area length Boxlen, detection area minimum peak area Minarea;
[0015] If the reagent type is fluorescent immunoassay reagent, the parameters that need to be configured include: recognition mode RegMode, number of test lines RegCount, positive and negative boundary Week_Gray, weak positive Gray, initial value of the starting column of the detection area Startcol, detection area length Boxlen, and minimum peak area of the detection area Minarea.
[0016] Preferably, if the reagent type is determined to be a colloidal gold method reagent, the preliminary processing in S2 includes:
[0017] S2.1: intercept and locate ROI according to the configuration parameters and automatically perform threshold binarization;
[0018] S2.2: Use Hough transform to obtain the reagent direction, and perform affine transform to obtain the corrected reagent image;
[0019] S2.3: intercept the central area of the corrected reagent image and perform grayscale integration in the vertical and horizontal directions to determine the precise position of the reagent detection area;
[0020] S2.4: After normalization, the detection area is vertically integrated to obtain a waveform curve after the reaction;
[0021] If the reagent type is fluorescent immunoassay reagent, the waveform valid area is obtained by waveform analysis of the collected image data.
[0022] Preferably, in S2.1, an optimal image threshold A is set, and A divides the image into a target and a background, wherein the number of target points accounts for W0 of the total image, and the average gray value is μ0, and the number of background points accounts for W1 of the image, and the average gray value is μ1.
[0023] ω0+ω1=1
[0024] μ=ω0*μ0+ω1*μ1
[0025] Where μ is the total average grayscale of the image, and the inter-class variance is:
[0026] g=ω0*(μ0-μ) 2 +ω1*(μ1-μ) 2
[0027] Can be equivalent to:
[0028] g=ω0ω1(μ0-μ1) 2
[0029] g is the inter-class variance, and the threshold that maximizes the inter-class variance g is obtained by traversal method.
[0030] Preferably, in S2.2, the Hough transform includes:
[0031] S2.2.1: denoising filter;
[0032] S2.2.2: Edge extraction;
[0033] S2.2.3: Binarization;
[0034] S2.2.4: Mapping to Hough space;
[0035] S2.2.5: Take the local maximum value, set the threshold, and filter the interference line;
[0036] S2.2.6: Obtain the angle between the straight line and the horizontal line, and remove angles greater than 10 degrees;
[0037] S2.2.7: Calculate the average direction of the remaining curves as the angle θ to be corrected for the reagent image;
[0038] Affine transformation correction includes:
[0039] S2.2.8: Assume that the scaling factor is 1, the translation is 0, and the image is rotated by angle θ around the center. Substitute into the formula The corrected reagent image is obtained by performing pixel-by-pixel operations.
[0040] Preferably, in said S3, the morphological analysis includes a corrosion algorithm and a dilation algorithm;
[0041] The corrosion algorithm includes:
[0042] S3.1: Define a convolution kernel B;
[0043] S3.2: Convolve the convolution kernel B with the image A, and calculate the minimum value of the pixels in the area covered by the convolution kernel B. The image A is the waveform curve image after the reaction;
[0044] S3.3: assign the minimum value obtained in S3.2 to the pixel specified by the reference point in image A to obtain the corroded waveform curve image;
[0045] The expansion algorithm includes:
[0046] S3.4: convolve the convolution kernel B with the corroded waveform curve image, and calculate the maximum value of the pixel points in the area covered by the convolution kernel B;
[0047] S3.5: Assign the maximum value obtained in S3.4 to the pixel specified by the reference point in the corroded waveform curve image to obtain the expanded waveform curve image.
[0048] The present invention provides a method for automatically determining the reagents of a fluorescent immunoassay and a colloidal gold method, which has the following beneficial effects:
[0049] The present invention can quickly and accurately calculate the qualitative or quantitative results of the concentration of the detected object after the reagent reaction, which is more accurate and stable than manual identification, and effectively solves the problems of manual identification error, low efficiency, easy fatigue, and the problems that the semi-automatic instrument determination method easily leads to the unclear boundary between positive and negative, the interface between weak positive and positive, and the lack of quantification.
[0050] The present invention can realize automatic positioning, correction and result analysis of reagent reaction areas, and realize accurate and stable full-automatic determination of reagents for fluorescent immunoassay and colloidal gold method. After quality control verification, the results are stable and reliable, with quantitative standards, and meet practical requirements.
[0051] The present invention adopts a variety of technical means and quantitatively analyzes and determines the detection results based on the quality control calibration curve to achieve stable and accurate determination of fluorescent immunoassay and colloidal gold method reagents. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a flowchart provided by the present invention;
[0053] Figure 2 This is a picture taken by the colloidal gold method of the present invention;
[0054] Figure 3 It is the automatic threshold binarization processing diagram of the present invention;
[0055] Figure 4 is a graph after Hough transformation and affine correction of the present invention;
[0056] Figure 5 It is the accurate positioning diagram of the detection area of the present invention;
[0057] Figure 6 It is the normalized and vertical grayscale integral image of the detection area of the present invention;
[0058] Figure 7 It is the Hough straight line detection equation diagram of the present invention;
[0059] Figure 8 It is a scanning waveform diagram of the fluorescence immunoassay of the present invention;
[0060] Fig. 9 This is a waveform comparison diagram before and after the base value is removed in the present invention;
[0061] Fig.10 It is a peak and valley search diagram of the fluorescence method curve of the present invention;
[0062] Fig.11 It is the morphological algorithm corrosion principle diagram of the present invention;
[0063] Fig.12 It is the expansion principle diagram of the morphological algorithm of the present invention;
[0064] Fig.13 It is a waveform curve diagram after the reaction of the present invention;
[0065] Fig.14 is a waveform curve diagram after being eroded by the morphological algorithm of the present invention;
[0066] Fig.15 is a waveform curve diagram after expansion by the morphological algorithm of the present invention;
[0067] Fig.16 It is a waveform curve diagram after removing the base value of the present invention;
[0068] Fig.17 This is an example diagram of the factory-calibrated C / T-detected object concentration curve of the present invention. DETAILED DESCRIPTION
[0069] The present invention provides a method for automatically determining reagents for fluorescent immunoassay and colloidal gold method, which specifically comprises the following steps:
[0070] S1: Call the corresponding configuration parameters according to the reagent type and collect image data after the reagent reaction;
[0071] S2: Preliminary processing of the acquired image data to obtain a waveform curve after the reagent reaction;
[0072] S3: filtering the waveform curve after the reaction obtained in S2, performing morphological analysis and removing the base value to obtain a stable and smooth waveform curve;
[0073] S4: Use Newton gradient algorithm to detect the peaks and valleys of the stable and smooth waveform curve obtained in S3, and calculate the peak and valley positions and the integral area of the area set at the peak position;
[0074] S5: Perform logical judgment on the quality control line and the test line respectively:
[0075] If the peak height of the quality control line is less than coefficient 1*base value, it is judged that there is no quality control line, and the result after the reagent reaction is judged to be invalid, where coefficient 1 is the parameter of the quality control line and base value is the background value;
[0076] If the peak height of the quality control line is greater than coefficient 1*base value, and the peak height of the test line is less than coefficient 2*base value, it is judged that there is no test line, and the result after the reagent reaction is negative, where coefficient 2 is the parameter of the test line;
[0077] If the peak height of the quality control line is greater than the coefficient 1*base value, and the peak height of the test line is greater than the coefficient 2*base value, the ratio of the peak area of the quality control line / the peak area of the test line is calculated, and the ratio of the peak area of the quality control line / the peak area of the test line is logically judged with the set positive and negative limits. If the ratio of the peak area of the quality control line / the peak area of the test line is greater than the set positive and negative limits, it is judged as negative. Otherwise, the quantitative result is calculated according to the intensity calibration curve to obtain the qualitative data or quantitative data of the concentration of the detected substance after the reagent reaction.
[0078] In this embodiment, in S1, if the reagent type is determined to be a colloidal gold method reagent, the parameters that need to be configured include: recognition mode RegMode, number of test lines RegCount, positive and negative boundary Week_Gray, weak positive Gray, ROI left pixel value BigROI_L, ROI upper pixel value BigROI_T, ROI width BigROI_W, ROI height BigROI_H, detection area starting column initial value Startcol, maximum distance between test line and quality control line MaxDis0To1, minimum distance between test line and quality control line MinDis0To1, detection area height boxHeight, detection area length Boxlen, detection area minimum peak area Minarea;
[0079] If the reagent type is fluorescent immunoassay reagent, the parameters that need to be configured include: recognition mode RegMode, number of test lines RegCount, positive and negative boundary Week_Gray, weak positive Gray, initial value of the starting column of the detection area Startcol, detection area length Boxlen, and minimum peak area of the detection area Minarea.
[0080] In this embodiment, if the reagent type is determined to be a colloidal gold method reagent, the preliminary processing in S2 includes:
[0081] S2.1: intercept and locate ROI according to the configuration parameters and automatically perform threshold binarization;
[0082] S2.2: Use Hough transform to obtain the reagent direction, and perform affine transform to obtain the corrected reagent image;
[0083] S2.3: intercept the central area of the corrected reagent image and perform grayscale integration in the vertical and horizontal directions to determine the precise position of the reagent detection area;
[0084] S2.4: After normalization, the detection area is vertically integrated to obtain a waveform curve after the reaction;
[0085] If the reagent type is fluorescent immunoassay reagent, the waveform valid area is obtained by waveform analysis of the collected image data.
[0086] In this embodiment, in S2.1, the optimal image threshold A is set, and A divides the image into target and background, wherein the number of target points in the total image is W0, and the average gray value is μ0, and the number of background points in the image is W1, and the average gray value is μ1.
[0087] ω0+ω1=1
[0088] μ=ω0*μ0+ω1*μ1
[0089] Where μ is the total average grayscale of the image, and the inter-class variance is:
[0090] g=ω0*(μ0-μ) 2 +ω1*(μ1-μ) 2
[0091] Can be equivalent to:
[0092] g=ω0ω1(μ0-μ1) 2
[0093] g is the inter-class variance, and the threshold that maximizes the inter-class variance g is obtained by traversal method.
[0094] In this embodiment, in S2.2, the Hough transform includes:
[0095] S2.2.1: denoising filter;
[0096] S2.2.2: Edge extraction;
[0097] S2.2.3: Binarization;
[0098] S2.2.4: Mapping to Hough space;
[0099] S2.2.5: Take the local maximum value, set the threshold, and filter the interference line;
[0100] S2.2.6: Obtain the angle between the straight line and the horizontal line, and remove angles greater than 10 degrees;
[0101] S2.2.7: Calculate the average direction of the remaining curves as the angle θ to be corrected for the reagent image;
[0102] Affine transformation correction includes:
[0103] S2.2.8: Assume that the scaling factor is 1, the translation is 0, and the image is rotated by angle θ around the center. Substitute into the formula
[0104] The corrected reagent image is obtained by performing pixel-by-pixel operations.
[0105] In this embodiment, in S3, the morphological analysis includes a corrosion algorithm and a dilation algorithm;
[0106] The corrosion algorithm includes:
[0107] S3.1: Define a convolution kernel B;
[0108] S3.2: Convolve the convolution kernel B with the image A, and calculate the minimum value of the pixels in the area covered by the convolution kernel B. The image A is the waveform curve image after the reaction;
[0109] S3.3: assign the minimum value obtained in S3.2 to the pixel specified by the reference point in image A to obtain the corroded waveform curve image;
[0110] The expansion algorithm includes:
[0111] S3.4: convolve the convolution kernel B with the corroded waveform curve image, and calculate the maximum value of the pixel points in the area covered by the convolution kernel B;
[0112] S3.5: Assign the maximum value obtained in S3.4 to the pixel specified by the reference point in the corroded waveform curve image to obtain the expanded waveform curve image.
[0113] The technical scheme of the present invention will be further described in detail below in conjunction with specific embodiments. The following embodiments are only exemplary to illustrate and explain the present invention, and should not be construed as limiting the scope of protection of the present invention. All technologies implemented based on the above content of the present invention are included in the scope that the present invention is intended to protect.
[0114] Unless otherwise specified, the raw materials and reagents used in the following examples are commercially available or can be prepared by known methods.
[0115] Example 1
[0116] The present invention proposes a method for automatically determining the reagents of fluorescent immunoassay and colloidal gold method:
[0117] S1: Call the corresponding configuration parameters according to the reagent type and collect image data after the reagent reaction;
[0118] An industrial camera is used to collect images of colloidal gold reagents, and a light sensor is used to collect images of fluorescent reagents. Figure 2 ; In S1, if the reagent type is determined to be a colloidal gold method reagent, the parameters that need to be configured include: recognition mode RegMode = 4, 4 is the colloidal gold method, 5 is the fluorescence method, the number of test lines RegCount = 1, the positive and negative boundary Week_Gray = 3.0, that is, the boundary between positive and weak positive, weak positive Gray = 20.0, set as large as possible, the positive and weak positive ratio, the weak positive and negative boundary, the ROI left pixel value BigROI_L = 80, the ROI upper pixel value BigROI_T = 5, the ROI width BigROI_W = 500, the ROI height BigROI_H = 450, the detection area starting column initial value Startcol = 220, the maximum distance between the test line and the quality control line MaxDis0To1 = 80, the minimum distance between the test line and the quality control line MinDis0To1 = 20, the detection area height boxHeight = 40, the detection area length Boxlen = 190, the detection area minimum peak area Minarea = 80;
[0119] If the reagent type is fluorescent immunoassay reagent, the parameters that need to be configured include: recognition mode RegMode = 5, number of test lines RegCount = 1, positive and negative boundary Week_Gray = 3.0, weak positive Gray = 20.0, detection area starting column initial value Startcol = 270, detection area length Boxlen = 1700, detection area minimum peak area Minarea = 80.
[0120] Fluorescent immunoassay reagents are collected using laser emitters and fluorescence receivers. The reagents are moved at a constant speed and the reagent observation window is scanned to collect raw data. The waveform valid area is obtained through waveform analysis. Figure 8 .
[0121] S2: Performing preliminary processing on the acquired image data to obtain a waveform curve after the reagent reaction; if the reagent type is determined to be a colloidal gold method reagent, the preliminary processing includes:
[0122] S2.1: According to the configuration parameters, the ROI is intercepted and automatically thresholded and binarized. Figure 3; Set the best image threshold A, A divides the image into target and background. When the inter-class variance of the two classes is the largest, the difference between the target and the background is the largest, and the binarization effect is the best. Because the variance is a measure of the uniformity of grayscale distribution, the larger the variance value, the greater the difference between the two parts of the image. When part of the target is misclassified as the background or part of the background is misclassified as the target, the difference between the two parts will become smaller. Therefore, the segmentation threshold that maximizes the inter-class variance means that the probability of misclassification is minimized. The number of target points accounts for W0 of the total image, the average grayscale value is μ0, the number of background points accounts for W1 of the image, and the average grayscale value is μ1.
[0123] ω0+ω1=1
[0124] μ=ω0*μ0+ω1*μ1
[0125] Where μ is the total average grayscale of the image, and the inter-class variance is:
[0126] g=ω0*(μ0-μ) 2 +ω1*(μ1-μ) 2
[0127] Can be equivalent to:
[0128] g=ω0ω1(μ0-μ1) 2
[0129] g is the inter-class variance, and the threshold that maximizes the inter-class variance g is obtained by traversal method.
[0130] The equivalent process is:
[0131] g=w0(u0-u) 2 +w1(u1-u) 2
[0132] g=w0(u0-(w0u0+w1u1)) 2 +w1(u1-(w0u0+w1u1)) 2
[0133] g=w0(u0-w0u0-w1u1) 2 +w1(u1-w0u0-w1u1) 2
[0134] g=w0((1-w0)u0-w1u1) 2 +w1((1-w1)u1-w0u0) 2
[0135] g=w0(w1u0-w1u1) 2 +w1(w0u1-w0u0) 2
[0136] g=w0(w1(u0-u1)) 2 +w1(w0(u1-u0)) 2
[0137]
[0138] g=(w0+w1)w0w1(u0-u1) 2
[0139] g=w0w1(u0-u1) 2 .
[0140] S2.2: Use Hough transform to obtain the reagent direction, and perform affine transform to obtain the corrected reagent image, see Figure 4 , intercept the central area after correction, see Figure 5 In the large black rectangular frame, perform grayscale integration in the vertical and horizontal directions to determine the precise position of the reagent detection area. Figure 5 The smallest black rectangle. Then normalize and integrate the detection area vertically. Figure 6 As shown, the response waveform is obtained; the basic principle of Hough transform line detection is to use the duality of points and lines. In the line detection task, the lines in the image space correspond one-to-one to the points in the parameter space, and the lines in the parameter space correspond one-to-one to the points in the image space. This means that we can draw two very useful conclusions:
[0141] 1) Each straight line in the image space corresponds to a single point in the parameter space;
[0142] 2) Any segment on a straight line in the image space corresponds to the same point in the parameter space.
[0143] Therefore, the Hough line detection algorithm converts the line detection problem in the image space into the point detection problem in the parameter space, and completes the line detection task by finding the peak value in the parameter space.
[0144] Hough line detection is to transform the straight line in the image space into a point in the parameter space, and solve the detection problem through statistical characteristics. Specifically, if the pixels in an image form a straight line, then the curves corresponding to the coordinate values (x, y) of these pixels in the parameter space must intersect at a point, so we only need to transform all the pixel points (coordinate values) in the image into curves in the parameter space, and detect the intersection of the curves in the parameter space to determine the straight line.
[0145] Theoretically, a point corresponds to countless straight lines or straight lines in any direction (there are countless slopes k or vector angles θ represented by the coordinate axes in the parameter space), but in practical applications, we must limit the number of straight lines (that is, a finite number of directions) before we can perform calculations.
[0146] Therefore, we discretize the vector angle θ of the line into a finite number of equally spaced discrete values, and the parameter ρ is also discretized into a finite number of values. Therefore, the parameter space is no longer continuous, but is discretized into grid cells of equal size. After transforming the coordinate value of each pixel point in the image space (rectangular coordinate system) to the parameter space (polar coordinate system), the obtained value will fall within a certain grid, and the cumulative counter of the grid cell will increase by 1. After all the pixels in the image space have been Hough transformed, the grid cells are checked. The grid with the largest cumulative count value has a coordinate value (ρ0, θ0) corresponding to the desired line in the image space. See Figure 7 .include:
[0147] S2.2.1: denoising filter;
[0148] S2.2.2: Edge extraction, gradient operator, Laplacian operator, canny, sobel;
[0149] S2.2.3: Binarization: to determine whether this is an edge point, we need to see whether the gray value is 255;
[0150] S2.2.4: Map to Hough space and prepare two arrays (equivalent to containers), one to display the Hough space overview and one to store the voting value. Because the mapping process often has a maximum value exceeding the threshold, up to several thousand, the grayscale image cannot be used directly to record the mapping information;
[0151] S2.2.5: Take the local maximum value, set the threshold, and filter the interference line;
[0152] S2.2.6: Obtain the angle between the straight line and the horizontal line, and remove angles greater than 10 degrees;
[0153] S2.2.7: Calculate the average direction of the remaining curves as the angle θ to be corrected for the reagent image;
[0154] Affine transformation correction includes:
[0155] S2.2.8: Assume that the scaling factor is 1, the translation is 0, and the image is rotated by angle θ around the center. Substitute into the formula
[0156] The corrected reagent image is obtained by performing pixel-by-pixel operations.
[0157] Affine transformation is mainly used for image deformation, such as rotation, translation, scaling, etc. It is a transformation in two-dimensional space. Perspective transformation (PerspectiveTransformation) refers to the transformation that uses the perspective center, image point, and target point to rotate the image receiving surface (perspective surface) around the trace (perspective axis) by a certain angle according to the perspective rotation law, destroying the original projection light beam, while still keeping the projection geometry on the image receiving surface unchanged. It is generally used for image correction. For example, when there is an inclination angle between the camera and the ground, instead of shooting directly vertically downward (orthographic projection), sometimes it is necessary to use perspective transformation to correct the image into the form of orthographic projection. Perspective transformation is a transformation in three-dimensional space. These two transformations are achieved by dot multiplication of the original image (image matrix) and the transformation matrix.
[0158] The affine transformation matrix is 2x3 and has the following form:
[0159]
[0160] Where s is the scaling factor, θ is the rotation angle, and tx and ty are the translation factors.
[0161] The specific explanation is:
[0162]
[0163] x=a 11 *x0+a 12 *y0+b1
[0164] y=a 21 *x0+a 22 *y0+b2
[0165] where a 11 , a 12 , a 21 , a 22 It is to realize linear change (scaling factor). When s is a constant and θ changes, it can also realize affine. When s is a 11 , a 12 , a 21 , a 22 At the same time, b1 and b2 achieve translation. Therefore, there are 6 unknowns in the equations of affine transformation.
[0166] S2.3: intercept the central area of the corrected reagent image and perform grayscale integration in the vertical and horizontal directions to determine the precise position of the reagent detection area;
[0167] S2.4: After normalization, the detection area is vertically integrated to obtain a waveform curve after the reaction;
[0168] If the reagent type is fluorescent immunoassay reagent, the waveform valid area is obtained by waveform analysis of the collected image data.
[0169] S3: filtering and morphologically analyzing the waveform curve after the reaction obtained in S2 to remove the base value to obtain a stable and smooth waveform curve; the morphological analysis includes an erosion algorithm and an expansion algorithm; the peak and trough positions are obtained through the waveform graph, and the base value of the reagent is obtained through calculation through the trough position, and then the base value removal image is obtained through filtering and morphological analysis (corrosion of the same size + expansion and subtraction from the original image), and the expansion and corrosion parameters are 10*peak width rectangular kernel convolution, see Fig. 9 ; Then use Newton's method to find the peaks and valleys of the waveform after removing the base value, see Fig.10 .
[0170] Corrosion algorithms include, see Fig.11 :
[0171] S3.1: Define a convolution kernel B. The kernel can be of any shape and size and has a separately defined reference point. Usually the kernel is a square or circle with a reference point. The kernel can be called a template or mask.
[0172] S3.2: Convolve the convolution kernel B with the image A, and calculate the minimum value of the pixels in the area covered by the convolution kernel B. The image A is the waveform curve image after the reaction;
[0173] S3.3: assign the minimum value obtained in S3.2 to the pixel specified by the reference point in image A, and the highlight area in the image gradually decreases to obtain a waveform curve image after corrosion;
[0174] The expansion algorithms include, see Fig.12 :
[0175] S3.4: convolve the convolution kernel B with the corroded waveform curve image, and calculate the maximum value of the pixel points in the area covered by the convolution kernel B;
[0176] S3.5: Assign the maximum value obtained in S3.4 to the pixel specified by the reference point in the corroded waveform curve image, and the highlight area in the image gradually grows to obtain the expanded waveform curve image.
[0177] When processing the waveform, define the convolution kernel size as the peak width * 10, first process the waveform image A (see Fig.13 ) to perform corrosion operation to obtain the corroded waveform curve image (see Fig.14 ), and then the corroded waveform image is expanded with the same size convolution kernel to obtain the expanded waveform image (see Fig.15 ), and finally the expanded waveform image is subtracted from the waveform image A to obtain the base value removed image (see Fig.16), it can be seen that only the peak image is retained for subsequent calculations.
[0178] S4: Use Newton gradient algorithm to detect the peaks and valleys of the stable and smooth waveform curve obtained in S3, and calculate the peak and valley positions and the integral area of the area set at the peak position;
[0179] Newton's gradient algorithm is suitable for finding extreme values. Extreme values include (maximum and minimum), so the gradient ascent method is generally used to find the maximum value, and the gradient descent algorithm is used to find the minimum value.
[0180] The first-order derivative Df of an n-dimensional real-valued function f is:
[0181]
[0182] The gradient of a function f is the transpose of Df: The second derivative of f is the Hessin matrix.
[0183] The first-order necessary condition for the local minimum point to be located inside the constraint set: the multivariate real-valued function f is first-order continuously differentiable on the constraint set Ω, and the constraint set Ω is a subset of Rn. If x* is a local minimum point of the function f on Ω and is an interior point of Ω, then
[0184]
[0185] Consider the problem of finding the minimum value of a single-valued function on an interval. Here, we assume that the function is continuously differentiable to the second order. The following constructs a quadratic function passing through the point (x(k), f(x(k))). The first and second order derivatives of this function at x(k) are f′(x(k)) and f″(x(k)). Then, the constructed function is as follows:
[0186] q(x)=f(x(k))+f′(x(k))(xx(k))+0.5f″(x(k))(xx(k))2
[0187] Then there is
[0188] q(x(k))=f(x(k))
[0189] q′(x(k))=f′(x(k))
[0190] q″(x(k))=f″(x(k))
[0191] q(x) can be considered as an approximation of f(x). Therefore, finding the minimum point of function f is similar to finding the minimum point of q. Function q should satisfy the first-order necessary conditions:
[0192] 0=q′(x)=f′(x(k))+f″(x(k))(xx(k))
[0193] Let x = x(k+1), we get:
[0194] x(k+1)=x(k)-f′(x(k)) / f″(x(k))
[0195] The above formula is the iterative formula of Newton's method. When f″(x)>0, it is valid for all x in the interval. Conversely, when f″(x)<0, Newton's method can converge to the maximum point.
[0196] S5: Perform logical judgment on the quality control line and the test line respectively:
[0197] If the peak height of the quality control line is less than coefficient 1*base value, it is judged that there is no quality control line, and the result after the reagent reaction is judged to be invalid, where coefficient 1 is the parameter of the quality control line and base value is the background value;
[0198] If the peak height of the quality control line is greater than coefficient 1*base value, and the peak height of the test line is less than coefficient 2*base value, it is judged that there is no test line, and the result after the reagent reaction is negative, where coefficient 2 is the parameter of the test line;
[0199] If the peak height of the quality control line is greater than the coefficient 1*base value, and the peak height of the test line is greater than the coefficient 2*base value, then the ratio of the peak area of the quality control line / the peak area of the test line, i.e. C / T, is calculated, and the ratio of the peak area of the quality control line / the peak area of the test line is logically judged with the set positive and negative limits. If the ratio of the peak area of the quality control line / the peak area of the test line is greater than the set positive and negative limits, it is judged to be negative. Otherwise, the quantitative result is calculated according to the intensity calibration curve to obtain the qualitative data or quantitative data of the concentration of the detected substance after the reagent reaction. The intensity calibration curve is the C / T-detected substance concentration curve calibrated at the factory, and supports polynomial curves, linear regression curves, logarithmic curves, exponential curves, etc. Fig.17 , calculate the quantitative results of the test items.
[0200] The above are only preferred specific embodiments of the present invention. However, the present invention is not limited to the above embodiments. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for automatically determining reagents for fluorescent immunoassay and colloidal gold method, characterized in that: The specific steps include: S1: Call the corresponding configuration parameters according to the reagent type and collect image data after the reagent reaction; S2: Performing preliminary processing on the acquired image data to obtain a waveform curve after the reagent reaction. If the reagent type is determined to be a colloidal gold method reagent, the preliminary processing in S2 includes: S2.1: intercept and locate ROI according to the configuration parameters and automatically perform threshold binarization; Set the optimal image threshold A, A divides the image into target and background, where the target points account for W0 of the total image, the average gray value is μ0, the background points account for W1 of the image, the average gray value is μ1, ω0+ω1=1 μ=ω0*μ0+ω1*μ1 Where μ is the total average grayscale of the image, and the inter-class variance is: g=ω0*(μ0-μ)2+ω1*(μ1-μ)2 Can be equivalent to: g=ω0ω1(μ0-μ1)2 g is the inter-class variance and the traversal method is used to obtain the threshold value that maximizes the inter-class variance g; S2.2: Use Hough transform to obtain the reagent direction, and perform affine transform to obtain the corrected reagent image. The Hough transform includes: S2.2.1: denoising filter; S2.2.2: Edge extraction; S2.2.3: Binarization; S2.2.4: Mapping to Hough space; S2.2.5: Take the local maximum value, set the threshold, and filter the interference line; S2.2.6: Obtain the angle between the straight line and the horizontal line, and remove angles greater than 10 degrees; S2.2.7: Calculate the average direction of the remaining curves as the angle θ to be corrected for the reagent image; Affine transformation correction includes: S2.2.8: Assume that the scaling factor is 1 and the translation is 0, rotate the image by an angle θ around the center of the image, substitute the formula and calculate pixel by pixel to obtain the corrected reagent image; S2.3: intercept the central area of the corrected reagent image and perform grayscale integration in the vertical and horizontal directions to determine the precise position of the reagent detection area; S2.4: After normalization, the detection area is vertically integrated to obtain a waveform curve after the reaction; If the reagent type is fluorescent immunoassay reagent, the waveform valid area is obtained by waveform analysis on the collected image data; S3: filtering the waveform curve after the reaction obtained in S2, and performing morphological analysis to remove the base value to obtain a stable and smooth waveform curve. The morphological analysis includes a corrosion algorithm and a dilation algorithm. The corrosion algorithm includes: S3.1: Define a convolution kernel B; S3.2: Convolve the convolution kernel B with the image A, and calculate the minimum value of the pixels in the area covered by the convolution kernel B. The image A is the waveform curve image after the reaction; S3.3: assign the minimum value obtained in S3.2 to the pixel specified by the reference point in image A to obtain the corroded waveform curve image; The expansion algorithm includes: S3.4: convolve the convolution kernel B with the corroded waveform curve image, and calculate the maximum value of the pixel points in the area covered by the convolution kernel B; S3.5: assigning the maximum value obtained in S3.4 to the pixel specified by the reference point in the corroded waveform curve image to obtain the expanded waveform curve image; S4: Use Newton gradient algorithm to detect the peaks and valleys of the stable and smooth waveform curve obtained in S3, and calculate the peak and valley positions and the integral area of the area set at the peak position; S5: Perform logical judgment on the quality control line and the test line respectively: If the peak height of the quality control line is less than coefficient 1*base value, it is judged that there is no quality control line, and the result after the reagent reaction is judged to be invalid, where coefficient 1 is the parameter of the quality control line and base value is the background value; If the peak height of the quality control line is greater than coefficient 1*base value, and the peak height of the test line is less than coefficient 2*base value, it is judged that there is no test line, and the result after the reagent reaction is negative, where coefficient 2 is the parameter of the test line; If the peak height of the quality control line is greater than the coefficient 1*base value, and the peak height of the test line is greater than the coefficient 2*base value, the ratio of the peak area of the quality control line / the peak area of the test line is calculated, and the ratio of the peak area of the quality control line / the peak area of the test line is logically judged with the set positive and negative limits. If the ratio of the peak area of the quality control line / the peak area of the test line is greater than the set positive and negative limits, it is judged as negative. Otherwise, the quantitative result is calculated according to the intensity calibration curve to obtain the qualitative data or quantitative data of the concentration of the detected substance after the reagent reaction.
2. The method for automatically determining reagents for fluorescent immunoassay and colloidal gold method according to claim 1, characterized in that: In the S1, if the reagent type is determined to be a colloidal gold reagent, the parameters that need to be configured include: recognition mode RegMode, number of test lines RegCount, positive and negative boundary Week_Gray, weak positive Gray, ROI left pixel value BigROI_L, ROI upper pixel value BigROI_T, ROI width BigROI_W, ROI height BigROI_H, detection area starting column initial value Startcol, maximum distance between test line and quality control line MaxDis0To1, minimum distance between test line and quality control line MinDis0To1, detection area height boxHeight, detection area length Boxlen, detection area minimum peak area Minarea; If the reagent type is fluorescent immunoassay reagent, the parameters that need to be configured include: recognition mode RegMode, number of test lines RegCount, positive and negative boundary Week_Gray, weak positive Gray, initial value of the starting column of the detection area Startcol, detection area length Boxlen, and minimum peak area of the detection area Minarea.
Citation Information
Patent Citations
Cross-platform detection device for detecting immunofluorescent and colloidal gold reagent strip
CN110187093A
Reagent strip for quantitatively detecting helicobacter pylori antibody by colloidal gold and detection method
CN111983229A
