An analysis and detection method and device based on weight function and multi-exposure fusion
Through an analytical detection method based on weight functions and multi-exposure fusion, the problem of limited dynamic range of traditional HDR technology in immunochromatographic detection is solved, the detection range is expanded and the accuracy is improved. It is suitable for colloidal gold and fluorescent immunochromatographic test strips.
Patent Information
- Application Number
- CN202411383854.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2044-09-30
AI Technical Summary
Traditional HDR technology has a limited dynamic range in immunochromatographic detection, resulting in a narrow detection range, slow detection speed and low detection accuracy, especially in fluorescent immunochromatographic technology with higher sensitivity requirements.
An analytical detection method based on weight function and multi-exposure fusion is adopted. By taking images in a multi-exposure time series, a piecewise weight function is constructed, and the camera response function of the image acquisition system is restored. Combined with the biological response curve, a standard concentration quantitative curve is generated, which expands the detection range and improves the detection accuracy.
It significantly improves the detection range and accuracy of immunochromatographic testing, can accurately reflect the true reaction intensity of each area on the test paper, is suitable for colloidal gold immunochromatographic test paper cards and fluorescent immunochromatographic test paper cards, and provides accurate concentration detection results.
Smart Images

Figure CN119273605B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of immunochromatographic analysis and detection, and more specifically, relates to an analysis and detection method and device based on weight function and multi-exposure fusion. Background Art
[0002] The immunochromatography (lateral flow immunoassay LFIA) method is a simple on-site rapid detection technology. Rapid test reagent cards represented by colloidal gold immunochromatography cards can directly interpret positive and negative results with the naked eye and have been widely used in many fields.
[0003] In recent years, with the rapid development of mobile devices such as handheld devices and smartphones, utilizing the cameras of these portable devices for immunochromatographic imaging has become a new trend. These imaging-based immunoassay devices can quickly, conveniently, and cost-effectively capture the entire image information of the test strip, providing a foundation for subsequent data processing and global analysis.
[0004] Due to the limited dynamic range of images captured by cameras, images of immunochromatographic test strips often result in overexposure of highlights or loss of detail in dark areas, severely impacting the accuracy and reproducibility of test results. This limitation of imaging-based detection equipment is even more pronounced for fluorescent immunochromatographic techniques, which require higher sensitivity and a wider signal range. To achieve this balance, many devices have been forced to sacrifice size and cost, resorting to more cumbersome and expensive mechanical scanning chromatography methods.
[0005] In the field of consumer digital cameras, the development of HDR technology has expanded the dynamic range of photos, solving the problem of loss of dark or brightness details in photos, and allowing a photo to show both bright and dark areas. However, traditional HDR technology is committed to showing details of both highlight areas and shadow areas in a photo. It mainly focuses on improving the contrast and visual effects of the image, without paying attention to the precise correspondence between the synthesis result and the actual brightness value, nor does it consider the signal distortion caused by nonlinear transformation. In immunochromatographic image testing, it is not only necessary to preserve the light and dark details in the image, but more importantly, to ensure that the image can accurately reflect the actual reaction intensity of each area on the test strip. In addition, traditional HDR technology usually keeps the light source conditions fixed, and takes a set of photos with different exposure times under the same light source scene.
[0006] Due to the limited dynamic range of photos in traditional HDR technology, the immunochromatographic detector based on the image imaging principle has problems such as narrow detection range, slow detection speed and low detection accuracy. Summary of the Invention
[0007] In response to the defects of related technologies, the purpose of the present invention is to provide an analysis and detection method based on weight functions and multi-exposure fusion, aiming to solve the problems of limited dynamic range of photos in traditional HDR technology, which leads to the problems of narrow detection range, slow detection speed and low detection accuracy in immunochromatographic detectors based on image imaging principles.
[0008] To achieve the above objectives, in a first aspect, the present invention provides an analysis and detection method based on a weight function and multi-exposure fusion, comprising:
[0009] Shooting the paper card to be tested in a multi-exposure time sequence to obtain a multi-exposure image set of the paper card to be tested;
[0010] Obtaining the actual concentration value of the paper card to be tested according to the standard concentration quantitative curve, the multi-exposure image set of the paper card to be tested and the corresponding exposure time;
[0011] The method for generating the standard concentration quantitative curve includes:
[0012] S1. Capture P multi-exposure time sequences of X standard immunochromatographic test strips of different concentrations to obtain a multi-exposure image set; divide the multi-exposure image set into a first multi-exposure image set including images of X1 standard immunochromatographic test strips and a second multi-exposure image set including images of X2 standard immunochromatographic test strips; wherein P ≥ 3, X = X1 + X2;
[0013] S2. Obtain grayscale value changes of N pixels in the T-line region of each image in the first multi-exposure image set to obtain a grayscale value matrix of N×P pixels;
[0014] S3. Construct the following piecewise weight function:
[0015]
[0016] Wherein, the function forms of f1(z) and f2(z) include linear function, quadratic polynomial function, exponential function or logarithmic function, and z1 and z2 are segmentation points;
[0017] S4. Determine the function forms of f1(z) and f2(z) and the segmentation points z1 and z2 that minimize the error between the average pixel value of the T-line region and the true pixel value, and obtain a target segmentation weight function; calculate the average pixel value of the T-line region by: obtaining a camera response function based on the segmentation weight function and a grayscale value matrix; obtaining an HDR image based on the camera response function, the second multi-exposure image set, and the corresponding exposure time; and perform tone mapping on the HDR image to obtain the average pixel value of the T-line region;
[0018] S5. Obtain the target camera response function according to the target segment weight function combined with the gray value matrix;
[0019] S6. According to the target camera response function, the multi-exposure image set of the standard immunochromatographic test strip card and the corresponding exposure time, the average pixel value of the T-line area of the standard immunochromatographic test strip card is obtained, and the average pixel value of the T-line area of the standard immunochromatographic test strip card is fitted with the corresponding concentration to generate a standard concentration quantitative curve.
[0020] Optionally, the standard immunochromatographic test paper cards have different T line concentrations and the same C line concentrations.
[0021] Optionally, S2 specifically includes:
[0022] S21, extracting a T-line region of each image in the first multi-exposure image set using an image segmentation algorithm;
[0023] S22, vertically stitching the T-line regions of each image in order of concentration to obtain a guide image;
[0024] S23 , obtaining grayscale value changes of N / X1 pixels in each T-line region in the guide image to obtain a grayscale value matrix of N×P pixels.
[0025] Optionally, the error between the average pixel value and the true pixel value is the root mean square error (RMSE) and the mean absolute percentage error (MAPE) between the average pixel value of the T-line area and the true pixel value of the standard immunochromatographic test paper card.
[0026] Optionally, S6 specifically includes:
[0027] S61, obtaining an average pixel value of a T-line region of the standard immunochromatographic test strip card according to a target camera response function, a multi-exposure image set of the standard immunochromatographic test strip card, and corresponding exposure time;
[0028] S62. With the average pixel value in S61 as the y-axis and the actual concentration of the standard immunochromatographic test paper card as the x-axis, a four-parameter logistic fit is used to obtain a standard concentration quantitative curve.
[0029] Optionally, the standard immunochromatographic test paper card includes a colloidal gold immunochromatographic card and a fluorescent immunochromatographic card.
[0030] Optionally, the multi-exposure image set covers underexposure to overexposure in different exposure time sequences.
[0031] Optionally, after obtaining the multi-exposure image set, the method further includes: pre-processing the multi-exposure image set using a median filtering algorithm, a Gaussian filtering algorithm, a bilateral filtering algorithm, or a guided filtering algorithm.
[0032] In a second aspect, the present invention further provides an analysis and detection device based on a weight function and multi-exposure fusion, for performing the analysis and detection method as described in any one of the first aspects, comprising:
[0033] An image acquisition module is used to shoot the paper card to be tested in a multi-exposure time sequence to obtain a multi-exposure image set of the paper card to be tested;
[0034] The concentration analysis and detection module is used to obtain the actual concentration value of the paper card to be tested based on the standard concentration quantitative curve, the multi-exposure image set of the paper card to be tested and the corresponding exposure time;
[0035] Wherein, the method for generating the standard concentration quantitative curve includes:
[0036] Capturing P multi-exposure time sequences of X standard immunochromatographic test strips of different concentrations to obtain a multi-exposure image set; dividing the multi-exposure image set into a first multi-exposure image set including images of X1 standard immunochromatographic test strips and a second multi-exposure image set including images of X2 standard immunochromatographic test strips; wherein P ≥ 3, X = X1 + X2;
[0037] Obtaining grayscale value changes of N pixels in the T-line region of each image in the first multi-exposure image set to obtain a grayscale value matrix of N×P pixels;
[0038] Construct the following piecewise weight function:
[0039]
[0040] Wherein, the function forms of f1(z) and f2(z) include linear function, quadratic polynomial function, exponential function or logarithmic function, and z1 and z2 are segmentation points;
[0041] Determining the functional forms of f1(z) and f2(z) and the segmentation points z1 and z2 that minimize the error between the average pixel value and the true pixel value in the T-line region, and obtaining a target segmentation weight function; calculating the average pixel value in the T-line region by: obtaining a camera response function based on the segmentation weight function and a grayscale value matrix; obtaining an HDR image based on the camera response function, a second multi-exposure image set, and corresponding exposure times; and performing tone mapping on the HDR image to obtain an average pixel value in the T-line region;
[0042] The target camera response function is obtained based on the target segment weight function combined with the gray value matrix;
[0043] According to the target camera response function, the multi-exposure image set of the standard immunochromatographic test strip card and the corresponding exposure time, the average pixel value of the T-line area of the standard immunochromatographic test strip card is obtained. The average pixel value of the T-line area of the standard immunochromatographic test strip card is fitted with the corresponding concentration to generate a standard concentration quantitative curve.
[0044] Compared with the prior art, the above technical solutions conceived by the present invention can achieve the following beneficial effects:
[0045] 1. The present invention provides an analysis and detection method based on a weight function and multi-exposure fusion. Aiming at the specific needs of quantitative processing of immunochromatographic images, based on the idea of multi-exposure fusion high dynamic range imaging technology, the camera response function of the image acquisition system is first restored, and then the camera response function curve is combined with the biological response curve, thereby expanding the linear range of the immunochromatographic standard quantitative curve to solve the limitation of the current immunochromatographic detector based on the image imaging principle that the detection range is too narrow. In the process of restoring the camera response function of the image acquisition system, the weights of the images with different exposures are adjusted by using a segmented weight function to reduce the influence of the over-exposed and under-exposed areas in the image on the fitting accuracy of the camera response function, so that the fitted standard quantitative curve fits the characteristics of the immunochromatographic S-shaped curve, which can significantly improve the accuracy of HDR image synthesis and make the analysis and detection results based on the immunochromatographic test strip card more accurate.
[0046] 2. The present invention provides an analytical detection method based on a weighting function and multi-exposure fusion. After generating a standard concentration quantitative curve, a multi-exposure image set of the test paper card is captured in a multi-exposure time sequence, thereby obtaining a highly accurate HDR image and an accurate average pixel value of the T-line region of the test paper card. The actual concentration value of the test paper card can be obtained by referring to the standard concentration quantitative curve. This method can be applied to both colloidal gold immunochromatographic test strips and fluorescent immunochromatographic test strips, and can produce accurate concentration detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is a flow chart of an analysis and detection method based on a weight function and multi-exposure fusion provided by an embodiment of the present invention;
[0048] Figure 2 This is an example of a standard immunochromatographic test strip card;
[0049] Figure 3 36 standard colloidal gold immunochromatographic test strips;
[0050] Figure 4 A collection of multi-exposure photos of different immunochromatographic test strips at 9 exposure times;
[0051] Figure 5(A) in the middle shows images of 8 immunochromatographic test strips. Figure 5 Middle (B) is a guide image formed by combining the T-line areas of 8 immunochromatographic test strip images. Figure 5 Middle (C) is to select Q pixels in each ROI area;
[0052] Figure 6 The results of the 5# test paper card obtained under four filtering algorithms, among which (A) is the original image of the 5# test paper card, (B) is the result of bilateral filtering, (C) is the result of median filtering, (D) is the result of Gaussian filtering, and (E) is the result of guided filtering;
[0053] Figure 7 This is the flow chart of the sliding window threshold segmentation algorithm;
[0054] Figure 8 (A) is the sliding window threshold segmentation algorithm to extract the C line and T line of the immunochromatographic test paper card. Figure 8 (B) is the sliding window of the immunochromatography image ROI image, selecting the area with the minimum gray value. Figure 8 Middle (C) shows the C-line and T-line regions after sliding window segmentation;
[0055] Figure 9 (A) is the exposure offset under the identity function, Figure 9 (B) is the exposure offset under the hat function. Figure 9 Middle (C) is the exposure offset under the Gaussian function;
[0056] Figure 10 The camera response function results are fitted under different weight functions; among them, (A) is the identity function, (B) is the hat function, (C) is the Gaussian function, parameters a = 2, b = 4, (D) is the CRF curve fitted under the identity function, (E) is the CRF curve fitted under the hat function, and (F) is the CRF curve fitted under the Gaussian function;
[0057] Figure 11 (A) is the MAPE of different (a, b) parameter combinations, Figure 11 (B) RMSE of different (a, b) parameter combinations;
[0058] Figure 12 is the image of the Gaussian function when the parameters a=10, b=4;
[0059] Figure 13 Middle (A) is the quantitative curve of 36 test strips divided into 9 groups and spliced at 9 exposure times. Figure 13 Middle (B) is the slope of the mapping between the T-line pixel value and the actual printed grayscale value of the 9 groups of test strips;
[0060] Figure 14(A) The optimal piecewise function form, Figure 14 Middle (B) is the camera response function curve based on the optimal weight function fitting;
[0061] Figure 15 It is the standard concentration quantitative curve fitted by the HDR algorithm based on the target weight function;
[0062] Figure 16 This is a comparison of the measurable signal area of the immunochromatographic test strip before and after the multi-exposure fusion HDR algorithm;
[0063] Figure 17 Comparison of standard concentration quantitative curves before and after using the HDR algorithm on the handheld detector. DETAILED DESCRIPTION
[0064] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0065] The contents involved in the above embodiment are described below in conjunction with a preferred embodiment.
[0066] The immunochromatographic image sensor in the image acquisition system is essentially a specialized camera, operating on the same basic principle as the digital cameras used in everyday life. Therefore, the same photo enhancement techniques used in digital cameras can be leveraged to address the dynamic range expansion issue in immunochromatographic detection systems. During immunochromatographic testing, flexible adjustments to various parameters, such as light source brightness and exposure time, are required based on the needs of the test subject. This generates a series of images under varying brightness conditions, helping to more effectively restore the most realistic immunochromatographic HDR images during immunochromatographic testing, surpassing those obtained using traditional HDR techniques.
[0067] An analysis and detection method based on a weight function and multi-exposure fusion, comprising:
[0068] Shooting the paper card to be tested in a multi-exposure time sequence to obtain a multi-exposure image set of the paper card to be tested;
[0069] Obtaining the actual concentration value of the paper card to be tested according to the standard concentration quantitative curve, the multi-exposure image set of the paper card to be tested and the corresponding exposure time;
[0070] The method for generating the standard concentration quantitative curve includes:
[0071] S1. Capture P multi-exposure time sequences of X standard immunochromatographic test strips of different concentrations to obtain a multi-exposure image set; divide the multi-exposure image set into a first multi-exposure image set including images of X1 standard immunochromatographic test strips and a second multi-exposure image set including images of X2 standard immunochromatographic test strips; wherein P ≥ 3, X = X1 + X2;
[0072] S2. Obtain grayscale value changes of N pixels in the T-line region of each image in the first multi-exposure image set to obtain a grayscale value matrix of N×P pixels;
[0073] S3. Construct the following piecewise weight function:
[0074]
[0075] Wherein, the function forms of f1(z) and f2(z) include linear function, quadratic polynomial function, exponential function or logarithmic function, and z1 and z2 are segmentation points;
[0076] S4. Determine the function forms of f1(z) and f2(z) and the segmentation points z1 and z2 that minimize the error between the average pixel value of the T-line region and the true pixel value, and obtain a target segmentation weight function; calculate the average pixel value of the T-line region by: obtaining a camera response function based on the segmentation weight function and a grayscale value matrix; obtaining an HDR image based on the camera response function, the second multi-exposure image set, and the corresponding exposure time; and perform tone mapping on the HDR image to obtain the average pixel value of the T-line region;
[0077] S5. Obtain the target camera response function according to the target segment weight function combined with the gray value matrix;
[0078] S6. According to the target camera response function, the multi-exposure image set of the standard immunochromatographic test strip card and the corresponding exposure time, the average pixel value of the T-line area of the standard immunochromatographic test strip card is obtained, and the average pixel value of the T-line area of the standard immunochromatographic test strip card is fitted with the corresponding concentration to generate a standard concentration quantitative curve.
[0079] like Figure 1 As shown in FIG, the specific process can be divided into (1) initialization phase: establishing and optimizing the camera response function (CRF) curve of the image acquisition device; (2) use phase: using the image acquisition device to capture a multi-exposure image set of a standard immunochromatographic test strip card with different concentrations, using the established camera response function curve to guide the multi-exposure image set to generate an HDR image, and then extracting the characteristic value of the region of interest (ROI) in the HDR image to expand the linear range of the standard quantitative curve.
[0080] Before acquiring the multi-exposure image set, also include:
[0081] Design X standard immunochromatographic test strips with different T-line concentrations, and set the C-line concentration of each standard immunochromatographic test strip to be the same. The standard immunochromatographic test strips include colloidal gold immunochromatographic cards and fluorescent immunochromatographic cards.
[0082] When the standard immunochromatographic test paper card is a colloidal gold immunochromatographic card, use image processing software to create Figure 2 The standard immunochromatographic test strip card shown is designed with a quality control strip area frame of corresponding size, including the quality control line (C line) and the detection line (T line). The size of the quality control strip and the position of the C line and T line are cut to be exactly the same as the size and position of the actual test strip card product, and three test strips of the same concentration are produced at a time, reserved for subsequent repetitive tests.
[0083] After the standard colloidal gold immunochromatographic test paper card is designed, it is printed on Pantac 230g enhanced rough paper by a high-resolution color photocopying device. In this embodiment, a standard colloidal gold immunochromatographic test paper card with 36 different T-line grayscales ranging from 0 to 255 is designed with a pixel difference of 7, and the C-line pixel value of each test paper card is the same. Figure 3 As shown, it represents 36 standard colloidal gold immunochromatographic test strips with the same C line gray value and different T line gray values.
[0084] When the standard immunochromatographic test paper card is a fluorescent immunochromatographic test paper card, the standard fluorescent immunochromatographic test paper card is composed of 19 self-made fluorescent immunochromatographic test paper cards with different T line concentrations. The T line concentrations of the 19 fluorescent immunochromatographic test paper cards range from low to high, covering from 101 to 10 4 The fluorescence intensity is high and the dynamic range is wide.
[0085] This example uses a standard colloidal gold immunochromatographic test strip card as an example. The measurement of the standard colloidal gold immunochromatographic test strip card is performed under dark conditions. A sample set of 36 test strip cards is captured at a specific exposure to cover various conditions from underexposure to overexposure. The multi-exposure image set covers pixel values 0-255 at different exposure time sequences. In this example, P is set to 9, such as Figure 4As shown in the figure, the standard grayscale test paper card was shot at 9 exposure times (0.122ms, 0.244ms, 0.488ms, 0.977ms, 1.953ms, 3.906ms, 7.812ms, 15.625ms, 31.25ms), and a set of 36×9 multi-exposure photos from underexposure to overexposure was obtained. 8 test paper cards were evenly selected to cover the grayscale value range of 0-255 as much as possible, namely 1# test paper card, 5# test paper card, 10# test paper card, 15# test paper card, 20# test paper card, 25# test paper card, 30# test paper card, and 35# test paper card. Figure 5 As shown in (A), these 8×9 images are the first multi-exposure image set, which will be used to establish the camera response function curve.
[0086] After acquiring the multi-exposure image set, the image needs to be pre-processed. The acquired immunochromatographic images are acquired by CMOS image sensors, and these images often contain noise. The shorter the exposure time, the more noise there is in the image. Figure 6 As shown, the multi-exposure image set can be preprocessed using a median filter algorithm, a Gaussian filter algorithm, a bilateral filter algorithm, or a guided filter algorithm. In this embodiment, the most effective guided filter algorithm is used to preprocess the exposure image set, which can effectively reduce noise in the image and enhance the visibility of the target.
[0087] Optionally, S2 specifically includes:
[0088] S21 . Extract the T-line region of each image in the first multi-exposure image set using an image segmentation algorithm.
[0089] The HDR image (first multi-exposure image set) in .hdr format is converted into a high-quality LDR image through a tone mapping algorithm to adapt to the dynamic range of conventional display devices. Determine the position and size of the region of interest (such as the T-line area) in the standard colloidal gold immunochromatographic test strip card, extract the ROI area, and convert it into a single-channel grayscale image. Divide the image into two parts, upper and lower, at the vertical midpoint of the grayscale image, and apply sliding window threshold segmentation on the two parts. The window moves along the vertical direction of the image, and the average pixel value in each window is calculated. By comparing the pixel values of different windows, find the area with the smallest pixel value, which corresponds to the T line and C line. The process of the sliding window threshold segmentation algorithm is as follows Figure 7 shown.
[0090] The segmented image is Figure 8 As shown, the T-line and C-line areas are clearly identified, and the average pixel values of the two areas are calculated.
[0091] Alternatively, other threshold segmentation algorithms can be used, such as the maximum between-class variance (OTSU) algorithm.
[0092] S22 , vertically stitching the T-line regions of each image in order of density to obtain a guide image.
[0093] The T-line ROI areas of the eight colloidal gold immunochromatographic test strip card images taken in the nine multi-exposure time series are stitched together to form an image with eight color levels, which is called the guide image. Figure 5 Middle (B).
[0094] S23 , obtaining grayscale value changes of N / X1 pixels in each T-line region in the guide image to obtain a grayscale value matrix of N×P pixels.
[0095] In the guide image, 5 pixels are acquired in each T-line region, for a total of 40 pixels. The changes in the pixel values of these 40 pixels under the 9 multi-exposure time series are formed into a grayscale value matrix, which will be used to fit the camera response function curve. For a pixel value range of (Zmax-Zmin) = 255, and 9 multi-exposure photos per test card, select N = 40 > [255 / (9-1) = 32] pixels. Then, in each of the 8 T-line ROI regions, select Q = 40 / 8 = 5 pixels, as shown in Figure 1. Figure 5 As shown in (C).
[0096] Construct a weight function to optimize the camera response function curve. The form of the weight function needs to be determined first.
[0097] Standard concentration quantification curves in immunochromatography often exhibit S-shaped characteristics. In the middle of this curve, a linear relationship exists between the measured pixel value and the target substance concentration, while at the ends, the relationship plateaus and becomes less apparent. Therefore, a piecewise weighting function strategy is employed to more precisely reflect the characteristics of each concentration segment. The linear range of the standard concentration quantification curve is used to determine the boundaries between the linear and nonlinear intervals. The weight coefficient is set to 1 in the linear interval, preserving the linear characteristics of the original signal.
[0098] The multi-exposure image set is taken at 9 different exposure times and is calculated according to the formula:
[0099]
[0100] Therefore, at least 32 pixels need to be selected to meet the minimum requirement for the number of pixels required to fit the camera response function curve. In this embodiment, 40 pixels are selected to fit the camera response function curve of the colloidal gold immunochromatography microscopy image acquisition device.
[0101] If 5 pixels with different grayscale values are selected from the image, the digital pixel value matrix of the 5 pixels in the image under 9 different exposure times is obtained, and the corresponding camera response function g curve and irradiance Ei are derived based on this.
[0102] Let X ij is the exposure of the i-th point in the j-th exposure. When the ambient light remains unchanged, this exposure is proportional to the product of the irradiance of this point and the exposure time, where α is the proportional factor:
[0103] X ij =αE i ×Δt j
[0104] Z ij =f(X ij )=f(αE i ×Δt j )
[0105] lnf -1 (Z ij )=lnαE i +lnΔt j
[0106] g(Z ij )=lnαE i +lnΔt j
[0107] Then suppose: i =lnαE i , then λ i is the exposure offset of the pixel point, and the goal is to solve the optimization problem:
[0108]
[0109] Considering the different contribution values of different pixels and emphasizing the weight in the middle of the curve, a weight function needs to be introduced:
[0110]
[0111] Therefore, it is known that Z ij and Δt j , use the least squares method to solve the function g and exposure offset λ i .
[0112] This embodiment analyzes the application of identity function, hat function and Gaussian function in camera response function curve fitting, and obtains the following Figure 9 The five pixels shown have different exposure offsets calculated under different weight functions and Figure 10 The three response function curves g are shown.
[0113] Among them, the identity function form is:
[0114] w1(z)=1,z∈[0,255]
[0115] The functional form of the hat function is:
[0116]
[0117] The functional form of the Gaussian function is:
[0118]
[0119] Among them, parameter a controls the shape of the Gaussian function. A larger a value results in a wider range of pixels with a weight value of 1 in the weight function. Parameter b controls the width of the Gaussian function. A larger b value makes the distribution range of pixels with a weight value greater than 0 narrower.
[0120] pass Figure 10 The experimental results are obtained, and the residuals of the camera response function curves obtained under three different weight functions, namely the identity function, the hat function and the Gaussian function, are calculated. They are 6.24503, 0.27919 and 0.19764 respectively. The experimental results show that the fitting degree of the CRF curve under the Gaussian function is better than that of the curves fitted under the identity function and the hat function.
[0121] Furthermore, different (a, b) parameter combinations of the Gaussian function will fit different CRF results, and different fitting results will directly affect the pixel value of each pixel in the HDR image. Therefore, this embodiment establishes a parameter selection algorithm to optimize the selection of a and b of the Gaussian function. The a and b of the Gaussian function are respectively taken within a certain interval, where a is between [2, 50] and a is an even number, and b is between [1, 4]. Because when a = 50 and b = 4, the Gaussian function has set the weights of most pixel values to 1, which is similar to the identity function.
[0122] The MAPE and RMSE values between the pixel values of the T line in the HDR image corrected by the CRF curve fitted with different parameters a and b and the actual T line printed grayscale value are calculated. By comparing the MAPE and RMSE results of 36 test strips under different a and b parameter combinations, the optimal CRF curve is determined, which makes the pixel values of the T line in the corrected HDR image closer to the actual printed grayscale value. The comparison results are shown in Figure 2. Figure 11 shown.
[0123] Experimental results show that when the parameter combination is (a=10, b=4), the obtained MAPE and RMSE values reach their minimum values, at 41.16% and 11.42, respectively. This indicates that under this parameter combination, the CRF curve fitted by the Gaussian function can effectively correct the HDR image, making its T-line pixel values closest to the actual printed grayscale values.
[0124] According to the optimal function form of the Gaussian function, the following is drawn: Figure 12As shown in the weight function diagram, it can be found that the weight values begin to turn when the pixel values are 50 and 200, which means that these two pixel values approximately mark the end of the low-brightness area and the beginning of the high-brightness area in the response function.
[0125] Therefore, we construct a piecewise function that behaves differently in low-brightness and high-brightness areas. The functional form of the piecewise function is:
[0126]
[0127] Wherein, the function forms of f1(z) and f2(z) include linear function, quadratic polynomial function, exponential function or logarithmic function, and z1 and z2 are segmentation points;
[0128] After determining the form of the piecewise weight function, it is necessary to solve the piecewise weight function. First, set the values of the initial segmentation points z1 and z2 to obtain the first piecewise weight function. In this embodiment, the value of segmentation point z1 is set to 50 and the value of segmentation point z2 is set to 200. Based on this, the appropriate functions f1(z) and f2(z) are selected.
[0129] Functions such as linear, quadratic polynomial, exponential, and logarithmic are selected as candidates for f1(z) and f2(z). The current camera response function is derived from the first segmented weight function combined with the grayscale matrix. The mean absolute percentage error (MAPE) and root mean square error (RMSE) between the pixel values of the T-line in the HDR image and the actual printed grayscale values of the T-line are calculated by correcting the camera response function curve. The function types of f1(z) and f2(z) are changed, and the first segmented weight function is updated to update the camera response function. The calculated MAPE and RMSE values are updated. Using MAPE and RMSE as the objective function, the f1(z) and f2(z) values that minimize MAPE and RMSE are solved as the final expression of the segmented function. The optimal segmented function form is found and compared with the optimal function form of the Gaussian function.
[0130] Specifically, the pixel values of 36 test strips divided into 9 groups at 9 exposure times are shown in Figure 13Middle (A). The T-line pixel values of test strips 1-4 (group 1, and so on) were captured at 31.25ms, the T-line pixel values of test strips 5-8 were captured at 15.625ms, the T-line pixel values of test strips 9-12 were captured at 7.812ms, the T-line pixel values of test strips 13-16 were captured at 3.906ms, the T-line pixel values of test strips 17-20 were captured at 1.953ms, the T-line pixel values of test strips 21-24 were captured at 0.977ms, the T-line pixel values of test strips 25-28 were captured at 0.488ms, the T-line pixel values of test strips 29-32 were captured at 0.244ms, and the T-line pixel values of test strips 33-36 were captured at 0.122ms. Figure 13 (B) shows the slope of the mapping between the T-line pixel values of each test strip and the actual printed grayscale values. This slope reflects the camera's sensitivity to grayscale value changes at a specific exposure time. Groups with higher slopes demonstrate high sensitivity to grayscale value changes, while groups with lower slopes indicate reduced sensitivity to grayscale value changes within this range.
[0131] The optimal f1(z) and f2(z) function forms were selected by adjusting the piecewise function form based on the MAPE and RMSE values. The MAPE and RMSE values calculated for different piecewise functions are shown in Table 1. Experimental results show that when f1(x) is an exponential function and f2(x) is a linear function, the MAPE and RMSE values are minimized, indicating that this piecewise function combination is able to achieve optimal HDR image correction. The MAPE of the T-line pixel values extracted from the original image without HDR processing and the T-line printed grayscale values was calculated, reaching 117%.
[0132] Table 1 Error results of different f1(x) and f2(x) in piecewise function
[0133]
[0134] After updating the expression of the first segment weight function, it is necessary to optimize the value range of the segment points. The search range of z1 and z2 is related to the performance of the CMOS image sensor used. The search range of segment points z1 and z2 is set to obtain the second segment weight function. In this embodiment, by observing Figure 13 For the T-line pixel values of the digital image of the test paper card, when the printed grayscale of the test paper card is around 50, the slope of the multi-exposure pixel value becomes 0.9, which is close to linear, indicating good camera response at this time. Therefore, the search range of z1 is set to 40-70 (grayscale value). For the test paper card with a high printed grayscale value, the slope decreases to 0.74 at a pixel value of around 200, so the search range of z2 is set to 190-230 (grayscale value).
[0135] A cycle is performed on z1 and z2 of the segmented weight function, with a step size of 1. The second segmented weight function is gradually updated, and the MAPE and RMSE values between the pixel values of the T line in the HDR image corrected with different z1 and z2 and the actual printed T line grayscale values are calculated. Based on the minimum MAPE and RMSE results, the segmentation point of the target weight function is determined. Through the optimization algorithm, when z1 = 50 and z2 = 200, the MAPE of 36 test strips is 36.21% and the RMSE is 11.23, achieving the minimum error. This result is better than the MAPE = 41.16% and RMSE = 11.42 calculated using the Gaussian function objective function form. Therefore, the form of the target weight function in this embodiment is as follows:
[0136]
[0137] After obtaining the target segment weight function, the target camera response function can be obtained according to the target segment weight function combined with the gray value matrix.
[0138] The above target piecewise function is as follows Figure 14 As shown in A, under the above objective piecewise function Figure 12 The multi-exposure image set of the guide image in is fitted to draw the camera response function curve of the image acquisition device, such as Figure 14 As shown in (B).
[0139] Optionally, S6 specifically includes:
[0140] S61, obtaining an average pixel value of a T-line region of the standard immunochromatographic test strip card according to a target camera response function, a multi-exposure image set of the standard immunochromatographic test strip card, and corresponding exposure time;
[0141] S62. With the average pixel value in S61 as the y-axis and the actual concentration of the standard immunochromatographic test paper card as the x-axis, a four-parameter logistic fit is used to obtain a standard concentration quantitative curve.
[0142] The four-parameter logistic fitting model is usually expressed as follows:
[0143]
[0144] Among them, A1 represents the maximum eigenvalue of the curve, that is, the maximum average pixel value of the T line in the measurement image; A2 represents the minimum eigenvalue of the curve, that is, the minimum average pixel value of the T line in the measurement image; x represents the independent variable, that is, the printed grayscale value of the T line; x0 is the EC50 (half-maximal effect concentration), that is, the printed grayscale value corresponding to the middle pixel value of the T line in the measurement image; p controls the slope of the curve. At the same time, the four-parameter logistic fitting model has an important evaluation parameter, the goodness of fit R 2 This value reflects the goodness of fit of the quantitative curve of the standard concentration. The closer its value is to 1, the more accurate the fitted curve is. By fitting the experimental data to a four-parameter logistic model, these parameters can be estimated and an S-shaped curve can be obtained that fits the data well.
[0145] The results of 30 test strips were selected to fit the standard concentration quantitative curve, such as Figure 15 As shown in the figure, the horizontal axis is the grayscale values of the T-line prints of 30 test strips, and the vertical axis is the change in T-line pixel values in the HDR image. By observing the curve, the data points are closely distributed around the fitted curve, and the fit is 0.99909, indicating an excellent fit. Secondly, the correctness of the curve fit was verified using six other test strips that were not used in the standard concentration quantitative curve fitting. Comparing the predicted and actual printed grayscale values, as shown in Table 2, confirms that the curve fit is indeed very high, with the maximum difference in pixel value being only 2.
[0146] Table 2 Predicted print grayscale values calculated by HDR algorithm and actual print grayscale values of 6 test paper cards
[0147]
[0148] After obtaining the standard concentration quantitative curve, it also includes:
[0149] Shooting the paper card to be tested in a multi-exposure time sequence to obtain a multi-exposure image set of the paper card to be tested;
[0150] The actual concentration value of the paper card to be tested is obtained according to the standard concentration quantitative curve, the multi-exposure image set of the paper card to be tested and the corresponding exposure time.
[0151] The effectiveness of the algorithm designed in this scheme was verified by analytical methodology. The standard concentration quantitative curves of the colloidal gold immunochromatography microscopy image acquisition device before and after the HDR algorithm was used were compared. That is, the T-line pixel values of 30 test strip cards LDR images taken under normal exposure (1.953ms) were compared with the T-line pixel values of 36 HDR images synthesized using the HDR algorithm. The upper and lower limits of the measurable signal value area S of the two standard concentration quantitative curves were plotted. The results are shown in Figure 2. Figure 16As shown, before the HDR algorithm, the range of test strips 5# to 34# could be measured, while after the HDR algorithm, the range was expanded to test strips 4# to 36#, demonstrating the effectiveness of the multi-exposure fusion HDR algorithm based on the target weight function for expanding the range of colloidal gold immunochromatography images. In addition, the linear measurement range of the standard concentration quantitative curve has also been significantly expanded.
[0152] In order to verify the applicability of the high dynamic range algorithm in this study, it was applied to the commercial handheld detector of Nadacon, such as Figure 17 The figure shows a comparison of standard concentration quantification curves before and after using a multi-exposure HDR algorithm based on a target weight function, with the handheld detector using the T / C value as the characteristic value. The experimental results show that the curve fit improves to 0.99907 after using the HDR algorithm, and the linear range also increases from 80-250 to 50-250 (grayscale value).
[0153] On the basis of the above embodiment, the influence of different numbers of multi-exposure photo sets on the T-line characteristic value in the HDR composite image is further considered. Specifically, the results of HDR synthesized by using 3 low-exposure photos, 3 high-exposure photos, and 3 different exposures (underexposure, normal, overexposure) are compared with the original 9 multi-exposure photo sets. The results show that the effect of HDR images synthesized using only 3 low-exposure photos or only 3 high-exposure photos is very poor, but when using one underexposure, one normal, and one overexposure, the same effect as 9 multi-exposure images can be achieved. The results are shown in Table 3. This is because the accuracy of the camera response function curve fitted under the standard grayscale color scale card is high enough, so that when synthesizing the test paper card HDR image, using 3 multi-exposure images can achieve good results. Therefore, by optimizing the number of exposure times, the speed of immune detection can be improved while ensuring image quality, which will be more efficient for testing large sample sizes.
[0154] Table 3 Comparison of T-line pixel values of different numbers of multi-exposure images after HDR algorithm
[0155] Based on the above verification results, when analyzing the actual concentration value of the test paper card, a multi-exposure image set consisting of one low-exposure image, one high-exposure image, and one image of varying exposures can be used to determine the actual concentration value of the test paper card based on the standard concentration quantitative curve with high precision and a wide dynamic detection range. This reduces the number of multi-exposure images acquired, improves detection speed and accuracy, and expands the analytical scope of colloidal gold immunochromatographic test strips.
[0156] Although the above scheme uses colloidal gold immunochromatographic test paper cards as an example, this method is also applicable to fluorescent immunochromatographic test paper cards and can effectively improve their detection performance.
[0157] In the process of restoring the camera response function of the image acquisition system, the embodiment of the present invention uses a piecewise weight function to adjust the weights of images with different exposures, accurately adjusts the fusion of multiple exposure images, and reduces the influence of over-exposure and under-exposure areas in the image on the fitting accuracy of the camera response function, so that the standard quantitative curve obtained by fitting fits the characteristics of the immunochromatographic S-shaped curve, obtains a wider brightness range at different exposure levels, effectively overcomes the limitation of loss of highlight or dark details in a single exposure image, and can significantly improve the accuracy of HDR image synthesis. It effectively reduces the influence of image noise and quantization errors, makes the synthesized immunochromatographic image closer to the real scene, and makes the analysis and detection results based on the immunochromatographic test strip card more accurate. It solves the technical problem that the dynamic range of photos in traditional HDR technology is limited, resulting in the immunochromatographic detector based on the image imaging principle having a narrow detection range, slow detection speed and low detection accuracy, and achieves improved detection speed and detection accuracy, and expands the scope of analysis and detection of immunochromatographic test strip cards.
[0158] Example 2
[0159] Based on the above embodiments, the present invention further provides an analysis and detection device based on a weight function and multi-exposure fusion, characterized in that it is used to perform the analysis and detection method as described in any one of the first embodiments, including:
[0160] An image acquisition module is used to shoot the paper card to be tested in a multi-exposure time sequence to obtain a multi-exposure image set of the paper card to be tested;
[0161] The concentration analysis and detection module is used to obtain the actual concentration value of the paper card to be tested based on the standard concentration quantitative curve, the multi-exposure image set of the paper card to be tested and the corresponding exposure time;
[0162] Wherein, the method for generating the standard concentration quantitative curve includes:
[0163] Capturing P multi-exposure time sequences of X standard immunochromatographic test strips of different concentrations to obtain a multi-exposure image set; dividing the multi-exposure image set into a first multi-exposure image set including images of X1 standard immunochromatographic test strips and a second multi-exposure image set including images of X2 standard immunochromatographic test strips; wherein P ≥ 3, X = X1 + X2;
[0164] Obtaining grayscale value changes of N pixels in the T-line region of each image in the first multi-exposure image set to obtain a grayscale value matrix of N×P pixels;
[0165] Construct the following piecewise weight function:
[0166]
[0167] Wherein, the function forms of f1(z) and f2(z) include linear function, quadratic polynomial function, exponential function or logarithmic function, and z1 and z2 are segmentation points;
[0168] Determining the functional forms of f1(z) and f2(z) and the segmentation points z1 and z2 that minimize the error between the average pixel value and the true pixel value in the T-line region, and obtaining a target segmentation weight function; calculating the average pixel value in the T-line region by: obtaining a camera response function based on the segmentation weight function and a grayscale value matrix; obtaining an HDR image based on the camera response function, a second multi-exposure image set, and corresponding exposure times; and performing tone mapping on the HDR image to obtain an average pixel value in the T-line region;
[0169] The target camera response function is obtained based on the target segment weight function combined with the gray value matrix;
[0170] According to the target camera response function, the multi-exposure image set of the standard immunochromatographic test strip card and the corresponding exposure time, the average pixel value of the T-line area of the standard immunochromatographic test strip card is obtained. The average pixel value of the T-line area of the standard immunochromatographic test strip card is fitted with the corresponding concentration to generate a standard concentration quantitative curve.
[0171] An analysis and detection device based on a weight function and multi-exposure fusion provided in an embodiment of the present invention is used to execute an analysis and detection method based on a weight function and multi-exposure fusion provided in any embodiment 1 of the present invention, and has corresponding functional modules and beneficial effects.
[0172] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An analysis and detection method based on weight function and multi-exposure fusion, characterized in that: include: Shooting the paper card to be tested in a multi-exposure time sequence to obtain a multi-exposure image set of the paper card to be tested; Obtaining the actual concentration value of the paper card to be tested according to the standard concentration quantitative curve, the multi-exposure image set of the paper card to be tested and the corresponding exposure time; The method for generating the standard concentration quantitative curve includes: S1. Capture P multi-exposure time sequences of X standard immunochromatographic test strips of different concentrations to obtain a multi-exposure image set; divide the multi-exposure image set into a first multi-exposure image set including images of X1 standard immunochromatographic test strips and a second multi-exposure image set including images of X2 standard immunochromatographic test strips; wherein P ≥ 3, X = X1 + X2; S2. Obtain grayscale value changes of N pixels in the T-line region of each image in the first multi-exposure image set to obtain a grayscale value matrix of N×P pixels; S3. Construct the following piecewise weight function: Wherein, the function forms of f1(z) and f2(z) include linear function, quadratic polynomial function, exponential function or logarithmic function, and z1 and z2 are segmentation points; S4. Determine the function forms of f1(z) and f2(z) and the segmentation points z1 and z2 that minimize the error between the average pixel value of the T-line region and the true pixel value, and obtain a target segmentation weight function; calculate the average pixel value of the T-line region by: obtaining a camera response function based on the segmentation weight function and a grayscale value matrix; obtaining an HDR image based on the camera response function, the second multi-exposure image set, and the corresponding exposure time; and perform tone mapping on the HDR image to obtain the average pixel value of the T-line region; S5. Obtain the target camera response function according to the target segment weight function combined with the gray value matrix; S6. According to the target camera response function, the multi-exposure image set of the standard immunochromatographic test strip card and the corresponding exposure time, the average pixel value of the T-line area of the standard immunochromatographic test strip card is obtained, and the average pixel value of the T-line area of the standard immunochromatographic test strip card is fitted with the corresponding concentration to generate a standard concentration quantitative curve.
2. The analysis and detection method according to claim 1, wherein The standard immunochromatographic test paper cards have different T line concentrations and the same C line concentration.
3. The analysis and detection method according to claim 1, wherein S2 specifically includes: S21, extracting a T-line region of each image in the first multi-exposure image set using an image segmentation algorithm; S22, vertically stitching the T-line regions of each image in order of concentration to obtain a guide image; S23 , obtaining grayscale value changes of N / X1 pixels in each T-line region in the guide image to obtain a grayscale value matrix of N×P pixels.
4. The analysis and detection method according to claim 1, wherein The error between the average pixel value and the true pixel value is the root mean square error RMSE and the mean absolute percentage error MAPE of the average pixel value of the T-line area and the true pixel value of the standard immunochromatographic test paper card.
5. The analysis and detection method according to claim 1, wherein S6 specifically includes: S61, obtaining an average pixel value of a T-line region of the standard immunochromatographic test strip card according to a target camera response function, a multi-exposure image set of the standard immunochromatographic test strip card, and corresponding exposure time; S62. With the average pixel value in S61 as the y-axis and the actual concentration of the standard immunochromatographic test paper card as the x-axis, a four-parameter logistic fit is used to obtain a standard concentration quantitative curve.
6. The analysis and detection method according to claim 1, wherein The standard immunochromatographic test paper cards include colloidal gold immunochromatographic cards and fluorescent immunochromatographic cards.
7. The analysis and detection method according to claim 1, wherein The multi-exposure image set covers underexposure to overexposure in different exposure time sequences.
8. The analysis and detection method according to claim 1, wherein After obtaining the multi-exposure image set, the method further includes: pre-processing the multi-exposure image set using a median filtering algorithm, a Gaussian filtering algorithm, a bilateral filtering algorithm or a guided filtering algorithm.
9. An analysis and detection device based on weight function and multi-exposure fusion, characterized in that: Used to perform the analysis and detection method according to any one of claims 1 to 8, comprising: An image acquisition module is used to shoot the paper card to be tested in a multi-exposure time sequence to obtain a multi-exposure image set of the paper card to be tested; The concentration analysis and detection module is used to obtain the actual concentration value of the paper card to be tested based on the standard concentration quantitative curve, the multi-exposure image set of the paper card to be tested and the corresponding exposure time; Wherein, the method for generating the standard concentration quantitative curve includes: Capturing P multi-exposure time sequences of X standard immunochromatographic test strips of different concentrations to obtain a multi-exposure image set; dividing the multi-exposure image set into a first multi-exposure image set including images of X1 standard immunochromatographic test strips and a second multi-exposure image set including images of X2 standard immunochromatographic test strips; wherein P ≥ 3, X = X1 + X2; Obtaining grayscale value changes of N pixels in the T-line region of each image in the first multi-exposure image set to obtain a grayscale value matrix of N×P pixels; Construct the following piecewise weight function: Wherein, the function forms of f1(z) and f2(z) include linear function, quadratic polynomial function, exponential function or logarithmic function, and z1 and z2 are segmentation points; Determining the functional forms of f1(z) and f2(z) and the segmentation points z1 and z2 that minimize the error between the average pixel value and the true pixel value in the T-line region, and obtaining a target segmentation weight function; calculating the average pixel value in the T-line region by: obtaining a camera response function based on the segmentation weight function and a grayscale value matrix; obtaining an HDR image based on the camera response function, a second multi-exposure image set, and corresponding exposure times; and performing tone mapping on the HDR image to obtain an average pixel value in the T-line region; The target camera response function is obtained based on the target segment weight function combined with the gray value matrix; According to the target camera response function, the multi-exposure image set of the standard immunochromatographic test strip card and the corresponding exposure time, the average pixel value of the T-line area of the standard immunochromatographic test strip card is obtained. The average pixel value of the T-line area of the standard immunochromatographic test strip card is fitted with the corresponding concentration to generate a standard concentration quantitative curve.
Citation Information
Patent Citations
Analysis and detection method and device based on multi-exposure and multi-brightness double parameters
CN119273604A