A method for detecting water sample concentration
By scanning the standard concentration colorimetric card, color card, and reagent tubes of the rapid test kit (test strip) and calculating the regression curve, the problem of inaccurate water sample concentration readings caused by subjective factors of the human eye was solved, and more accurate water sample concentration detection was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA NORTHEAST MUNICIPAL ENGINEERING DESIGN AND RESEARCH INSTITUTE CO LTD
- Filing Date
- 2022-12-27
- Publication Date
- 2026-06-26
AI Technical Summary
The readings of existing rapid test kits (test strips) are affected by subjective factors of the human eye, making it difficult to accurately determine the concentration value of water samples, especially when the colors of the standard concentration and the color scale concentrations are similar.
By scanning the standard concentration colorimetric card, color card, first reagent tube and second reagent tube, the color characteristic values are read, a regression curve between the color characteristic values and the concentration is generated, and the water sample concentration value is calculated using the regression curve.
This improves the accuracy of rapid test kit (test strip) readings, enabling more precise acquisition of water sample concentration values and resolving the inaccuracy issues caused by subjective factors of the human eye.
Smart Images

Figure CN116223487B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of environmental sample testing, and in particular to a method for detecting water sample concentration. Background Technology
[0002] Rapid test kits (test strips) mainly consist of a standard concentration colorimetric card and test reagents. By adding the test reagents to the water sample within a certain temperature range (generally 10℃~30℃), and after a specified reaction time between the water sample temperature and the specific reagents, water samples of different concentrations will show specific colors. On the standard concentration colorimetric card, the concentrations of different detection indicators correspond one-to-one with the colors. By visually comparing the water sample color with the matching standard concentration colorimetric card, the concentration range of the detection indicators in the water quality sample can be quickly determined.
[0003] However, the human eye is limited by subjective factors and can only visually compare a general range. Even when the colors corresponding to the standard concentration color chart steps are similar, the human eye has difficulty distinguishing them.
[0004] Therefore, how to improve the readings of rapid test kits (test strips) is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a method for detecting water sample concentration, which can obtain more accurate water sample concentration values, thereby improving the readings of rapid detection kits (test strips). The specific solution is as follows:
[0006] A method for detecting water sample concentration, comprising:
[0007] Receive scanned images obtained by simultaneously scanning a standard concentration colorimetric card, a color card, a first reagent tube containing a water sample, and a second reagent tube containing a standard substance of known concentration.
[0008] Read the color feature values of the standard concentration colorimetric card, the color card, the first reagent tube, and the second reagent tube corresponding to the scanned image, respectively;
[0009] Based on the read color feature values, a regression curve is generated between the color feature values and the concentration.
[0010] The water sample concentration value is obtained by using the color characteristic value of the first reagent tube based on the regression curve.
[0011] Preferably, in the water sample concentration detection method provided in the embodiments of the present invention, before receiving the scanned image, the method further includes:
[0012] Based on the relationship between temperature and reaction time specified in the kit, the corresponding reaction time is calculated using linear interpolation or linear regression, so that the water sample is added to the first reagent tube and the standard substance of known concentration is added to the second reagent tube while waiting for the reaction time.
[0013] Preferably, in the water sample concentration detection method provided in the embodiments of the present invention, before receiving the scanned image, the method further includes:
[0014] A color card and a grayscale card are created to form the color card; the color card is made by dividing the two-dimensional hue and saturation graph into multiple blocks at a brightness of 127; the grayscale card is made by dividing the brightness bar of the WPS color picker into multiple blocks.
[0015] Preferably, in the water sample concentration detection method provided in the embodiments of the present invention, generating a regression curve between the color feature value and the concentration based on the read color feature value includes:
[0016] By using the relationship between the brightness of the scanned image of the grayscale card and the actual brightness of the grayscale card, and combining the brightness of the scanned images of the first reagent tube and the second reagent tube, the actual brightness of the first reagent tube and the second reagent tube is checked, and the concentration range of the water sample concentration on the standard concentration colorimetric card is found.
[0017] Based on the identified concentration region, the color feature values of the scanned image of the second reagent tube, and the known concentration values, a regression curve between the color feature values and the concentration is generated.
[0018] Preferably, in the water sample concentration detection method provided in the embodiments of the present invention, the relationship between the brightness of the scanned image of the grayscale card and the actual brightness of the grayscale card is used, combined with the brightness of the scanned images of the first reagent tube and the second reagent tube, to verify the actual brightness of the first reagent tube and the second reagent tube, and to find the concentration range of the water sample concentration on the standard concentration colorimetric card, including:
[0019] The brightness of the scanned image of the grayscale card is compared with the actual brightness of the grayscale card using linear, exponential, logarithmic, and power regressions to obtain the first regression equation.
[0020] Substitute the brightness of the scanned images of the first reagent tube and the second reagent tube into the first regression equation to obtain the actual brightness of the first reagent tube and the second reagent tube;
[0021] Determine whether the obtained actual brightness is within the set range; if so, find the water sample concentration range based on the obtained actual brightness and the concentration of the second reagent tube; if not, increase the obtained actual brightness by the set value, and find the concentration range of the water sample on the standard concentration colorimetric card based on the increased brightness and the concentration of the second reagent tube.
[0022] Preferably, in the water sample concentration detection method provided in the embodiments of the present invention, before generating the regression curve of color feature values and concentration, the method further includes:
[0023] The second regression equation is obtained by performing linear, exponential, logarithmic, and power regressions on the hue of the scanned image of the color card and the actual hue of the color card.
[0024] Determine whether the correlation coefficient of the second regression equation is greater than 0.98; if not, repeat the steps of adding water sample to the first reagent tube and adding standard substance of known concentration to the second reagent tube; if yes, perform the step of generating regression curve of color feature value and concentration.
[0025] Preferably, in the water sample concentration detection method provided in the embodiments of the present invention, after determining that the correlation coefficient of the second regression equation is greater than 0.98, the method further includes:
[0026] The hue of the scanned image of the second reagent tube and the hue of the scanned image of the standard concentration colorimetric card are subjected to linear, exponential, logarithmic, and power regressions to obtain the third regression equation;
[0027] Determine whether the correlation coefficient of the third regression equation is greater than 0.99; if not, repeat the steps of adding water sample to the first reagent tube and adding standard substance of known concentration to the second reagent tube; if yes, perform the step of generating regression curve of color feature value and concentration.
[0028] Preferably, in the water sample concentration detection method provided in the embodiments of the present invention, based on the obtained water sample concentration region, a regression curve of color feature value and concentration is generated by reading the color feature value of the scanned image of the second reagent tube and the known concentration value, including:
[0029] Within the obtained water sample concentration range, the hue, brightness, or color difference of the scanned image of the second reagent tube are subjected to linear, exponential, logarithmic, power, and quadratic binomial regressions with the known concentration values, respectively, to generate multiple regression curves between color feature values and concentration.
[0030] Preferably, in the water sample concentration detection method provided in the embodiments of the present invention, the water sample concentration value is obtained based on the regression curve and using the color feature value of the first reagent tube, including:
[0031] From the multiple regression curves produced, the regression curve with the largest correlation coefficient and the smallest residual difference between the concentration points at both ends of the water sample is selected as the optimal regression curve.
[0032] The water sample concentration value is calculated using the color characteristic value of the first reagent tube in the optimal regression curve.
[0033] Preferably, in the water sample concentration detection method provided in the embodiments of the present invention, the known concentration value of the second reagent tube corresponds to at least four concentration points in the standard concentration colorimetric card; wherein, zero concentration and the highest concentration are mandatory.
[0034] As can be seen from the above technical solution, the water sample concentration detection method provided by the present invention includes: receiving scanned images obtained by simultaneously scanning a standard concentration colorimetric card, a color card, a first reagent tube containing a water sample, and a second reagent tube containing a standard substance of known concentration; reading the color feature values of the corresponding standard concentration colorimetric card, color card, first reagent tube, and second reagent tube in the scanned images; generating a regression curve between the color feature values and the concentration based on the read color feature values; and obtaining the water sample concentration value using the color feature value of the first reagent tube based on the regression curve.
[0035] The water sample concentration detection method provided by this invention firstly scans and photographs the standard concentration colorimetric card, color card, first reagent tube, and second reagent tube simultaneously, then reads the color characteristic values of the standard concentration colorimetric card, color card, first reagent tube, and second reagent tube respectively, and finally generates a regression curve. This step can obtain a more accurate water sample concentration value, thereby improving the reading of the rapid detection kit (test strip) and solving the problem that the human eye is limited by subjective factors and can only obtain an approximate concentration range of the water sample. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0037] Figure 1 A flowchart of a water sample concentration detection method provided in an embodiment of the present invention;
[0038] Figure 2 This is a schematic diagram illustrating the relationship between water sample temperature and reading time provided in an embodiment of the present invention.
[0039] Figure 3A schematic diagram illustrating the relationship between the scanned image brightness of a grayscale card and the actual brightness of the grayscale card, provided in an embodiment of the present invention;
[0040] Figure 4 A schematic diagram illustrating the relationship between the hue of the scanned image of a color card and the actual hue of the color card, provided in an embodiment of the present invention;
[0041] Figure 5 A schematic diagram illustrating the relationship between the hue of the scanned image of the second reagent tube provided in an embodiment of the present invention and the hue of the scanned image of the standard concentration colorimetric card;
[0042] Figure 6 The regression curve obtained by linear regression is provided in the embodiment of the present invention;
[0043] Figure 7 The regression curve obtained by logarithmic regression is provided in the embodiment of the present invention;
[0044] Figure 8 The regression curve obtained by quadratic binomial regression is provided in an embodiment of the present invention. Detailed Implementation
[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0046] This invention provides a method for detecting water sample concentration, such as... Figure 1 As shown, it includes the following steps:
[0047] S101. Receive the scanned images obtained by simultaneously scanning a standard concentration colorimetric card, a color card, a first reagent tube containing a water sample, and a second reagent tube containing a standard substance of known concentration.
[0048] In practical applications, before performing step S101, the following steps may be included: measuring the water sample temperature with a water thermometer (or other temperature detection device); if the water sample temperature is not within the detection temperature range of the kit, adjusting the water sample temperature using a water bath (e.g., using a constant temperature water bath heating instrument with temperature control at 0.1℃); detecting the pH of the water sample using a rapid pH detection device (e.g., precision test paper or small device); if the pH of the water sample exceeds the pH range required by the kit, placing the water sample on a magnetic stirrer to adjust the pH of the water sample.
[0049] After adjusting the pH of the water sample, if the temperature of the water sample is lower than the minimum temperature required by the kit, place the water sample back into the constant temperature water bath and heat it to the temperature range required by the kit, which is generally 10℃~30℃, with 20℃ being the most suitable.
[0050] In specific implementation, before performing step S101, the following may also be included: finding the kit temperature and reaction time instructions, and calculating the reaction time corresponding to the water sample temperature using linear interpolation or linear regression based on the relationship between the temperature and reaction time specified in the kit, so that the water sample is added to the first reagent tube and the standard substance of known concentration is added to the second reagent tube while waiting for the reaction time.
[0051] Specifically, after adjusting the water sample temperature and pH, and calculating the reaction time, the water sample can be added to the first reagent tube according to the instructions of the rapid test kit. Shake the sample to ensure that the water sample in the first reagent tube develops color and there is no obvious sediment. Then, depending on the water sample temperature, the reaction time corresponding to the water sample temperature needs to be strictly waited for. A stopwatch with a timing function can be used for this operation.
[0052] Similarly, according to the instructions of the rapid test kit, a standard substance of known concentration can be added to the second reagent tube. Shake the sample to ensure the liquid in the second reagent tube develops color and there is no obvious precipitate. Then, depending on the liquid temperature, the reaction time corresponding to that temperature must be strictly observed. A stopwatch with a timing function can be used for this operation. Preferably, the known concentration values of the second reagent tube can be selected from at least four concentration points on a standard concentration colorimetric chart; among them, the zero concentration and the highest concentration must be selected, and two to five intermediate concentrations can be selected. That is, prepare standard substances of corresponding concentrations based on each selected concentration point and add them to each second reagent tube.
[0053] In practical implementation, this invention can simultaneously scan and photograph the standard concentration colorimetric card, color card, first reagent tube, and second reagent tube containing a standard substance of known concentration using a vertical scanner, mobile phone scanning software, etc., with a scanning resolution of no less than 5 megapixels. The standard concentration colorimetric card, color card, first reagent tube, and second reagent tube can be placed in the central area of the vertical scanner. The scanned images are then uploaded to a WPS computer.
[0054] S102. Read the color feature values of the corresponding standard concentration colorimetric card, color card, first reagent tube and second reagent tube in the scanned image respectively;
[0055] Specifically, the WPS color picker on a computer can be used to read the color characteristic values of the corresponding standard concentration colorimetric card, color card, first reagent tube, and second reagent tube from the scanned image. These color characteristic values can include hue H (tone U) (original or corrected value), luminance L, and color difference. (where S represents saturation), etc. It should be noted that the color sample should be taken from the center of the tube where the liquid is most saturated (due to the inconsistent liquid thickness within the same reagent tube, the HSL will vary significantly depending on the sampling location).
[0056] S103. Based on the read color feature values, create a regression curve between the color feature values and the concentration;
[0057] S104. Based on the regression curve, the water sample concentration value is obtained using the color characteristic value of the first reagent tube.
[0058] In the water sample concentration detection method provided in the embodiments of the present invention, the steps of firstly scanning and photographing the standard concentration colorimetric card, color card, first reagent tube and second reagent tube simultaneously, then reading the color characteristic values of the standard concentration colorimetric card, color card, first reagent tube and second reagent tube respectively, and finally generating a regression curve, can obtain a more accurate water sample concentration value, thereby improving the reading of the rapid detection kit (test strip) and solving the problem that the human eye is limited by subjective factors and can only obtain a general range of water sample concentration.
[0059] In specific implementation, the water sample concentration detection method provided in the above embodiments of the present invention may further include, before performing step S102 to scan and take pictures, the following steps: making a color card and a grayscale card to form a color card; the color card is made by dividing the two-dimensional image of hue and saturation into multiple blocks when the brightness is 127, as shown in Table 1; the grayscale card is made by dividing the brightness bar of the WPS color picker into multiple blocks, as shown in Table 2.
[0060] Table 1 Color Card
[0061]
[0062]
[0063] Table 2 Grayscale Card
[0064]
[0065] It should be noted that in the WPS color picker, the color mode HSL includes three color feature values: hue (H, or tint U) (original or corrected value), saturation (S), and brightness (L). H and S are controlled by a two-dimensional color graph, while L is controlled by a brightness bar. Preferably, the color card in this invention corresponds to a brightness of 127 (the optimal brightness for human visual perception). The hue (H) and saturation (S) two-dimensional graphs are divided into 42 blocks, and the grayscale card divides the WPS color picker's brightness bar into 7 blocks, facilitating verification and correction work after image acquisition.
[0066] In a specific implementation, in the water sample concentration detection method provided in the embodiments of the present invention, step S104, based on the read color feature values, generates a regression curve between the color feature values and the concentration. Specifically, this may include: using the relationship between the brightness of the scanned image of the grayscale card and the actual brightness of the grayscale card, and combining the brightness of the scanned images of the first and second reagent tubes, verifying the actual brightness of the first and second reagent tubes, and finding the concentration region of the water sample on the standard concentration colorimetric card; and generating a regression curve between the color feature values and the concentration based on the found concentration region, the color feature values of the scanned image of the second reagent tube, and the known concentration values.
[0067] Furthermore, in specific implementation, in the water sample concentration detection method provided in the embodiments of the present invention, the above steps utilize the relationship between the brightness of the scanned image of the grayscale card and the actual brightness of the grayscale card, combined with the brightness of the scanned images of the first and second reagent tubes, to verify the actual brightness of the first and second reagent tubes, and to find the concentration range of the water sample concentration on the standard concentration colorimetric card. Specifically, this may include:
[0068] The brightness of the scanned image of the grayscale card is compared with the actual brightness of the grayscale card using linear, exponential, logarithmic, and power regressions to obtain the first regression equation. In practical applications, either exponential or logarithmic regression can be chosen.
[0069] Substitute the brightness of the scanned images of the first and second reagent tubes into the first regression equation to obtain the actual brightness of the first and second reagent tubes.
[0070] Determine whether the obtained actual brightness is within the set range; if so, find the water sample concentration range based on the obtained actual brightness and the concentration of the second reagent tube; if not, increase the obtained actual brightness by the set value, and find the concentration range of the water sample on the standard concentration colorimetric card based on the increased brightness and the concentration of the second reagent tube.
[0071] It should be noted that the above steps describe the specific process of verifying the brightness L of the reagent tube using a grayscale card. The actual brightness of the grayscale card ranges from 0 to 255. A regression curve can be plotted based on the actual brightness of the reagent tube to obtain the optimal correlation coefficient, with at least 5 points. After verifying the brightness of the reagent tube, locate the precise position of the water sample within the concentration range. If the brightness is unclear, increase the set value (e.g., 42 or 85) after the brightness verification.
[0072] In specific implementation, the water sample concentration detection method provided in the embodiments of the present invention may further include the following steps before performing step S104 to generate a regression curve of color feature values and concentration:
[0073] The second regression equation is obtained by performing linear, exponential, logarithmic, and power regressions between the hue of the scanned image of the color card and the actual hue of the color card. In practical applications, either exponential or logarithmic regression can be chosen.
[0074] Determine if the correlation coefficient of the second regression equation is greater than 0.98; if not, repeat the steps of adding the water sample to the first reagent tube and adding the standard substance of known concentration to the second reagent tube; if yes, repeat the steps of generating the regression curve of color feature value and concentration.
[0075] Furthermore, if the correlation coefficient of the second regression equation is greater than 0.98, linear, exponential, logarithmic, and power regressions can be performed between the hue of the scanned image of the second reagent tube and the hue of the scanned image of the standard concentration colorimetric card to obtain the third regression equation; in practical applications, either exponential or logarithmic regression can be chosen.
[0076] Determine if the correlation coefficient of the third regression equation is greater than 0.99; if not, repeat the steps of adding the water sample to the first reagent tube and adding the standard substance of known concentration to the second reagent tube; if yes, repeat the steps of generating the regression curve of color feature value and concentration.
[0077] It should be noted that the above steps are the specific process for verifying the scanned hue H. Linear, exponential, logarithmic, and power regressions can be performed between the hue of the scanned image of the color card and the actual hue of the color card, with coefficients greater than 0.98. Similarly, linear, exponential, logarithmic, and power regressions can be performed between the hue of the scanned image of the second reagent tube and the hue of the scanned image of the standard concentration colorimetric card, with coefficients greater than 0.99.
[0078] In addition, to further improve the accuracy of the test results, after determining that the correlation coefficient of the second regression equation is greater than 0.99, it is also possible to determine whether the hue difference of the colors involved in the color development of the reagent tubes in the color card is less than 10, that is, ΔH0 < 10, ΔH 42 <10、△H 85 <10、△H 127 <10、△H 162 <10、△H 212 <10; if not, repeat the steps of adding water sample to the first reagent tube and adding standard substance of known concentration to the second reagent tube; if yes, perform the step of generating regression curve of color characteristic value and concentration.
[0079] In a specific implementation, in the water sample concentration detection method provided in the embodiments of the present invention, based on the obtained water sample concentration region, the color feature values of the scanned image of the second reagent tube and the known concentration values are used to create a regression curve of color feature values and concentration. This may include: within the obtained water sample concentration region, the hue H, saturation S, brightness L, or color difference of the scanned image of the second reagent tube are used to... Perform linear, exponential, logarithmic, power, and quadratic binomial regressions with known concentration values to generate regression curves for multiple color feature values and concentrations.
[0080] In specific implementation, in the water sample concentration detection method provided in the embodiments of the present invention, the water sample concentration value is obtained by using the color feature value of the first reagent tube according to the regression curve, including: finding the regression curve with the largest correlation coefficient (correlation coefficient not less than 0.99) and the smallest residual difference between the concentration points at both ends of the water sample as the optimal regression curve (the curve points shall not be less than 3 points); and calculating the water sample concentration value using the color feature value of the first reagent tube in the optimal regression curve.
[0081] The following is a specific example illustrating the water sample concentration detection method provided in this embodiment of the invention. The specific steps are as follows:
[0082] Step 1: Adjust the water sample temperature to 15℃ and the pH to 7.
[0083] Step 2: Following the rapid test kit requirements, the reaction time is 6 minutes at 10℃, 5 minutes at 20℃, and 4 minutes at 30℃. This will allow you to prepare the test kit. Figure 2 The graph shows the relationship between water sample temperature and reading time. At the start of the water sample testing, the water sample temperature was measured at 15℃ using a thermometer. Figure 2 As shown, the optimal reaction time calculated using this method is 5 minutes and 30 seconds.
[0084] Step 3: Select 0 mg / L, 30 mg / L, 60 mg / L, and 250 mg / L from the concentration colorimetric card, and prepare reagent tubes together with water samples A and B. Scan the tubes with a mobile phone to obtain images and upload them to the computer. The 0 mg / L, 30 mg / L, 60 mg / L, and 250 mg / L solutions from the concentration colorimetric card were prepared by single dilution using a 1000 mg / L permanganate index standard solution (Tanmo BW20004-1000-W-50).
[0085] Step 4: Use the WPS color picker in Start - Font Color - Color Picker. See Tables 3 through 6 for the results.
[0086] Table 3
[0087] reagent tube 0mg / L 30mg / L 60mg / L 250mg / L Water sample A Water sample B H 204 153 115 6 177 135 S 255 255 255 178 208 255 L 30 2 6 53 5 8
[0088] Table 4
[0089] Concentration colorimetric card 0mg / L 30mg / L 60mg / L 250mg / L H 222 144 97 24 S 98 133 228 228 L 63 21 28 96
[0090] Table 5
[0091]
[0092]
[0093] Table 6
[0094] Grayscale card actual L 0 42 85 127 162 212 255 Scan grayscale card L 6 12 32 85 142 175 255
[0095] Step 5: Check the brightness. If the test is successful, locate the specific concentration ranges for water sample A and water sample B. Figure 3 The graph shows the relationship between the brightness of the scanned image of the grayscale card and the actual brightness of the grayscale card. The brightness range of the reagent tubes is 2-53. To obtain the optimal correlation coefficient for grayscale calibration, the actual brightness range of 0-162 was selected for the regression equation. Table 7 shows the brightness of the scanned images of the first and second reagent tubes, the calibrated brightness, and the brightness after increasing the set value.
[0096] Table 7
[0097] reagent tube 0 mg / L 30mg / L 60mg / L 250mg / L Water sample A Water sample B L 30 2 6 53 5 8 L verification 10 6 6 17 6 7 L verification +85 95 91 91 102 91 92
[0098] It should be noted that the colors of the kit were initially unclear. After adjustment, colorimetric analysis revealed that sample A was between 0 and 30 mg / L, and sample B was between 30 and 60 mg / L.
[0099] Step 6: Examine the scanned hue H. Figure 4 The graph shows the relationship between the hue H of the scanned image of the color card and the actual hue H of the color card, where the correlation coefficient is 0.98853 > 0.98. Figure 5 The graph shows the relationship between the hue H of the scanned image of the second reagent tube and the hue H of the scanned image of the standard concentration colorimetric card, where the correlation coefficient is 0.99564 > 0.99.
[0100] Next, we can determine whether the hue difference of the colors involved in the reagent tube color development in the color card is less than 10. The specific results are shown in Table 8.
[0101] Table 8
[0102]
[0103] It is understandable that in the HSL color space, the physical meaning of H is the color angle of the human eye when viewing a color, which is 0-360°. In WPS, H is represented by a value of 0-255. Therefore, 251 = 251 - 255 = -4, and the value of 255 is equivalent to a 360° angle.
[0104] Step 7: Using the hue H of the reagent tube, plot a regression curve against the actual concentration. Use linear, exponential, logarithmic, power, and quadratic binomial functions to find the set of parameters with the largest correlation coefficient and the smallest residual difference. This set of parameters is considered the optimal regression curve, and the correlation coefficient should not be lower than 0.99. After selecting the optimal regression curve, calculate the concentration value of the water sample from the reagent tube.
[0105] When selecting curves, linear correlation coefficients are all less than 0.99 and are not considered. For exponential (logarithmic) and quadratic binomial correlation coefficients > 0.99, the residual difference between the two ends of the curve where the sample is located is compared, and the curve with the smaller residual difference is the best curve.
[0106] For water sample A, which ranges from 0 to 30 mg / L, the correlation coefficient of the quadratic binomial regression equation (0 mg / L, 30 mg / L, 60 mg / L, 250 mg / L) with concentration C on H is the largest, at 0.99969, which is the largest among all curves. The residual differences between the two concentration points of water sample A at 0 mg / L and 30 mg / L are 2.61 mg / L and 2.73 mg / L, respectively, which are the smallest among all curves. The final calculated concentration value of water sample A is 12.3 mg / L.
[0107] For water sample B, which has a concentration between 30 and 60 mg / L, the correlation coefficient of the quadratic binomial regression equation (0 mg / L, 30 mg / L, 60 mg / L, 250 mg / L) with concentration C is the largest, at 0.99969, which is the largest among all curves. The residual differences between the two concentration points of water sample B at 0 mg / L and 30 mg / L are the smallest among all curves, at 2.73 mg / L and 3.22 mg / L, respectively. The final calculated concentration value of water sample B is 42.43 mg / L.
[0108] The specific data for plotting the regression curve of reagent tube hue H against actual concentration and selecting the optimal curve are shown in Tables 9 and 10. Figure 6 The regression curve obtained through linear regression is shown. Figure 7 The regression curve obtained by logarithmic regression is shown. Figure 8 The regression curve obtained by quadratic binomial regression is shown.
[0109] Table 9
[0110] reagent tube H 204 153 115 6 reagent tube concentration 0 30 60 250
[0111] Table 10
[0112]
[0113]
[0114] It should be noted that water samples A and B are known water samples prepared using the permanganate index standard liquid, with actual concentrations of 10 mg / L and 40 mg / L, respectively. The water sample concentrations detected by the water sample concentration detection method provided in the embodiments of the present invention are 12.3 mg / L and 42.43 mg / L, respectively, with recovery rates of 123% and 106.07%.
[0115] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0116] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0117] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0118] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0119] The water sample concentration detection method provided by the present invention has been described in detail above. Specific examples have been used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for detecting water sample concentration, characterized in that, include: The system receives scanned images obtained by simultaneously scanning a standard concentration colorimetric card, a color card, a first reagent tube containing a water sample, and a second reagent tube containing a standard substance of known concentration; wherein, a color card and a grayscale card are created to form the color card; the color card is created by dividing a two-dimensional image of hue and saturation into multiple blocks at a brightness of 127; the grayscale card is created by dividing the brightness bar of a WPS color picker into multiple blocks; the actual brightness of the grayscale card is 0 to 255. The color feature values of the standard concentration colorimetric card, the color card, the first reagent tube, and the second reagent tube corresponding to the scanned image are read respectively; the color feature values include at least hue, brightness, and color difference; The brightness of the scanned image of the grayscale card is compared with the actual brightness of the grayscale card using linear, exponential, logarithmic, and power regressions to obtain the first regression equation. Substitute the brightness of the scanned images of the first reagent tube and the second reagent tube into the first regression equation to obtain the actual brightness of the first reagent tube and the second reagent tube; Determine whether the obtained actual brightness is within the set range; if so, find the concentration range of the water sample based on the obtained actual brightness and the concentration of the second reagent tube; if not, increase the obtained actual brightness by the set value, and find the concentration range of the water sample on the standard concentration colorimetric card based on the increased brightness and the concentration of the second reagent tube. The second regression equation is obtained by performing linear, exponential, logarithmic, and power regressions on the hue of the scanned image of the color card and the actual hue of the color card. Determine whether the correlation coefficient of the second regression equation is greater than 0.98; if the correlation coefficient of the second regression equation is not greater than 0.98, repeat the steps of adding the water sample to the first reagent tube and adding the standard substance of known concentration to the second reagent tube; if the correlation coefficient of the second regression equation is greater than 0.98, perform linear, exponential, logarithmic, and power regressions on the hue of the scanned image of the second reagent tube and the hue of the scanned image of the standard concentration colorimetric card to obtain the third regression equation; Determine whether the correlation coefficient of the third regression equation is greater than 0.99; if the correlation coefficient of the third regression equation is not greater than 0.99, repeat the steps of adding water sample to the first reagent tube and adding standard substance of known concentration to the second reagent tube; if the correlation coefficient of the third regression equation is greater than 0.99, within the identified concentration range, perform linear, exponential, logarithmic, power, and quadratic binomial regressions on the hue, brightness, or color difference of the scanned image of the second reagent tube with the known concentration values, respectively, to create multiple regression curves between color feature values and concentration. From the multiple regression curves produced, the regression curve with the largest correlation coefficient and the smallest residual difference between the concentration points at both ends of the water sample is selected as the optimal regression curve. The water sample concentration value is calculated using the color characteristic value of the first reagent tube in the optimal regression curve.
2. The water sample concentration detection method according to claim 1, characterized in that, Before receiving the scanned image, it also includes: Based on the relationship between temperature and reaction time specified in the kit, the corresponding reaction time is calculated using linear interpolation or linear regression, so that the water sample is added to the first reagent tube and the standard substance of known concentration is added to the second reagent tube while waiting for the reaction time.
3. The water sample concentration detection method according to claim 1, characterized in that, The known concentration value of the second reagent tube corresponds to at least four concentration points in the standard concentration colorimetric card; among them, zero concentration and the highest concentration must be selected.