Analysis and detection method based on weighted Gaussian convolution brightness equalization algorithm

By applying the weighted Gaussian convolution brightness equalization algorithm to process sample images on smartphones, the problem of detection errors caused by uneven light sources is solved, the detection accuracy and efficiency are improved, and efficient sample quantification in on-site environments is achieved. analyze.

CN115035040BActive Publication Date: 2024-10-22JIANGSU UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210528417.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-16
Publication Date
2024-10-22
Estimated Expiration
2042-05-16

AI Technical Summary

Technical Problem

When a smartphone is used to detect samples under on-site ambient light, the uncertainty in the position of the light source causes uneven illumination on the surface of the sample, resulting in detection errors that are difficult to effectively solve with existing technology.

Method used

The sample image is processed using a brightness equalization algorithm based on weighted Gaussian convolution, and a convolution kernel is constructed by a Gaussian filter to convolve with the image brightness matrix to equalize the brightness threshold, repair the sample image metadata, and improve detection accuracy.

Benefits of technology

It effectively reduces the interference and errors caused by uneven light sources, improves the accuracy of analysis and detection, and completes sample quantitative detection within 6 minutes, significantly improving detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115035040B_ABST
    Figure CN115035040B_ABST
Patent Text Reader

Abstract

The present invention discloses an analysis and detection method based on a weighted Gaussian convolution brightness equalization algorithm, wherein the method uses a Gaussian filter brightness equalization algorithm to process a sample image to solve the detection error caused by uneven illumination of the sample surface. Compared with the prior art, the present invention has the following advantages: (1) The method aims at the problem of uneven illumination of the sample surface caused by unstable light source in the actual operating environment, and combines the weighted Gaussian convolution brightness equalization algorithm to perform equalization processing on the image brightness, thereby improving the accuracy of the analysis and detection, and minimizing the interference or error caused by uneven light source; (2) The method has high detection and analysis efficiency, and the time used to complete the entire sample quantification process is within 6 minutes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of detection and analysis, and relates to a method for detecting and analyzing a sample using a smart phone, specifically an analysis and detection method based on a weighted Gaussian convolution brightness equalization algorithm. Background Art

[0002] Gaussian filter is a linear smoothing filter that has been widely used in the field of computer image processing in recent years. Its convolution kernel is based on a two-dimensional Gaussian function. By convolving the Gaussian filter with the image, irrelevant noise can be eliminated to obtain an analytical image with a high signal-to-noise ratio.

[0003] In recent years, smartphone colorimetry has become an instant and rapid on-site sample detection technology, which is widely used in biology, chemistry, medicine, clinical and other fields. Smartphones have excellent imaging capabilities, which helps us to quickly obtain sample signals directly by shooting. However, the existing traditional laboratory detection methods have defects such as large detection equipment, high cost, and complex operation. They can usually only be used in laboratories and hospitals, which limits their application in resource-limited environments. Compared with traditional laboratory detection methods, smartphones have good portability, low cost, reliability, flexibility and other advantages. In the past few decades, smartphone-based detection systems have gradually become a miniaturized and inexpensive on-site detection and analysis platform.

[0004] However, under ambient light, due to the uncertainty of the light source position, smartphone colorimetric sample detection often faces the problem of uneven illumination on the sample surface, which can lead to serious quantitative errors. Therefore, in order to improve the accuracy of analytical detection, it is very important to develop a smartphone image brightness equalization algorithm for sample detection under ambient light. Summary of the invention

[0005] Technical problem to be solved: In order to overcome the shortcomings of the prior art, the present invention adopts a brightness equalization algorithm of a Gaussian filter to process sample images to solve the detection error caused by uneven illumination on the sample surface; in view of this, the present invention provides an analysis and detection method based on a weighted Gaussian convolution brightness equalization algorithm.

[0006] Technical solution: An analysis and detection method based on a weighted Gaussian convolution brightness equalization algorithm, the method comprising the following steps:

[0007] S1, adding the sample to be tested and the external standard quantitative solution dropwise onto the medium carrier;

[0008] S2, using a smartphone app to capture or retrieve sample image data locally;

[0009] S3. After obtaining the image data, the algorithm is called to perform global equalization processing on the image. The specific process of the algorithm is as follows:

[0010] a. The program automatically reads the RGB color value of the entire image and automatically converts it to the HSV color space, then automatically constructs the brightness matrix of the entire image and constructs the convolution kernel through the Gaussian function;

[0011] b. Use the Gaussian convolution kernel and the image brightness matrix to perform image convolution (filtering) to smooth the image brightness information;

[0012] c. Perform overall brightness threshold equalization based on the brightness matrix after image convolution (filtering), and then repair the sample image metadata in turn to complete the brightness equalization process;

[0013] The above equalization processing is completed automatically in the background and the new image results are output. Finally, the results of the background calculation are output on the program screen for users to retrieve.

[0014] S4. Calculate the sample detection result based on the image data after equalization processing.

[0015] Preferably, the external standard quantitative solution in S1 is a standard solution of known concentration with a color gradient change, and the volume of the external standard quantitative solution can be 50 μL.

[0016] Preferably, the operating system of the smartphone in S2 is Android, HarmonyOS or IOS.

[0017] Preferably, the Gaussian function in S3 is:

[0018]

[0019] Among them, F(x,y) represents the Gaussian convolution kernel, x,y represent the coordinates of each pixel point, C is the normalization constant, and the values ​​of σ are 20, 72, and 250 respectively.

[0020] Preferably, the model used for brightness threshold equalization in S3 is:

[0021] N (x,y) =V (x,y) k

[0022]

[0023] Among them, N (x,y) Represents the brightness value at the coordinate (x, y) after algorithm equalization, V (x,y) Represents the brightness value after Gaussian filtering at the coordinate (x, y), V avgRepresents the overall brightness average of the image after Gaussian filtering, k is the equalization index, and u is the threshold value, which is 0 <u<1。

[0024] Preferably, the value of u is selected according to the deviation of the on-site light source. The closer the threshold is to 0, the stronger the algorithm effect is, and the closer the threshold is to 1, the weaker the algorithm effect is.

[0025] Preferably, the image data acquisition method in S2 includes a mobile phone camera, a system camera called in a program, a camera of other devices, or a picture transmitted through a medium.

[0026] Preferably, the programming language used for algorithm development in S3 is Java / Android.

[0027] Preferably, the output format of the image after equalization processing in S3 is Bitmap, and the output file type is JPEG.

[0028] Preferably, the method takes less than 6 minutes to complete the entire sample quantification process.

[0029] The principle of designing the method described in the present invention is that an analysis and detection method based on a weighted Gaussian convolution brightness equalization algorithm is designed based on smartphone colorimetry combined with Retinex theory and MSRCR-algorithm.

[0030] Beneficial effects: (1) The method aims to solve the problem of uneven illumination on the sample surface caused by unstable light source in the actual operating environment, and combines the weighted Gaussian convolution brightness equalization algorithm to equalize the image brightness, thereby improving the accuracy of analysis and detection, and minimizing the interference or error caused by uneven light source; (2) The method has high detection and analysis efficiency, and the time taken to complete the entire sample quantification process is within 6 minutes. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is a flow chart of the method of the present invention;

[0032] Figure 2 is the actual sample image, where the 1st to 3rd rows are parallel actual samples Sample 1-3 of different concentrations, and the 4th row is the external standard quantitative solution. The solution concentrations from right to left are 0μg / mL, 5μg / mL, 10μg / mL, 25μg / mL, 50μg / mL, and 100μg / mL;

[0033] Figure 3 is the standard curve before using the algorithm; the ordinate is the ratio of G (green) value to V (brightness) value, and the abscissa is the concentration of the standard sample, where R 2 =0.9948;

[0034] Figure 4It is the standard curve after the algorithm is balanced; the ordinate is the ratio of G (green) value to V (brightness) value, and the abscissa is the concentration of the standard sample, where R 2 =0.9951;

[0035] Figure 5 is a set of parallel sample graphs. DETAILED DESCRIPTION

[0036] The following examples further illustrate the content of the present invention, but should not be construed as limiting the present invention. Without departing from the spirit and essence of the present invention, modifications and substitutions made to the method, steps or conditions of the present invention all belong to the scope of the present invention. Unless otherwise specified, the technical means used in the examples are conventional means well known to those skilled in the art.

[0037] Example 1

[0038] Taking the analysis and detection of rheum officinale samples as an example, the process of the method is as follows Figure 1 First, prepare the emodin sample and standard; add the external standard quantitative solution dropwise to the chip pool according to the concentration gradient, as shown in Figure 2 As shown, the concentration gradient from right to left is 0μg / mL, 5μg / mL, 10μg / mL, 25μg / mL, 50μg / mL, and 100μg / mL. The selection of rhubarb samples covers three concentrations: low, medium, and high. Each group of samples was dripped in 6 portions in parallel, and the volume of each drip was 50μL.

[0039] After the addition is complete, use a smartphone to take a picture of the sample and insert it into the program. At this point, the program will automatically extract the image information and complete the preparations required by the algorithm. Quantitative analysis of the sample image that has not been processed by the equalization algorithm is performed. At this time, the standard curve is as follows Figure 3 The results are shown in Tables 1-4.

[0040] Table 1 Actual measurement results of the external standard quantitative solution before using the algorithm

[0041]

[0042] Table 2 Actual measurement results of Sample 1 before using the algorithm

[0043]

[0044] Table 3 Actual measurement results of Sample 2 before using the algorithm

[0045]

[0046]

[0047] Table 4 Actual measurement results of Sample 3 before using the algorithm

[0048]

[0049] Click the equalization algorithm button, and the program background will automatically execute the weighted Gaussian convolution brightness equalization algorithm. During this process, the user can continue to perform other operations. After the algorithm is completed, a new output image will be automatically generated. The user can directly use this image to complete the subsequent quantification. The image processed by the algorithm is quantified. The standard curve is as follows Figure 4 The results are shown in Table 5-8.

[0050] Table 5 Actual measurement results of the external standard quantitative solution after algorithm equalization

[0051]

[0052] Table 6 Actual measurement results of Sample 1 after algorithm equalization

[0053]

[0054]

[0055] Table 7 Actual measurement results of Sample 2 after algorithm equalization

[0056]

[0057] Table 8 Actual measurement results of Sample 3 after algorithm equalization

[0058]

[0059] The results showed that the accuracy of the quantitative results of the processed images was significantly improved, and the results were compared with those from the UV-visible spectrophotometer (Table 9).

[0060] Table 9 Results of samples measured using UV-Vis spectrophotometer

[0061]

[0062] Finally, this example also tested a group of parallel samples before and after the algorithm processing of the parallel sample RSD situation, the results are shown in Table 10, the sample diagram is shown in Figure 5 ,The result data show that the RSD of the parallel samples processed by our ,algorithm is significantly better than that of the unprocessed samples.

[0063] Table 10 Comparison of RSD of quantitative results before and after equalization

[0064] Before calibration After correction 0.04903 0.0396 0.05276 0.03486 0.03409 0.02574

Claims

1. An analysis and detection method based on a weighted Gaussian convolution brightness equalization algorithm, characterized in that: The method comprises the following steps: S1, adding the sample to be tested and the external standard quantitative solution dropwise onto the medium carrier; S2, using a smartphone app to capture or retrieve sample image data locally; S3. After obtaining the image data, the algorithm is called to perform global equalization processing on the image. The specific process of the algorithm is as follows: a. The program automatically reads the RGB color value of the entire image and automatically converts it to the HSV color space, then automatically constructs the brightness matrix of the entire image and constructs the convolution kernel through the Gaussian function; b. Use the Gaussian convolution kernel and the image brightness matrix to perform image convolution to smooth the image brightness information; c. Perform overall brightness threshold equalization based on the brightness matrix after image convolution, and then repair the sample image metadata in turn to complete the brightness equalization process; S4, calculating the sample detection result according to the image data after equalization processing; Among them, the model used for brightness threshold equalization in S3 is: N (x,y) =V (x,y) k Among them, N (x,y) Represents the brightness value at the coordinate (x, y) after algorithm equalization, V (x,y) Represents the brightness value after Gaussian filtering at the coordinate (x, y), V avg Represents the overall brightness average of the image after Gaussian filtering, k is the equalization index, and u is the threshold value, which is 0 <u<1。 2. The analysis and detection method based on the weighted Gaussian convolution brightness equalization algorithm according to claim 1 is characterized in that: The external standard quantitative solution in S1 is a standard solution of known concentration with a color gradient change.

3. The analysis and detection method based on the weighted Gaussian convolution brightness equalization algorithm according to claim 1 is characterized in that: The operating system of the smartphone in S2 is Android, HarmonyOS or IOS.

4. The analysis and detection method based on the weighted Gaussian convolution brightness equalization algorithm according to claim 1 is characterized in that: The Gaussian function in S3 is: Among them, F(x,y) represents the Gaussian convolution kernel, x,y represent the coordinates of each pixel point, C is the normalization constant, and the values ​​of σ are 20, 72, and 250 respectively.

5. The analysis and detection method based on the weighted Gaussian convolution brightness equalization algorithm according to claim 1 is characterized in that: The value of u is selected according to the deviation of the on-site light source. The closer the threshold is to 0, the stronger the algorithm effect is, and the closer the threshold is to 1, the weaker the algorithm effect is.

6. The analysis and detection method based on the weighted Gaussian convolution brightness equalization algorithm according to claim 1, characterized in that: The image data acquisition methods in S2 include mobile phone cameras, system cameras called in the program, cameras of other devices, or pictures transmitted through media.

7. The analysis and detection method based on the weighted Gaussian convolution brightness equalization algorithm according to claim 1, characterized in that: The programming language used for algorithm development in S3 is Java / Android.

8. The analysis and detection method based on the weighted Gaussian convolution brightness equalization algorithm according to claim 1, characterized in that: The output format of the image after equalization processing in S3 is Bitmap, and the output file type is JPEG.

9. The analysis and detection method based on the weighted Gaussian convolution brightness equalization algorithm according to claim 1, characterized in that: The method takes less than 6 minutes to complete the entire process of sample quantification.