quantitative chemical analysis based on computer processing image of the turbid solution

K. Stanchevaa, S. Pavlovb, A. Dakasheva

aDepartment of Inorganic and Analytical Chemistry, Prof. Dr. Assen Zlatarov University, 8010 Bourgas, Bulgaria

bDepartment of Mathematics and Physics, Prof. Dr. Assen Zlatarov University, 8010 Bourgas, Bulgaria

E-mail:

Abstract

An optical method of quantitative chemical analysis of ions in water solution has been developed. The method is based on investigation of the turbid solutions achieved by mixing of an analyte solution with reagent-precipitant and forming precipitated particles under well defined conditions. The method does not need turbidimetric or nephelometric measurement. Instead an image of the turbid solution is captured using a digital camera. The digital image data are then transferred to a personal computer through a capture card or a cable. Tristimulus values (R, G and B) representing image chromaticity are found. A polynomial regression equation is applied to describe the relation between one of the R, G or B tristimulus values and a concentration of the test solution in order to calculate the unknown concentration. A computer program is specially created to process all necessary operations. Solutions of SO42-, Cl- and Mo (VI) are analyzed with good analytical characteristics.

Keywords: turbid solution analysis, digital camera, digital image processing

AIMS AND BACKGROUND


Turbidity is an expression of the optical property that causes light to be scattered and absorbed rather than transmitted in straight lines through the sample1. Turbidity is not color related, but relates rather to the loss of transparency due to the effect of suspended particles and/or colloidal material.

Currently, the approved methods for measurement of turbidity are turbidimetry and nephelometry2-6. There are two basic types of photometers used for process turbidity measurements, this based on light absorbance and this based on light scattering. In turbidimetry the detector is placed in line with the light source and the decrease in the radiation’s transmitted power is measured. In nephelometry scattered radiation is measured at an angle of 90 degrees to the source. Turbidity can be measured using a UV/Vis spectrophotometer and a spectrofluorimeter is suitable for nephelometry. Turbidimetry is a better choice when the sample contains high concentrations of scattering particles, while nephelometry is more appropriate for low concentrations samples.

Both methods are widely used to determine clarity of water, beverages and food production, as well as suspended particles in gases, like smog and fog7,8. Nowadays turbidimetry and nephelometry have been widely used as detection methods in flow analysis. A number of inorganic cations and anions such as Ag+, Ca2+, NH4+, Cl-, CN-, CO32-, PO43-, F-, SO42- can be determined by precipitating them under well-defined conditions2-8.

Recently we reported a patent and two scientific papers9-11 concerning a new method of molecular absorption analysis in the visible region. By this method instead of a measurement of an absorbance, the color of the solution is measured with a digital camera. The method is developed in two versions, respectively using polychromatic and monochromatic light source.

In the present work above method mentioned is applied for quantitative chemical analysis based on measuring turbidity of the solution, but instead of turbidimetric or nephelometric measurement, the color of turbid solution is measured.

The principle of the method proposed is as follows: an analyte in solution is precipitated, in defined conditions, with a solution of the residual reagent. Because of the precipitate, the solution becomes turbid. A picture of a turbid solution is taken with a digital camera. The data are transferred from the camera to a personal computer where it is processed by a suitable computer program.

Experimental

Materials and Methods. All reagents and procedures of preparing standard turbid solutions for all examples of analysis done in the work, are the same as for those of the standard turbidimetric or nephelometic analysis.

For capturing images of turbid solutions an amateur digital camera Panasonic DMC-LS5 is used.

Pictures of sample and standard turbid solutions are taken consecutively. The solution images captured are transferred from the camera to a personal computer through a capture card or a cable. Tristimulus values (R, G and B) of the images are found. One of the R, G or B tristimulus values of the pictures is chosen. The dependence of this tristimulus value on the concentration is found and then is used to determine sample concentration.

Software, especially developed by us for the purpose, performs operations as follows: selects a region on the image or eliminates background of the image; finds tristimulus values of the image; chooses one of the three (R, G or B) tristimulus values; tests different order polynomial regressions in order to describe relation of tristimulus value chosen to standard solution concentration; evaluates polynomial regressions and chooses a proper one; builds standard calibration curve and calculates sample concentration.

Results and discussion

The proposed method differs from the nephelometric and turbidimetric methods in the manner of measuring the turbidity of solutions. But this method does not differ in the assay procedure prior to measurement. So when preparing the turbid solutions, it is necessary to maintain an uniform distribution of particle sizes throughout the sample and between samples and standards, therefore, to control parameters such as the concentration of reagents, the order of adding reagents, the pH and temperature, the agitation or stirring rate, the ionic strength, and the time between the precipitate’s initial formation and the moment of capturing the color.

Method developed by us for analysis of color solutions9,10 can be used in the case of passing polychromatic or monochromatic light through the color solution. It is well known that, turbidimetric and nephelometric measurements of the turbid solutions are not affected by whether polychromatic or monochromatic light used. Therefore, it can be expected that both variants of the method for measurement of colored solutions will be appropriate to measure the turbid solutions. In the work presented here, the measurement of turbid solution is done as a polychromatic light is passed through the solution. The aim is firstly to develop simplified variant of implementing the analysis in relation to the apparatus (without monochromator).

Fig. 1 shows photographs of turbid solutions obtained when solutions with different concentrations of Cl- and SO42-, respectively are precipitated with solutions of AgNO3 and BaCl2. It can be seen that the photographs of turbid solutions with varying concentrations of solid particles, respectively of AgCl and BaSO4, suspended in turbid solutions, differ well from each other. Obviously, there is an existence of a correlation between the concentration of the suspended substance and the degree of turbidity in the image of the turbid solution. To higher concentration corresponds more turbid solution.

А

В

Fig. 1. Images of turbid solutions. A. Suspensions of AgCl. B. Suspensions of BaSO4. From left to right, the concentration of suspended solids particles increases.

To determine turbidity of a solution, the background of solution image, obtained by the camera, should be omitted. Two ways have been tested for this purpose: by selecting, with a computer mouse, a rectangular area on the image, and by clearing the background, using a software program. When the image of a turbid solution by somewhat reason is not thoroughly homogeneous, it can be chosen homogeneous part of the image. This procedure of manual selection, however, is slow and tedious. With the development of our software, it becomes possible with a single command to clear the background from all images available.

The digital image is composed of a large number of colored dots. Digital camera uses RGB colorimetric system12. Individual colored dots on the image of this system are considered as a mixture of different amounts of three primary colors: red (R), green (G) and blue (B). Levels of the individual colors are normalized with numbers from 0 to 255, called tristimulus values. So in a color camera image is in the form of a set of numbers - digital image. As can be seen from Fig. 1, the image of a turbid solution is uniform and should be represented by its three tristimulus values: R, G and B. In fact, the image contains many different tristimulus values.

Fig. 2 shows statistical distribution of tristimulus values of turbid solution (suspension of AgCl). It can be seen from the graph that each R, G and B value varies in the range of about 20 units. Two ways for determining three tristimulus values, representing an image, are used in our work. According to the first one, for trististimulus values of an image are accepted to be values of R, G and B that are most presented in the image. It meets the highest overlap (dominant) color in the image, while other less present values in the image and corresponding colors are ignored. We studied two options to determine the most frequently occurring tristimulus values in the image. The first option is to determine most frequently simultaneously appeared three (R, G and B) tristimulus values. That corresponds to the most frequently recurring color points in the image. According to the second option, it is found the most commonly occurring in the image tristimulus values of R, tristimulus values of G and tristimulus values of B. These are the values corresponding to the three peaks of the graphs given in Fig. 2.

Fig. 2. Statistical distribution of tristimulus values of R, G and B of turbid solution of AgCl.

Second way for determining the three tristimulus values of the image is by averaging. An average R value is calculated from all R values in the image. In the same way is calculated the mean values of G and B, and the image is defined by these three average values. In the case when the distribution curve of tristimulus values is symmetrical Gauss curve, the tristimulus values determined by both ways: averaging and most often repeated tristimulus values, are one and the same. Distribution curves given in Fig. 2 are almost symmetrical. Our experience in different ways of determining tristimulus values of turbid solutions, gives similar results for tristimulus values. In this work the tristimulus values were determined by averaging.

Since the image of the turbid solution is expressed by its tristimulus values, and concentration of the suspended substance in the solution, respectively, the concentration of the analyte, affects the turbid solution image (see Fig. 1), a relation, required for the chemical analysis, appears to be dependence of the tristimulus values on concentration.

Fig. 3 shows the tristimulus values of, having different concentration, containing as suspended phase AgCl. Turbid solutions are prepared from solutions of the Cl- with different concentrations, which solutions are precipitated with a solution of Ag+. Linear regression analysis can be used to determine the dependence of tristimulus values on concentration and then to calculate the unknown concentration.

Fig. 3. Three - dimensional view of turbid solutions containing different concentration of suspended AgCl. Designated concentrations on the graph are those of the solutions of Cl-, from which solutions were prepared suspensions of AgCl.

The dependencies of each one from the three tristimulus values on concentration, for the same turbid solutions of AgCl, as given in Fig. 3, are shown in Fig. 4. The increase turbidity of the solutions, associated with an increase in the concentration of suspended solid particles (AgCl), respectively, of the substance to be tested (Cl-), gives a trend of decreasing in all three tristimulus values. The value of B undergoes significant changes while for R and G values the changes are less. Consequently, the analysis can be carried out using the dependency of any of the three tristimulus values on the concentration. From the viewpoint of the sensitivity of analysis, it is more appropriate to work with this tristimulus value, for which the changes are great, instead using any of the other two tristimulus values.

Fig. 4. Dependence of the tristimulus values of R, G, and B on the concentration of Cl-, for turbid solutions, resulting from the precipitation of Cl- as AgCl.

It is the same for all examples of analysis done in the work: one of the three tristimulus values undergoes great changes while for the other two the changes are slight. For analysis of SO42- is suitable tristimulus value R, and for Mo (VI) - tristimulus value B.

The proposed method has been tested in the examples for analysis of Cl-, precipitated with Ag+ as AgCl; SO42-, precipitated with Ba2+ as BaSO4; Mo (VI), determined after precipitation of MoO42- with Pb2+ as PbMoO4. Table 1 and Table 2 show results of analysis of Cl-, SO42- and Mo (VI) in two different concentrations. These results are achieved from one and the same experimental data but results in Table 1 are get when one of the three (R, G or B) tristimulus value is taken, and calculations are made using polynomial regression, while in Table 2 results are found using all three tristimulus values and linear regression analysis. It could be expected that, when all three (R, G and B) tristimulus values are in use, the results of the analysis will be better, because there are more raw experimental data. The results however do not confirm that. The reason is probably that solving a mathematical problem with four parameters (three tristimulus values and concentration), using linear regression analysis, is more complicated and therefore less accurate, than solving a problem with two parameters (tristimulus value and concentration) with a polynomial regression.