Multichannel quantitative detection device and detection method for fluoride ions in water

By using a multi-channel quantitative detection device and a logistic regression model, regression equations and fitting equations are constructed, solving the problems of high cost and slow speed in the detection of fluoride ion concentration in water in existing technologies, and realizing rapid, accurate and low-cost determination of fluoride ion concentration.

CN119086461BActive Publication Date: 2026-03-13HOHAI UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

There is a lack of low-cost and rapid methods for determining the concentration of fluoride ions in water. Conventional methods such as ion chromatography, ion-selective electrode method and spectrophotometry each have their shortcomings.

Method used

A multi-channel quantitative detection device is used. By constructing regression equations and fitting equations and combining them with a logistic regression model, the device takes pictures of the colorimetric tube under different light intensities and calculates the corrected light intensity value to reduce the influence of light unevenness and colorimetric tube position distortion, thereby achieving rapid and accurate detection.

Benefits of technology

It enables low-cost, rapid, and highly accurate detection of fluoride ion concentration in water, simplifies the detection process, reduces learning costs, eliminates the need for high-end instruments, and can simultaneously detect multiple samples, thus improving detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119086461B_ABST
    Figure CN119086461B_ABST
Patent Text Reader

Abstract

This invention discloses a multi-channel quantitative detection device and method for fluoride ions in water. The method includes the following steps: S1, constructing a regression equation for a backlight panel to calculate a corrected light intensity value based on the measured light intensity value; S2, constructing a first fitting equation for a colorimetric tube photograph to calculate a predicted light intensity value based on the position; S3, substituting the result obtained in step S2 into the regression equation of step S1 to obtain the corrected light intensity value for each position in the photograph; S4, using a colorimetric tube containing a solution with a known fluoride ion concentration, training a logistic regression model using training samples obtained according to steps S2 and S3; S5, using the trained logistic regression model to calculate the probability value of the fluoride ion concentration in the water sample to be tested and performing a weighted average to obtain the predicted fluoride ion concentration value, while simultaneously using a solution with a known fluoride ion concentration to correct the detection result of the water sample to be tested; This device can quickly and accurately determine the fluoride ion concentration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to water quality testing devices and methods, particularly a multi-channel quantitative detection device and method for fluoride ions in water. Background Technology

[0002] Currently, the conventional methods for determining fluoride ions in water include ion chromatography, ion-selective electrode method, single-wavelength spectrophotometry, and dual-wavelength spectrophotometry, as specified in GB / T 5750.5. Among these, ion chromatography requires expensive equipment; ion-selective electrode method requires a long equilibration time in practical applications, making it unsuitable for analyzing large numbers of samples; single-wavelength spectrophotometry has relatively poor accuracy and precision; and dual-wavelength spectrophotometry has higher accuracy but requires measuring absorbance at two different wavelengths, which is labor-intensive. Overall, there is currently no low-cost, rapid, and accurate method for determining fluoride ion concentration according to national standards. Summary of the Invention

[0003] Purpose of the invention: The purpose of this invention is to provide a low-cost, rapid, and accurate multi-channel quantitative detection device and method for determining fluoride ion concentration in water.

[0004] Technical solution: The multi-channel quantitative detection device for fluoride ions in water described in this invention includes a sealed box, a backlight panel on one side of the box, an imaging device on the opposite side, and a test tube rack for placing multiple colorimetric tubes side by side between the backlight panel and the imaging device.

[0005] Preferably, the colorimetric tubes placed on the test tube rack are spaced equally.

[0006] The quantitative detection method of the present invention includes the following steps:

[0007] S1. Photograph the backlight of the test tube rack under different backlight intensities, and decompose all photos according to the three color channels of RGB. Establish a regression equation for each color channel to calculate the corrected light intensity value based on the measured light intensity value.

[0008] S2. With the backlight set to the luminous intensity, place the colorimetric tube containing the solution on the test tube rack and take a picture. Decompose the picture according to the three color channels of RGB. Establish the first fitting equation for calculating the predicted luminous intensity value based on the position in each color channel.

[0009] S3. Replace the predicted light intensity value obtained in step S2 with the measured light intensity value at that location in step S1 to calculate the corrected light intensity value at each location in the photo.

[0010] S4. Obtain the corrected illumination intensity values ​​for all positions of each colorimetric tube under multiple light intensities according to steps S2 and S3, and use these values ​​as input values ​​to train the logistic regression model.

[0011] S5. Place multiple colorimetric tubes containing different water samples and different known fluoride ion concentrations in batches on a test tube rack and take pictures. Obtain the corrected light intensity value according to steps S2 and S3. Substitute this value into the logistic regression model and use the output result as the weight value of the fluoride ion concentration in step S4 to perform weighted averaging and obtain the predicted fluoride ion concentration value.

[0012] S6. Construct a second fitting equation based on the known fluoride ion concentration value and the predicted fluoride ion concentration value of the solution in step S5. Obtain the fluoride ion concentration of the water sample to be tested based on the predicted fluoride ion concentration value and the second fitting equation.

[0013] By first constructing a regression equation in step S1, and then calculating the corrected illumination intensity value from the measured illumination intensity value of the backlight panel, the influence of the deviation between the actual illumination intensity and the theoretical illumination intensity under different illumination intensities caused by the quality problems of each luminous point of the backlight panel itself can be reduced. It can also reduce the influence of distortion caused by different Euclidean distances from each point of the backlight panel to the camera lens on the results.

[0014] Next, the first fitting equation is constructed through step S2. The predicted illumination intensity value at each position of the colorimetric tube is calculated. By fitting the equation, the adverse effects of distortion caused by different Euclidean distances from different positions of the colorimetric tube to the camera lens on the results can be reduced. The first fitting equation can also calculate the predicted illumination intensity value at the edge of the colorimetric tube, avoiding the sharp decrease in measured illumination intensity value due to the increased glass thickness at the edge of the colorimetric tube, which cannot be used as effective data for training the logistic regression model. Moreover, the first fitting equation can also calculate the predicted illumination intensity value at the periphery of the colorimetric tube, increasing the amount of data used for training the logistic regression model and improving the accuracy of the final logistic regression. Substituting the predicted illumination intensity value calculated in step S2 into the regression equation in step S1 can further reduce the impact of the backlight on the detection results.

[0015] In step S5, the solution containing the known fluoride ion concentration and the water sample to be tested are placed in batches on the test tube rack and photographed. This ensures that multiple water samples can be tested at once, while the known fluoride ion concentration solution serves as a reference for calibration under the same testing environment. This avoids the experimental results being affected by changes in the testing environment during actual testing compared to step S4. Through the second fitting equation constructed in step S6, the known fluoride ion concentration value can be calculated from the predicted fluoride ion concentration value. For the water sample to be tested, this known fluoride ion concentration value is the calibrated fluoride ion concentration value. The second fitting equation can further reduce the influence of various possible factors on the test results and improve the accuracy of the final test.

[0016] The entire technical solution trains the logistic regression model through steps S1-S4. Subsequent detections can directly use the trained logistic regression model. Detection only requires placing a colorimetric tube containing the sample to be tested and a solution with a known fluoride ion concentration together in the device for photography. Subsequently, the corrected light intensity value obtained through steps S2 and S3 is input into the logistic regression model. The process of constructing a second fitting equation based on the output results can be completed with computer assistance. The accurate concentration of fluoride ions to be tested can be obtained without extensive manual calculations. The actual detection process is simple, fast, and highly accurate.

[0017] Preferably, the regression equation in step S1 is:

[0018]

[0019] Among them, Y (x,y,c) This is the corrected illumination intensity value for the backlight panel at position (x,y) with color channel c, ranging from 0 to 255; (x,y,c) Let α, β, and γ be the measured illumination intensity of the backlight panel at position (x, y) with color channel c. α, β, and γ are parameters to be fitted.

[0020] Preferably, the distance from the axis of the colorimetric tube to its edge is p, and half of the distance between the opposite sides of adjacent colorimetric tubes on the test tube rack is q. In step S2, the area within S on both sides of each colorimetric tube from its axis is cut out and processed separately, where S = p + q.

[0021] By processing each colorimetric tube separately within a specified distance from the axis, the influence between adjacent colorimetric tubes can be avoided when constructing the fitting equation later; and the aforementioned distance ensures that the area extracted from each colorimetric tube is equal.

[0022] Preferably, the distance from the edge of each colorimeter tube image captured in step S2 to the axis of the colorimeter tube is the sum of p and q of the colorimeter tube at the center of the original photo.

[0023] Because the different Euclidean distances from each colorimetric tube to the camera lens can cause distortion, the sum of p and q (i.e., the S value) of each colorimetric tube will be different. Unifying the S value of all colorimetric tubes to the S value of the colorimetric tube at the center of the original image can reduce the impact of this distortion on the final detection result.

[0024] Preferably, the fitting equation in step S2 is:

[0025]

[0026] Among them, T (n,h,l,c) For the nth colorimeter tube, at a height of h, a distance of l from the axis of the colorimeter tube, and color channel c, the predicted illumination intensity value, μ, and... The parameters to be fitted are: l < 3 / 4p;

[0027] The predicted light intensity value T within the range of 0≤l≤S is calculated using formula (2). (n,h,l,c) .

[0028] Preferably, the fitting equation in step S6 is:

[0029] F=kM+ξ

[0030] Where F is the predicted fluoride ion concentration, M is the known fluoride ion concentration, and k and ξ are the parameters to be fitted.

[0031] Preferably, in step S4, the difference in concentration between adjacent fluoride ions in solutions with different known fluoride ion concentrations is within a set range.

[0032] If the difference in concentration between adjacent fluoride ions is within a set range, the fluoride ion concentration can be considered to change linearly. Therefore, the fluoride ion concentration can be predicted by calculating the weighted average based on the probability values ​​output by logistic regression.

[0033] The quantitative detection method of the present invention includes the following steps:

[0034] S1. Photograph the backlight panel under different light intensities, and decompose all photos according to the three color channels of RGB. Establish a regression equation for each color channel to calculate the corrected light intensity value based on the measured light intensity value.

[0035] S2. Substitute the measured light intensity values ​​of all positions of multiple colorimetric tubes containing solutions of different known fluoride ion concentrations under multiple different light intensities into the regression equation of step S1 to obtain the corrected light intensity value, and use it as the input value to train the logistic regression model.

[0036] S3. Place multiple colorimetric tubes containing different water samples and solutions with different known fluoride ion concentrations on a test tube rack in batches and take pictures. Substitute the measured light intensity value into the regression equation of step S1 to obtain the corrected light intensity value. Substitute this value into the logistic regression model and use the output result as the weight value of the fluoride ion concentration in step S2 to perform weighted averaging and obtain the predicted fluoride ion concentration value.

[0037] S4. Construct a second fitting equation based on the known fluoride ion concentration value and the predicted fluoride ion concentration value of the solution in step S3. Obtain the fluoride ion concentration of the water sample to be tested based on the predicted fluoride ion concentration value and the second fitting equation.

[0038] Based on the above technical solution, the regression equation constructed in step S1 reduces the error caused by the mass of the backlight panel itself and the different distances from each point to the camera lens on the measured light intensity value. The corrected light intensity value obtained by the regression equation is input into the logistic regression model for training, which improves the recognition accuracy of the logistic regression model. In actual testing, the solution with known fluoride ion concentration and the water sample to be tested are tested in batches. Constructing a second fitting equation can reduce the impact of changes in the testing environment on the results. The combination of the regression equation and the second fitting equation can improve the accuracy of the test results. After the logistic regression model is trained, subsequent tests only require placing the water sample to be tested into the testing device and taking a picture to obtain the fluoride ion concentration value. The regression equation and the second fitting equation can also be constructed with the assistance of computer programs, without the need for manual calculation. The entire detection method is simple, fast and highly accurate.

[0039] Beneficial Effects: Compared with the prior art, the significant effects of this invention are as follows: 1. By first constructing a regression equation for the backlight, the influence of the backlight on the results can be reduced. Constructing the first fitting equation not only obtains more accurate light intensity values ​​but also expands the amount of data used for training the logistic regression model, improving the accuracy of the logistic regression model. Constructing the second fitting equation can further improve the detection results of fluoride ion concentration. The combination of the above processes ensures the accuracy of detection, and the actual detection process only requires taking pictures. The remaining calculation process can be completed by computer assistance, which is simple, fast, and accurate. 2. The user learning cost is low, and there is no need for high-end instruments and complex synthesis methods. The equipment cost is extremely low. 3. Multiple colorimetric tubes can be placed on the test tube rack for taking pictures. The influence of different positions on the detection results is reduced by the regression equation and the first fitting equation, which allows multiple samples to be detected at the same time, greatly improving efficiency. 4. Compared with spectrophotometry, it does not require pouring into a cuvette. The measurement is directly performed by the colorimetric tube, and it is almost unaffected by changes in photometric intensity within a suitable photometric range. Attached Figure Description

[0040] Figure 1 This is a schematic diagram of the structure of the device;

[0041] Figure 2 A schematic diagram showing multiple colorimetric tubes placed on a test tube rack;

[0042] Figure 3 This is a graph showing the relationship between the distance from the measurement point of the colorimetric tube to the axis and the measured light intensity value.

[0043] Figure 4 This is a graph of the first fitted equation. Detailed Implementation

[0044] As shown in the figure, the multi-channel quantitative detection device for fluoride ions in water according to the present invention includes a sealed box 1, a backlight plate 2 is provided on one side of the box 1, and an imaging device 3 is provided on the opposite side. A test tube rack 4 is provided between the backlight plate 2 and the imaging device 3. The box 1 is provided with an openable and closable cover for easy access to colorimetric tubes 5.

[0045] The backlight 2 has adjustable brightness, and the shooting device 3 uses a camera with fixed parameters such as resolution, exposure, contrast, and color temperature. The test tube rack 4 has multiple holes that can hold multiple test tubes at the same time, so that multiple water samples can be measured simultaneously. The spacing between adjacent holes in the test tube rack is equal. When adjusting the brightness of the backlight 2, it can be used with an illuminance meter for more precise adjustment. When in use, the illuminance meter probe is close to the surface of the backlight but not in the field of view of the camera shooting the test tube rack. After use, it is removed from the device.

[0046] Before detailing the quantitative detection method of this invention, it should be noted that the pretreatment of all water samples in this method is carried out in accordance with the pretreatment method of the dual-wavelength coefficient ratio fluorine reagent spectrophotometric method in GB / T 5750.5-2023. After pretreatment, multiple water samples to be tested are loaded into colorimetric tubes, and alizarin complexone (fluorine reagent), buffer solution, lanthanum nitrate and acetone solution are added in sequence and mixed to obtain a colorimetric solution. The above process is the same as that in the prior art.

[0047] The quantitative detection method of the present invention specifically includes the following steps:

[0048] S1. Backlight panel data preprocessing, which includes the following steps:

[0049] S1.1 Adjust the luminous intensity of the backlight panel to more than 5 levels within the appropriate photometric range for detecting fluoride ions, and take photos of the backlight panel under different luminous intensities (at this time, the test tube rack is not inserted with colorimetric tubes). Extract the backlight panel area behind the test tube rack in the above photos, decompose the color of the area according to the three color channels of RGB, and obtain the RGB value of each coordinate on the image.

[0050] S1.2. Establish regression equations for each point in the image obtained in step S1.1 in the R, G, and B channels to obtain relevant parameters. Quadratic regression equations are preferred, specifically:

[0051]

[0052] Among them, Y (x,y,c) This is the corrected illumination intensity value for the backlight panel at position (x,y) on the image with color channel c, ranging from 0 to 255; (x,y,c) Let α, β, and γ be the measured illumination intensity of the backlight panel at position (x, y) with color channel c. α, β, and γ are parameters to be fitted.

[0053] Formula (1) is equivalent to taking pictures of each point on the backlight under different luminous intensities, measuring the actual luminous intensity value of each point, and then fitting it with the theoretical luminous intensity value under that luminous intensity to obtain a regression equation to more accurately reflect the actual luminous intensity value of the backlight under a certain measured luminous intensity value, that is, the corrected luminous intensity value, thereby reducing the influence of the backlight itself and the distance between each point and the camera lens on the actual luminous intensity value of the backlight, and thus reducing the impact on the detection results.

[0054] S2. With the backlight set at a certain intensity, place the colorimetric tube containing the solution on a test tube rack and take a photograph. Decompose the photograph according to the three color channels (RGB). For each color channel, establish a first fitting equation for calculating the predicted light intensity value based on the location. This includes the following steps:

[0055] S2.1 Within a suitable photometric range for detecting fluoride ion concentration, select a fixed luminescence intensity, preferably the strongest luminescence intensity within that range; place the colorimetric tube containing the solution on a test tube rack and take a photograph, then separate and process each colorimetric tube and its surrounding designated area separately.

[0056] The defined region is the area within a distance S from the axis of the colorimeter tube on both sides, where S = p + q, and p is the distance from the axis of the colorimeter tube to its edge, and q is half the distance between the opposite edges of two adjacent colorimeter tubes. This region also includes the colorimeter tubes themselves. However, because the Euclidean distance between each colorimeter tube and the camera lens in the photo varies, it will cause some distortion, resulting in a deviation in the S value of each colorimeter tube. In order to avoid this deviation from affecting the subsequent training of the logistic regression model, the S value of all colorimeter tubes is the same as the S value of the colorimeter tube at the center of the photo.

[0057] S2.2 Constructing the first fitting equation: Through practice, it has been found that using the measured light intensity values ​​of each color channel within the range from a distance of 3 / 4p from the axis of the colorimeter tube to the axis is the most suitable for constructing the first fitting intensity equation. The first fitting equation is as follows:

[0058]

[0059] Among them, T (n,h,l,c)For the nth colorimeter tube, at a height of h, a distance of l from the axis of the colorimeter tube, and color channel c, the predicted illumination intensity value, μ, and... The parameters to be fitted are: l satisfies the condition l < 3 / 4p; then, the predicted light intensity value T in the range of 0 ≤ l ≤ S is calculated using formula (2). (n,h,l,c) .

[0060] When formula (2) is constructed, it is assumed that T is true when l satisfies the condition l < 3 / 4p. (n,h,l,c) This is equal to the measured light intensity value, thus allowing the construction of a relationship equation between the predicted light intensity value and the position of the colorimeter tube; when l satisfies the condition l<3 / 4p, T is calculated by formula (2). (n,h,l,c) It is not necessarily equal to the measured light intensity value, because the measured light intensity value may also deviate from the theoretical value due to distortion and other reasons. Fitting can reduce the impact of different Euclidean distances from different positions of the colorimeter tube to the camera lens on the measurement of light intensity value.

[0061] Formula (2) can also be used to calculate the predicted light intensity value when 3 / 4p≤l≤S. In the case of 3 / 4p≤l≤p, the solution becomes thinner and thinner in the front and back directions as it gets closer to the edge of the colorimetric tube, while the glass becomes thicker and thicker, resulting in a sharp decrease in the measured light intensity value. This creates a clear discontinuity with the measured light intensity value outside the colorimetric tube wall. This situation is caused simply because the relative thickness of the glass increases too much and is not the actual light intensity value that the solution should have in this area. Therefore, replacing it with the predicted light intensity value calculated by formula (2) is more in line with the actual situation and can make the training results more accurate when used for subsequent logistic regression model training. In the segment p≤l≤S, replacing the measured light intensity value of the backlight plate with the predicted light intensity value calculated by formula (2) can expand the total number of light intensity values ​​of the solution, which means increasing the amount of data used for training the logistic regression model and further improving its accuracy. Similarly, the predicted light intensity values ​​calculated in these two segments can also improve the recognition accuracy when used as input into the trained logistic regression model because of the richer amount of data.

[0062] It should be noted that although formula (2) is constructed under a specific luminescence intensity, it is applicable to all luminescence intensities within the detection photometric range with appropriate fluoride ion concentration.

[0063] Step S2.1 separates each colorimeter tube and the surrounding set area for separate processing. This can avoid the overlap of the expanded areas of adjacent colorimeter tubes when using formula (2) to expand the predicted light intensity value, resulting in different predicted light intensity values ​​at the same location, which affects the training of the logistic regression model.

[0064] S3. Replace the predicted light intensity value obtained in step S2 with the measured light intensity value at that location in step S1 to calculate the corrected light intensity value at each location in the photo.

[0065] Specifically, based on the position of each colorimeter tube, h and l in formula (2) are converted into x and y in formula (1), which is the conventional coordinate transformation operation. The first coordinate system is constructed using the photo taken by the camera, where the horizontal and vertical coordinates are x and y, respectively. The second coordinate system is constructed using the image of each segmented colorimeter tube, where the horizontal and vertical coordinates are h and l, respectively. Since the colorimeter tube has a clear position in the first coordinate system, the coordinate transformation can be performed accordingly.

[0066] After coordinate replacement, let I (x,y,c) =T (n,x,y,c) Then, the corrected light intensity value is calculated according to formula (1) as the final measured light intensity value at each position of each colorimetric tube.

[0067] S4. Obtain the corrected light intensity values ​​for all positions of each colorimetric tube containing solutions of different known fluoride ion concentrations, following steps S2 and S3. Use these values ​​as input to train the logistic regression model. This process includes the following sub-steps:

[0068] S4.1 Prepare multiple solutions with different fluoride ion concentrations as the first standard series solutions. Each solution with a different fluoride ion concentration should be placed in an independent colorimetric tube. Note that the difference between adjacent fluoride ion concentration values ​​in the first standard series solutions should not be too large, and they should be relatively close together. This can be considered as a linear change in fluoride ion concentration between adjacent values.

[0069] S4.2 Place colorimetric tubes containing different fluoride ion concentrations into the device and take pictures at multiple different light intensities. The specific number of colorimetric tubes placed should be based on the number of test tubes that the test tube rack can hold. Taking pictures at different light intensities can obtain more samples for training the logistic regression model, which can increase the generality of the logistic regression model and make the application conditions of the logistic regression model not limited to a specific light intensity.

[0070] S4.3. Based on steps S2 and S3, the corrected illumination intensity values ​​at multiple locations of each colorimeter tube are calculated and input into a machine learning logistic regression model for training, with a training set to test set ratio of 7:3; using the coefficient of determination R... 2 As a criterion, when R 2 Training of the logistic regression model is completed when the value is greater than 0.998.

[0071] S5. Place multiple colorimetric tubes containing different water samples to be tested and solutions with different known fluoride ion concentrations in batches on a test tube rack. Obtain the corrected light intensity value according to steps S2 and S3. Substitute this value into the logistic regression model and use the output result as the weight value of the fluoride ion concentration in step S4 for weighted averaging to obtain the predicted fluoride ion concentration value.

[0072] Specifically, it includes the following steps:

[0073] S5.1 First, place multiple colorimetric tubes containing solutions with different known fluoride ion concentrations on a test tube rack and take pictures. Then, remove these colorimetric tubes and place multiple colorimetric tubes containing the water sample to be tested in them and take pictures. These solutions with known fluoride ion concentrations serve as the second standard series solutions.

[0074] S5.2. Obtain the measured light intensity values ​​from the two photographs and then follow steps S2 and S3 to obtain the corrected light intensity values ​​for each position of each colorimetric tube.

[0075] S5.3 Substitute the corrected light intensity value obtained in step S5.2 into the trained logistic regression model; the logistic regression model outputs the probability value of the solution in each colorimetric tube relative to the concentration of all fluoride ions in the first standard series solutions. These probability values ​​are used as the weight values ​​of each fluoride ion concentration, and a weighted average is calculated for all fluoride ion concentrations. The result is the predicted fluoride ion concentration value of the solution in that colorimetric tube. Since the difference between adjacent fluoride ion concentrations in the first standard series solutions is small, the fluoride ion concentration can be considered to change linearly, and thus the weighted average can be used as the predicted fluoride ion concentration value.

[0076] The second standard series solution is set in step S5 to avoid the detection environment changing from that of the first standard series solution during actual testing, which may affect the test results; for example, the time and location of the actual test are different from those of the first standard series solution, and the detection environment will be different.

[0077] S6. Construct a second fitting equation based on the known fluoride ion concentration and predicted fluoride ion concentration of the solution from step S5. Obtain the fluoride ion concentration of the water sample to be tested based on the predicted fluoride ion concentration and the second fitting equation. This includes the following sub-steps:

[0078] S6.1 Construct a second fitting equation based on the known fluoride ion concentration and the predicted fluoride ion concentration of the solution from step S5:

[0079] F=kM+ξ (3)

[0080] Where F is the predicted fluoride ion concentration, M is the known fluoride ion concentration, and k and ξ are the parameters to be fitted.

[0081] S6.2 Substitute the predicted fluoride ion concentration value of the water sample to be tested obtained in step S5 into formula (3) to obtain the "known fluoride ion concentration value" of the water sample to be tested, which is actually the corrected fluoride ion concentration value as the final detection result.

[0082] If the testing environment does change during actual testing and affects the test results, formula (3) can also reduce this impact and further improve the accuracy of the final test results.

[0083] It should be noted that, except for step S1 which requires shooting under multiple different light intensities on the backlight, all other steps involve shooting under a fixed light intensity.

[0084] Steps S2 and S3 can also be omitted. The regression equation constructed in step S1 alone can also improve the accuracy of detection. The specific steps of the quantitative detection method without using steps S2 and S3 are as follows:

[0085] S1. Photograph the backlight panel under different light intensities, and decompose all photos according to the three color channels of RGB. Establish a regression equation for each color channel to calculate the corrected light intensity value based on the measured light intensity value.

[0086] S2. Substitute the measured light intensity values ​​at all positions of multiple colorimetric tubes containing solutions with different known fluoride ion concentrations into the regression equation of step S1 to obtain the corrected light intensity value, and use it as the input value to train the logistic regression model.

[0087] S3. Place multiple colorimetric tubes containing different water samples and solutions with different known fluoride ion concentrations on a test tube rack in batches and take pictures. Substitute the measured light intensity value into the regression equation of step S1 to obtain the corrected light intensity value. Substitute this value into the logistic regression model and use the output result as the weight value of the fluoride ion concentration in step S2 to perform weighted averaging and obtain the predicted fluoride ion concentration value.

[0088] S4. Construct a second fitting equation based on the known fluoride ion concentration value and the predicted fluoride ion concentration value of the solution in step S3. Obtain the fluoride ion concentration of the water sample to be tested based on the predicted fluoride ion concentration value and the second fitting equation.

[0089] The regression equation and the second fitting equation are the same as those described above.

[0090] The following is a specific testing case to further illustrate this point:

[0091] I. Reagents

[0092] All reagents involved in the detection should be processed according to the reagent processing method in GB / T 5750.5-2023 Dual Wavelength Coefficient Ratio Fluorine Reagent Spectrophotometry.

[0093] II. Test Apparatus

[0094] A closed cavity is constructed with a diffuser plate lining its inner wall to reduce direct light reflection. Inside the cavity is a colorimeter tube holder containing several graduated colorimeter tubes. A white LED light source is located at the back of the cavity, and a camera is positioned on the opposite side. An illuminance meter is used to select a suitable illumination range and is removed from the device after use. The camera is connected to a data workstation, which is a laptop computer. The software and algorithm development platform is VS Code, and the programming languages ​​are Python and C.

[0095] Phase 1: Training Phase of the Regression Model

[0096] Prepare 10 mL of standard solution 1 containing fluoride ion concentrations of 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4 and 1.5 mg / L using sodium fluoride standard solution. Place standard solution 1 in a 25 mL colorimetric tube and add alizarin complex ketone (fluoride reagent), buffer solution, lanthanum nitrate and acetone solution in sequence. Mix well and develop color.

[0097] Place the colorimetric tubes containing standard series solution 1 in batches onto the colorimetric tube holder of the device. Under white LED parallel light, take 20 photos at each of five different brightness levels within a suitable brightness range using a camera.

[0098] Substitute the above photo into the image processing algorithm to obtain the correction intensity of each color channel of each pixel, complete the image processing, and then perform feature extraction. The image processing algorithm is the processing method of steps S1-S3.

[0099] The extracted features are substituted into the logistic regression model for training and testing, with a training set to test set ratio of 7:3. The goal is to find the maximum coefficient of determination R. 2 To accurately quantify, the maximum coefficient of determination R0 2 It should be no less than 0.998. The machine learning logistic regression algorithm is then trained.

[0100] To illustrate the importance of image processing, this example demonstrates the effect of using and not using image processing methods on the coefficient of determination R of a logistic regression model. 2 The effects are shown in Table 1.

[0101] Table 1. Impact of using / not using image processing methods / algorithms

[0102]

[0103] As shown in Table 1, neither Equation (1) nor Equation (2) alone can achieve satisfactory results in image processing. However, when using the complete image processing method, training and testing determination coefficients greater than 0.998 can be obtained.

[0104] The logistic regression model obtained in this stage can be used for subsequent detections. No further training is required; the logistic regression model can be directly called upon.

[0105] Phase 2: Testing Phase

[0106] Prepare a series of standard solutions (2) containing fluoride ion concentrations of 0.0, 0.1, 0.25, 0.50, 0.75, 1.00, and 1.15 mg / L using sodium fluoride standard solution. Place these solutions in 25 mL colorimetric tubes and add alizarin complexone (fluoride reagent), buffer solution, lanthanum nitrate, and acetone solution sequentially. Mix well and develop color. Collect horizontal samples and divide them into 6 aliquots. Place 2 aliquots into different colorimetric tubes, and use the other 4 aliquots as spiking solutions. Spike 0.25 mg / L fluoride ions into 2 aliquots and 0.70 mg / L fluoride ions into the remaining 2 aliquots for detection.

[0107] First, place standard series solution 2 in the apparatus and take photographs. According to step S5, the predicted values ​​of the fluoride ion concentrations of each component in standard series solution 2 are: 0.019, 0.0994, 0.2346, 0.4773, 0.7222, 0.9177, and 1.0612 mg / L. From this, the second fitting equation is obtained: F = 0.91368M + 0.01501, and the coefficient of determination R of this fitting equation is... 2 The value was >0.998, meeting the requirements for further analysis. The test sample and its spiked sample were then placed in the apparatus, photographed, and substituted into the second fitting equation to calculate the corrected fluoride ion concentrations: 0.1769, 0.1534, 0.4299, 0.4119, 0.8449, and 0.8464 mg / L. The first two values ​​are the fluoride ion concentrations of the test water sample, the middle two are the fluoride ion concentrations of the 0.25 mg / L fluoride ion spiked solution, and the last two are the fluoride ion concentrations of the 0.70 mg / L fluoride ion spiked solution. The recoveries of the four spiked solutions were 106%, 98.7%, 97.1%, and 97.3%, respectively. The samples were tested using ion chromatography, and the results were consistent.

Claims

1. A multi-channel quantitative detection method for fluoride ions in water, characterized in that: The corresponding device is used for testing. The corresponding device includes a sealed box (1), a backlight plate (2) is provided on one side of the box (1), and an imaging device (3) is provided on the opposite side. A test tube rack (4) is provided between the backlight plate (2) and the imaging device (3) for placing multiple colorimetric tubes (5) side by side. The method includes the following steps: S1. Photograph the backlight panel (2) under different light intensity, and decompose all photos according to the three color channels of RGB. Establish a regression equation for calculating the corrected light intensity value based on the measured light intensity value in each color channel. S2. Under the set luminous intensity, place the colorimetric tube (5) containing the solution on the test tube rack (4) and take a picture. Decompose the picture according to the three color channels of RGB. Establish the first fitting equation for calculating the predicted luminous intensity value based on the position under each color channel. The first fitting equation is: , in, For the first Root colorimetric tube (5), at a height of The distance from the axis of the colorimeter tube (5) is l, and the color channel is... The predicted light intensity value for the time period. and The parameters to be fitted are: l < 3 / 4p; Calculated using this formula Predicted light intensity values ​​within the range Where S = p + q, p is half the width of the colorimetric tube (5) itself, and q is half the distance between the opposite sides of adjacent colorimetric tubes (5) on the test tube rack (4); S3. Replace the predicted light intensity value obtained in step S2 with the measured light intensity value at that location in step S1 to calculate the corrected light intensity value at each location in the photo. S4. The corrected illumination intensity values ​​of all positions of each colorimetric tube (5) containing solutions with different known fluoride ion concentrations are obtained under multiple luminescence intensities according to steps S2 and S3. These values ​​are then used as input values ​​to train the logistic regression model. S5. Place multiple colorimetric tubes (5) containing different water samples to be tested and solutions with different known fluoride ion concentrations in batches on the test tube rack (4) and take pictures. Obtain the corrected light intensity value according to steps S2 and S3. Substitute this value into the logistic regression model and use the output result as the weight value of the fluoride ion concentration in step S4 to perform weighted averaging and obtain the predicted fluoride ion concentration value. S6. Construct a second fitting equation based on the known fluoride ion concentration value and the predicted fluoride ion concentration value of the solution in step S5. Obtain the fluoride ion concentration of the water sample to be tested based on the predicted fluoride ion concentration value and the second fitting equation.

2. The method according to claim 1, characterized in that: The regression equation in step S1 is: , in, To the location of the photo The corrected illumination intensity value of the backlight panel (2) when the color channel is c, the value range is 0~255; To the location of the photo The measured illuminance value of the backlight panel (2) when the color channel is c. All of these are parameters to be fitted.

3. The method according to claim 1, characterized in that: In step S2, the area within S distance from the axis of each colorimeter tube (5) in the photograph is extracted and processed separately.

4. The method according to claim 3, characterized in that: The distance from the edge of each colorimeter tube image captured in step S2 to the axis of the colorimeter tube (5) is the sum of p and q of the colorimeter tube (5) at the center of the original photo.

5. The method according to claim 1, characterized in that: The second fitting equation in step S6 is: , Where F is the predicted fluoride ion concentration, and M is the known fluoride ion concentration. and These are the parameters to be fitted.

6. The method according to claim 1, characterized in that: In step S4, the difference in concentration between adjacent fluoride ions in solutions with different known fluoride ion concentrations is within a set range.

7. The method according to claim 1, characterized in that: The colorimetric tubes (5) placed on the test tube rack (4) are spaced at equal intervals.

Citation Information

Patent Citations

  • Water quality fluoride detection method based on digital image colorimetric analysis

    CN113945556A