Disclosure of Invention
The invention provides a water quality fluoride detection method based on digital image colorimetric analysis, which is based on the color development reaction of fluoride in an acid xylenol orange zirconium system, adopts an image acquisition device based on a CCD industrial camera to acquire a digital image, integrates image processing technologies such as image enhancement, multi-dimensional color feature extraction and the like to provide a water quality fluoride concentration determination method based on a multiple linear regression model, and combines the advantages of high sensitivity, low cost, quick color development, good stability and the like of a xylenol orange zirconium colorimetric method, so that the problems and the defects existing in the prior art can be solved.
A water quality fluoride detection method based on digital image colorimetric analysis comprises the following steps:
(1) and (3) color development reaction: adding a zirconium standard solution and a xylenol orange solution into a fluoride solution for color reaction;
(2) image acquisition and processing: and collecting color sample images after the color development of the fluoride standard solutions with different concentrations by using a CCD industrial camera, and processing the color sample images by using an image processing module OpenCV to obtain Lab color first moments, namely L, a and b, of the images after blanks are deducted.
(3) Establishing a multiple linear regression model: obtaining the first moment of Lab color of each concentration of the known fluorine solution through the steps (1) and (2), and performing multi-component linear fitting by taking the concentration of the known fluorine solution as an abscissa and the values of L, a and b corresponding to each concentration as an ordinate to obtainMultiple linear regression model of L, a, b and fluorine standard solution concentration, and the model expression is-0.2012-0.0080 x1+0.0154x2+0.0319x3The correlation coefficient reaches 0.9989, and the accuracy and the indication error in the concentration range of 0.0-1.5mg/L are 1.29 percent and 2.00 percent respectively, so the method has excellent detection performance.
(4) And (3) measuring the fluorine concentration of the water sample to be measured: and (3) operating the water sample to be detected according to the steps (1) and (2) to obtain the values of L, a and b of the image of the water sample to be detected, and substituting the values of L, a and b into the multi-element linear regression model in the step (3) to obtain the concentration of the fluoride in the water sample to be detected.
The specific process of the step (1) is as follows:
(a) weighing zirconium oxychloride, dissolving the zirconium oxychloride in hydrochloric acid, diluting the zirconium oxychloride with hydrochloric acid to prepare a zirconium standard storage solution, and transferring the zirconium standard storage solution to dilute the zirconium standard storage solution with hydrochloric acid to prepare a zirconium standard solution;
in the step (a), the standard zirconium stock solution contains 1mg/ml of zirconium. The zirconium standard solution contains 20 mu g/ml of zirconium.
(b) Weighing dried pure sodium fluoride, dissolving the sodium fluoride in deionized water, diluting the sodium fluoride with the deionized water to prepare a fluorine standard storage solution, and then transferring the fluorine standard storage solution to dilute the fluorine standard storage solution with the deionized water to prepare a fluorine standard solution;
in the step (b), the fluorine standard stock solution contains 0.1mg/ml of fluorine. The fluorine standard solution contains 5 mu g/ml of fluorine.
(c) Preparing a series of fluoride solutions with different concentrations, sequentially adding a fluorine standard solution, a zirconium standard solution and a xylenol orange solution, calibrating to a scale with deionized water, shaking uniformly, standing for color development, and performing three-time parallel determination on each group of tests;
in the step (c), 0.0 to 15.0ml of fluorine standard solution, 5ml of zirconium standard solution and 0.4ml of 0.1 percent xylenol orange solution are sequentially added,
(d) based on the color reaction of fluoride in a xylenol orange zirconium system, a xylenol orange zirconium spectrophotometry is provided: measuring absorbance of the color developing solution obtained in the step (c) at the wavelength of 551nm, and obtaining three-time parallel measurement by taking deionized water as a blankAbsorbance average A as fluorine concentration in fluoride solution (as F)-Meter) is plotted on the abscissa, and a standard working curve is plotted on the ordinate on the absorbance average a corresponding to each fluorine concentration.
Furthermore, in the step (1), the specific steps are as follows:
(a) 3.5328g of zirconium oxychloride (ZrOCl) was weighed out2·8H2O) in small amounts of 1: 2, dissolving in hydrochloric acid, and then adding 1: 2, diluting the solution to 1000ml by hydrochloric acid to prepare a zirconium standard stock solution (containing 1mg/ml of zirconium), and transferring 20ml of the zirconium standard stock solution to a reaction kettle by using a reaction pressure of 1: 2, diluting hydrochloric acid to 1000ml to prepare a zirconium standard solution (containing 20 mu g/ml of zirconium);
(b) weighing 0.2210g of high-grade pure sodium fluoride (NaF) which is dried for 2 hours at 105 ℃ and dissolved in a small amount of deionized water, diluting the solution to 1000ml by using the deionized water to prepare a fluorine standard stock solution (containing 0.1mg/ml of fluorine), and then transferring 50ml of the fluorine standard stock solution to 1000ml by using the deionized water to prepare a fluorine standard solution (containing 5 mu g/ml of fluorine);
(c) preparing a series of fluoride solutions with different concentrations, sequentially adding 0.0-15.0ml of fluorine standard solution, 5ml of zirconium standard solution and 0.4ml of 0.1% xylenol orange solution into a 25ml volumetric flask, calibrating to a scale with deionized water, shaking uniformly, standing at room temperature for developing for 5 minutes, and carrying out three-time parallel determination on each group of experiments;
(d) based on the color reaction of fluoride in a xylenol orange zirconium system, a xylenol orange zirconium spectrophotometry is provided: and (c) measuring the absorbance of the color development solution obtained in the step (c) at the wavelength of 551nm, and taking deionized water as a blank to obtain the absorbance average value A of three parallel measurements. As fluorine concentration in fluoride solution (as F)-Meter) is plotted on the abscissa, and a standard working curve is plotted on the ordinate on the absorbance average a corresponding to each fluorine concentration. The fluorine concentration x and the absorbance y corresponding to each concentration have a good linear relation within the fluorine concentration range of 0.0-1.0mg/L, and the linear fitting equation is that y is-0.6286 x +0.9214(R is2=0.9991)。
The principle of the xylenol orange zirconium spectrophotometry for determining the fluoride concentration is as follows: in hydrochloric acid solution, zirconium salt can generate red complex with xylenol orange, when fluorine ions exist in a sample, the fluorine ions can take the zirconium ions in the complex to generate colorless zirconium fluoride ions, so that the complex is damaged and the red color of the solution is faded, and the fading degree is in direct proportion to the concentration of fluoride in the solution, so that the concentration of fluoride in water can be determined.
The xylenol orange zirconium spectrophotometry has the advantages that the developing time (5min) is far shorter than that (30min) of a national standard fluorine reagent spectrophotometry, the relative standard deviation and the maximum relative error in a detection range (0.0-1.0mg/L) are respectively 0.69% and 1.43%, and the xylenol orange zirconium spectrophotometry has good precision and accuracy.
The xylenol orange zirconium spectrophotometry provides a color development method for determining the concentration of water fluoride based on digital image colorimetric analysis, and the method has the advantages of rapid color development and simple and convenient operation.
The upper limit of detection reaches 1.5mg/L, the relative standard deviation and the maximum relative error in the detection range of 0.0-1.5mg/L are respectively 1.29 percent and 2.00 percent, and the method has good precision and accuracy.
The concentration of the prepared hydrochloric acid is 3-5 mol/L. More preferably, the hydrochloric acid is prepared to have a concentration of 4 mol/L.
The image acquisition and processing in the step (2) comprises the following specific processes:
(a) sequentially adding fluoride solutions with different concentrations in the step (1) into a color development pool after color development is finished, adding deionized water into a blank pool, and shooting and imaging through a CCD industrial camera;
(b) after MSRCR image enhancement and ROI region extraction are carried out on the obtained sample images, RGB values of 32000-36000 (preferably 34000) pixel points in each of a color development region and a blank region in each group of images are extracted;
(c) converting the RGB value into a corresponding Lab value through color space conversion;
(d) calculating the Lab color first moment from the Lab value obtained in the step (c), and correspondingly subtracting the Lab color first moments of the colored area and the blank area to obtain the blank-subtracted Lab color first moments, namely L, a and b.
In step (d), in particular, obtained from step (c)Lab value by
Calculating to obtain Lab color first moment (L) of the color development area
1,a
1,b
1) And Lab color first moment (L) of blank area
2,a
2,b
2) And correspondingly subtracting the first moments of the Lab colors of the color display area and the blank area to obtain the first moments of the Lab colors (L, a, b) with the blank area subtracted, namely L ═ L
1-L
2,a*=a
1-a
2,b*=b
1-b
2。
The image acquisition device based on the CCD industrial camera comprises a cover plate and a box body which are formed by using black PLA materials through 3D printing, and a closed sampling space which is not influenced by an external light source is formed.
The inside cell support, plane steady voltage light source and regulation and control device, CCD industry camera and camera lens of being provided with of box.
The cell support adopt black PLA material to print equally and form, set up two trench for place colour development pond and blank pond.
The color development pool and the blank pool are prisms of 12.5 x 45mm, and are made of acid-resistant and alkali-resistant quartz glass, so that the influence of container materials on color is reduced.
The side walls of the back surfaces of the color developing pool and the blank pool are provided with a plane voltage-stabilizing light source and a regulation and control device, and the plane voltage-stabilizing light source and the regulation and control device are composed of a plane voltage-stabilizing light source plate and a light-adjusting controller connected with the outside of the box body.
The CCD industrial camera and the lens are arranged on one side of the box body opposite to the plane voltage-stabilizing light source and are fixed in a camera groove and a lens groove in the box body.
The CCD industrial camera is connected to a notebook computer through a data transmission line, and a power supply is provided for the CCD industrial camera through the notebook computer.
The whole water quality fluoride detection system based on digital image colorimetric analysis is developed and operated by combining a Python3.8 module, an OpenCV module and image acquisition, image transmission and image data extraction and processing. Firstly, a sample which is developed is photographed through an image acquisition interface of a notebook computer, and then an image is transmitted to an image processing interface. The notebook computer is connected with a USB interface of the CCD industrial camera through a data transmission line, MSRCR image enhancement and ROI region extraction are firstly carried out on an input sample image, then RGB values of a color display region and a blank region in the sample image are obtained, the RGB values are converted into corresponding Lab values through color space conversion, then a color first step is calculated to obtain a blank-deducted Lab color first step, namely L, a, b, and finally multivariate linear fitting is carried out to obtain a multivariate linear regression model. And (4) during actual water sample detection, operating according to the step (4), and obtaining the concentration of the fluoride in the water sample to be detected.
The expression of the multiple linear fitting regression model in the step (3) is as follows: y-0.2012-0.0080 x1+0.0154x2+0.0319x3(R20.9989) where y is the fluoride concentration and x is1、x2、x3And sequentially obtaining the values of L, a and b.
Through the design of the method and the structure, compared with the prior art, the invention has the following advantages:
(1) the xylenol orange zirconium colorimetric method takes a xylenol orange zirconium system as a color developing agent for color development reaction, has the advantages of less reagent, low cost, simple operation, quick color development, high sensitivity, good stability and the like, and the xylenol orange zirconium system used in the invention can replace a fluorine reagent in national standards.
(2) MSRCR image enhancement is carried out on the sample image, so that the image definition can be effectively improved, the influence of low image brightness can be reduced, and the stable and high-quality sample image can be ensured to be obtained.
(3) And replacing the Lab first moment of the Lab color with the Lab value to construct a multiple linear regression model for quantitative analysis of the fluoride, wherein the Lab first moment of the Lab color can give consideration to color space distribution and pixels, image information can be reflected better, and the established multiple linear regression model has stronger robustness.
(4) Compared with traditional analysis methods such as a fluorine reagent spectrophotometry and the like, the water quality fluoride detection method based on digital image colorimetric analysis has the advantages of wide detection range, convenience in operation, higher accuracy and precision, simple image shooting equipment, easiness in carrying and capability of being used for field determination.
(5) The xylenol orange zirconium system is used for replacing a fluorine reagent in a national standard method, and the method has the advantages of less reagent, low cost, quick color development, high sensitivity, good stability and the like; the invention enhances the MSRCR image of the digital image collected by the CCD industrial camera, which can effectively reduce the influence of low image brightness; the method utilizes multi-dimensional color feature extraction and Lab color first moment to give consideration to color space distribution and pixels, can better reflect image information, and has stronger robustness of the established multiple linear regression quantitative analysis model. The method has the advantages of wide detection range, convenience in operation, higher accuracy and precision, simple image acquisition equipment, easiness in carrying and convenience in field determination.
Detailed Description
For the purpose of promoting a thorough understanding of the present invention, reference will now be made in detail to the present invention as illustrated in the accompanying drawings and specific examples, which are not intended to be limiting of the invention. This invention covers any alternatives, modifications and equivalents which may be made without departing from the spirit and scope of the invention, and it is understood that this invention may be practiced in a full and complete manner without these specific details by those skilled in the art. Reagents, materials and the like used in the following examples are commercially available.
Image acquisition device based on CCD industry camera is shown in figure 1, and the device is including using apron 1 and the box 2 that black PLA material 3D printed and form, forms a airtight sampling space that does not receive external light source influence, box 2 inside be provided with cell support 3, plane steady voltage light source and regulation and control device 4, CCD industry camera 5 and camera lens 6. The cuvette support 3 is printed by black PLA material, and is provided with two groove positions for placing the developing tank 7 and the blank tank 8. The color development pool and the blank pool 8 are prisms of 12.5 x 45mm, and are made of quartz glass resistant to acid and alkali corrosion, so that the influence of container materials on color is reduced. The side walls of the back surfaces of the color developing pool 7 and the blank pool 8 are provided with a plane voltage-stabilizing light source and a regulation and control device 4, and the plane voltage-stabilizing light source and the regulation and control device 4 are composed of a plane light source plate and a light-adjusting controller connected with the outside of the box body. The planar voltage-stabilizing light source plate is a white planar light source with the thickness of 100 × 20 mm. The CCD industrial camera 5 and the lens 6 are arranged on one side, opposite to the plane voltage-stabilizing light source, in the box body 2 and fixed in a camera groove and a lens groove in the box body 2, the CCD industrial camera 5 is connected into a notebook computer 9 through a data transmission line, and a power supply is provided for the CCD industrial camera 5 through the notebook computer 9.
In order to ensure the accuracy and precision of detection, the image acquisition device is required to have a uniform sampling environment, the model of the planar voltage-stabilizing light source board is YS-L100-100-18, the light source is uniform and has good imaging quality, and the light adjusting controller can be manually adjusted to change the illumination intensity so as to provide a stable and appropriate illumination environment for image acquisition. The CCD industrial camera 5 is HT-U500C in model, small in size, convenient to install, capable of carrying frame buffer, manual white balance and exposure control, and capable of acquiring images continuously or in soft trigger mode. The type of the lens 6 is HT-FM0612, the aperture and the focal length can be manually adjusted, the resolution is 500W, and distortion is avoided.
The whole water quality fluoride detection system based on digital image colorimetric analysis is developed and operated by combining a Python3.8 module, an OpenCV module and image acquisition, image transmission and image data extraction and processing. Firstly, a sample which is developed is photographed through an image acquisition interface of the notebook computer 9, and then an image is transmitted to an image processing interface. The notebook computer 9 is connected with a USB interface of the CCD industrial camera 5 through a data transmission line, MSRCR image enhancement and ROI region extraction are firstly carried out on an input sample image, then RGB values of a color display region and a blank region in the sample image are obtained, the RGB values are converted into corresponding Lab values through color space conversion, then a color first step is calculated to obtain blank-deducted Lab color first steps, namely L, a, b, and finally multivariate linear fitting is carried out to obtain a multivariate linear regression model.
As shown in fig. 2, the MSCRC-enhanced sample image and the color areas and blank areas included in the image have a resolution of 640 × 480, and the color areas and blank areas have a resolution of 100 × 340.
The water quality fluoride detection method based on digital image colorimetric analysis comprises the following operation steps:
(1) and (3) color development reaction: adding a zirconium standard solution and a xylenol orange solution into a fluoride solution for color development reaction, and specifically comprising the following steps:
(a) 3.5328g of zirconium oxychloride (ZrOCl) was weighed out2·8H2O) in small amounts of 1: 2, dissolving in hydrochloric acid, and then adding 1: 2, diluting the solution to 1000ml by hydrochloric acid to prepare a zirconium standard stock solution (containing 1mg/ml of zirconium), and transferring 20ml of the zirconium standard stock solution to a reaction kettle by using a reaction pressure of 1: 2, diluting hydrochloric acid to 1000ml to prepare a zirconium standard solution (containing 20 mu g/ml of zirconium);
(b) weighing 0.2210g of high-grade pure sodium fluoride (NaF) which is dried for 2 hours at 105 ℃ and dissolved in a small amount of deionized water, diluting the solution to 1000ml by using the deionized water to prepare a fluorine standard stock solution (containing 0.1mg/ml of fluorine), and then transferring 50ml of the fluorine standard stock solution to 1000ml by using the deionized water to prepare a fluorine standard solution (containing 5 mu g/ml of fluorine);
(c) preparing a series of fluoride solutions with different concentrations, sequentially adding 0.0-15.0ml of fluorine standard solution, 5ml of zirconium standard solution and 0.4ml of 0.1% xylenol orange solution into a 25ml volumetric flask, calibrating to a scale with deionized water, shaking uniformly, standing at room temperature for developing for 5 minutes, and carrying out three-time parallel determination on each group of experiments;
(d) fluoride-based color development reaction in xylenol orange zirconium systemThe xylenol orange zirconium spectrophotometry method is provided: and (c) measuring the absorbance of the color development solution obtained in the step (c) at the wavelength of 551nm, and taking deionized water as a blank to obtain the absorbance average value A of three parallel measurements. As fluorine concentration in fluoride solution (as F)-Meter) is plotted on the abscissa, and a standard working curve is plotted on the ordinate on the absorbance average a corresponding to each fluorine concentration. And comparing parameters such as correlation coefficient, detection range, relative standard deviation, maximum relative error and the like with a national standard fluorine reagent spectrophotometry, and determining a xylenol orange zirconium system as a color developing agent for color development reaction to replace a fluorine reagent in the national standard.
(2) Image acquisition and processing: collecting color sample images after the color development of fluoride standard solutions with different concentrations through a CCD industrial camera, and processing the color sample images through an image processing module OpenCV to obtain Lab color first moments, namely L, a and b, after blank deduction of the images, wherein the method comprises the following specific steps:
(a) sequentially adding fluoride solutions with different concentrations in the step (1) into a color development pool after color development is finished, adding deionized water into a blank pool, and shooting and imaging through a CCD industrial camera;
(b) after MSRCR image enhancement and ROI region extraction are carried out on the obtained sample image, the RGB values of 34000 pixel points in each of a color development region and a blank region in each group of images are extracted;
(c) converting the RGB value into a corresponding Lab value through color space conversion;
(d) calculating the Lab color first moment from the Lab value obtained in the step (c), and correspondingly subtracting the Lab color first moments of the colored area and the blank area to obtain the blank-subtracted Lab color first moments, namely L, a and b.
The MSRCR image enhancement algorithm in the step (b) is developed on the basis of SSR and MSR. The sample image can be defined as formula (1):
logR(x,y)=logS(x,y)-logL(x,y) (1)
wherein R (x, y) is a reflection component for representing detail information of the target object, namely a solved variable; s (x, y) is an image signal captured by the CCD industrial camera, and L (x, y) is an incident component of the image.
The MSRCR image enhancement algorithm comprises the following specific calculation steps:
the first step is as follows: calculating an incident component L (x, y) of the sample image using equation (2):
L(x,y)=S(x,y)*G(x,y) (2)
wherein denotes S (x, y) and Gaussian function
Convolution of (2); k is a normalization factor and must satisfy ═ G (x, y) dxdy ═ 1; and sigma is a scale parameter, and when the value is small, the detail recovery is good, but the color distortion is large, and when the value is large, the color distortion is small, but the detail recovery is poor.
The second step is that: calculating under single scale by using formula (3), namely SSR algorithm
Where i represents one of the 3 color channels of RGB.
The third step: applying formula (4), namely MSR algorithm to filter each channel of RGB for 3 times with different scales, and obtaining the filter by weighting and summing
Wherein
σ 1,
σ 2,
σ 3 are the most preferable of the 3 different-scale filtering, and
σ 1,
σ 2,
σ 3 are 15, 80, and 250, respectively in this embodiment; q1, q2 and q3 are respectively corresponding weights of
sigma 1,
sigma 2 and
sigma 3 and satisfy
Wherein M is the number of gaussian scales, and M is 3 in this embodiment.
The fourth step: calculating a color recovery factor using equation (5):
wherein β and α are gain coefficients and nonlinear enhancement coefficients, respectively, and the empirical values of β and α are 46 and 125, respectively.
The fifth step: and (3) applying a formula (6), namely an MSRCR algorithm, to perform color recovery and introduce gain and bias:
wherein a and b are gain and offset, respectively, to improve the image enhancement effect, and the empirical values of a and b are 192 and-30, respectively.
And a sixth step: and (3) quantizing the MSRCR enhanced image to be within the range of 0-255 by using a formula (7) and outputting:
and extracting the RGB values of 34000 pixel points in each of a colored area and a blank area in the sample image after the MSRCR image enhancement and quantification.
Converting the RGB value into a corresponding Lab value through color space conversion in the step (c), wherein the specific calculation steps are as follows:
the first step is as follows: the RGB color space is converted to the XYZ color space using equation (8):
the second step is that: the XYZ color space is converted to the Lab color space using equation (9-10):
wherein Xn,YnAnd Zn0.950456, 1.0, 1.088754, respectively.
The blank-subtracted Lab color first moment in the step (d) is calculated by the following specific steps:
the first step is as follows: calculating the first moment of color of Lab according to equation (11-12):
where ρ isi,jRepresenting the probability of occurrence of a pixel with the gray level of j in the ith color channel component of the color image, wherein N represents the number of pixels in the image, and N is 34000 in the embodiment; l is1,a1,b1Respectively a first moment of Lab color, L2,a2,b2The blank Lab color first moment is respectively.
The second step is that: the blank-subtracted first moment of Lab color, i.e., L, a, b, is obtained according to equation (13):
the working steps of the embodiment are as follows:
(1) and (3) color development reaction: 0.8mol/L hydrochloric acid medium, 0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 and 7.5ml of fluorine standard solution (containing 5 mu g/ml of fluorine) are added into a 25ml volumetric flask in sequence, 5ml of zirconium standard solution (containing 20 mu g/ml of zirconium) and 0.4ml of 0.1 percent xylenol orange solution are added, the mixture is calibrated to a scale and shaken up by deionized water, after standing and developing for 5 minutes at room temperature, the deionized water is blank, the absorbance is measured at the wavelength of 551nm, and the absorbance average value A is obtained by carrying out three parallel measurements on each group of tests.
The fluorine concentration in the volumetric flask was 0.0, 0.1, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.5mg/L in this order, and a standard working curve was drawn with the fluorine concentration as the abscissa and the absorbance average A corresponding to each fluorine concentration as the ordinate.
From the results of the linear fitting shown in fig. 3, it was found that the fluorine concentration x had a good linear relationship with the absorbance y at each concentration in the concentration range of 0.0 to 1.0mg/L, and the linear fitting equation was that y is-0.6286 x +0.9214(R ═ 0.6286x + 0.9214)2=0.9991)。
In order to further verify the performance of the xylenol orange zirconium spectrophotometry for determining the fluoride concentration, 0.3mg/L and 0.7mg/L of fluoride are respectively prepared, the test is carried out according to the operation flow of the step (1), 8 times of parallel measurement is carried out by using the xylenol orange zirconium spectrophotometry, and the relative standard deviation and the maximum relative error of a standard sample test are calculated, and the result is shown in Table 1.
TABLE 1 Table of results of standard test by xylenol orange zirconium spectrophotometry
As shown in Table 1, the relative standard deviation and the maximum relative error of the xylenol orange zirconium spectrophotometry are respectively 0.69% and 1.43% in the detection range of 0.0-1.0mg/L, and the accuracy and precision are good.
Fluoride measurement was performed according to the fluorimetry reagent for measuring water fluoride (HJ 488-2009) in the national standard method for detecting water fluoride, and compared with fluoride measurement by xylenol orange zirconium spectrophotometry in this example, the results are shown in table 2. The data of the fluorine reagent spectrophotometry in table 2 is derived from the salt city division of the water and water resource surveying bureau of Jiangsu province.
TABLE 2 comparison of the methods
As shown in table 2, although the accuracy and the fitting effect of the xylenol orange zirconium spectrophotometry are lower than those of the national standard method (HJ 488-2009), the detection time is greatly shortened, and the used reagents are few, so that the requirements of simple operation, rapid detection, low cost and the like in the detection process are met. And the sensitivity is higher, the colors of all concentrations are distinguished obviously, the upper limit of detection is high, and a foundation is laid for the selection of a color development reagent for the color reaction in the water quality fluoride detection method based on digital image colorimetric analysis.
(2) Image acquisition and processing: and (2) sequentially adding the fluoride solutions with different concentrations obtained in the step (1) into a color development pool after color development is finished, adding deionized water into a blank pool, and shooting and imaging through a CCD industrial camera. The method comprises the steps of enhancing an obtained sample image through an MSRCR image and extracting an ROI area, then extracting RGB values of 34000 pixel points of a color development area and a blank area in each group of images, converting the RGB values into corresponding Lab values through color space conversion, then calculating to obtain Lab color first moments, and finally correspondingly subtracting the Lab color first moments of the color development area and the blank area to obtain blank-subtracted Lab color first moments, namely L, a and b.
(3) Establishing a multiple linear regression model: fig. 4 shows the relationship between the respective components L, a, b and the fluorine concentration. The relationship between the components L, a, b and fluoride concentration was also described objectively by the Karl Pearson correlation coefficient R, and the results are shown in Table 3.
TABLE 3 statistical table of correlation coefficient R of color component and fluorine concentration
As shown in fig. 4 and the results in table 3, the correlation between the a and b components was highest in the fluoride concentration range of 0.0 to 1.5mg/L, the correlation between the L component was also higher, and the linear relationship between the fluoride concentration and each component was more significant, showing a non-linear relationship when the range was increased to 0.0 to 3.0 mg/L. Therefore, in the method for detecting fluoride in water based on digital image colorimetric analysis in the embodiment, the detection range of the fluoride concentration is determined to be 0.0-1.5 mg/L.
Multiple linear fits of L, a, b to the concentration of known fluorine solutions were performed and the results are shown in table 4.
Table 4 table of fit data of L, a, b values to fluorine concentration
As shown in table 4, the values of L, a, b are most highly correlated with the multiple linear regression model of known fluorine concentration, R2Up to 0.9989, expressed as y ═ 0.2012-0.0080x1+0.0154x2+0.0319x3Wherein y is the fluoride concentration, x1、x2、x3And sequentially obtaining the values of L, a and b.
In order to further verify the performance of the water quality fluoride detection method based on digital image colorimetric analysis, 0.3mg/L, 0.7mg/L and 1.3mg/L of fluoride are respectively configured, the test is carried out according to the operation flow of the step (1), 8 times of parallel measurement is carried out by using the water quality fluoride detection method based on digital image colorimetric analysis, the relative standard deviation and the maximum relative error of a standard sample test are calculated, and the comparison result with the xylenol orange zirconium spectrophotometry is shown in tables 5 and 6.
TABLE 5 digital image colorimetry standard sample test result table
TABLE 6 method comparison data sheet
As shown in tables 5 and 6, the accuracy and the indication error of the water quality fluoride detection method based on digital image colorimetric analysis are 1.29% and 2.00% respectively in the concentration range of 0.0-1.5mg/L, and the detection performance is good. Compared with the result measured by a xylenol orange zirconium spectrophotometry, the method has the advantages that the upper limit of detection is higher and reaches 1.5mg/L, the absolute error is smaller, and the detection accuracy is high.
Compared with traditional detection methods such as a fluorine reagent spectrophotometry and the like, the method has the characteristics of wide detection range, convenience in operation, higher accuracy and precision, and meanwhile, the image shooting equipment is simple and easy to carry, can realize rapid determination of the concentration of the fluoride in the water on site or in a laboratory, and is convenient to popularize and use.
While only preferred embodiments of the present invention have been illustrated and described, it will be understood that the invention is not limited to any such details or embodiments or any particular embodiments, and that various changes, modifications, substitutions and alterations can be made therein by those skilled in the art without departing from the spirit of the invention and these changes, modifications, substitutions and alterations are all within the scope of the invention as defined by the appended claims.