Speckle Pattern Acquisition and Statistical Processing for Analysis of Turbid Liquids

Analysis and fine distinction of turbid fluids are challenging since standard techniques, usually applied to transparent liquids, fail to work properly due to scattering losses. The phenomenon of the speckle pattern, which arises when such liquids are illuminated by coherent light, can be successfully applied to investigate the properties of these media. In this work, we exploit a simple instrumental configuration combining a laser diode and a PC-interfaced, digital CMOS camera for acquiring images and video of speckle patterns generated by illuminating turbid fluid samples that were obtained by dilution of opaque suspensions, such as commercial vegetable milk. By processing the acquired image sequences, we have been able to extract several statistical parameters that can be correlated with the concentration of the scattering elements of each sample, allowing an easy differentiation of the various fluids.


I. INTRODUCTION
The phenomenon of speckle pattern was observed for the first time in the early Sixties by Rigden and Gordon [1] and by Oliver [2] while working with He-Ne lasers. Indeed, they found out that if an object with a nonuniform surface (i.e., characterized by irregularities with dimension of the same order of magnitude of the wavelength) is illuminated by highly coherent light, then diffused light acquires a peculiar granular appearance. The detailed pattern of this granularity does not directly reflect or reproduce the macroscopic structure or irregularities of the illuminated object, but it appears chaotic and messy, and its features has to be extracted and explained using the probability theory and statistics [3]. If the illuminated object is in stationary conditions, then the speckle pattern is static and its distribution does not change in time. Traditionally, detection techniques based on analysis of the static speckle pattern have been employed, for example, to study the roughness of surfaces [4], [5], to measure the thermal strain and the elastic modulus of mechanical specimen [6], and to detect the absolute position [7] of targets. On the other hand, if the illuminated object is moving or it undergoes structural variations in time, the generated speckle pattern changes in time accordingly. In particular, if light is scattered from a large number of single diffusive elements (such as particles in a liquid), the speckle pattern appears blinking and the phenomenon is referred to as dynamic or time-varying speckle pattern [8]. The study of the properties of dynamic speckle pattern has found application in several fields, in particular, for the investigation of biological tissues and samples since it is a remote, contactless, and non-destructive detection tool [9], [10]. For example, it has been used to monitor blood flow [11], [12], [13], to study the activity of microorganisms [14] and the growth of bacteria [15], and to observe ripening of vegetables and fruits [16]. More recently, methods based on excitation and analysis of the speckle pattern have been used to investigate turbid media that cannot be studied with traditional methods applied to transparent liquids. For example, Héran et al. [17] analyzed separately the p-and s-polarized speckle pattern combined with a chemometric approach to predict the absorption and scattering coefficients of turbid fluids. Yan et al. [18] used a transmission configuration to collect images of the speckle pattern produced by illuminating suspensions of plastic microspheres with a He-Ne laser; then, they used machine learning for the automatic recognition of the samples. Endo et al. [19] used a very similar configuration and applied convolutional neural networks to discriminate between the size and concentrations of microplastics.
In this work, we apply a simple instrumental configuration based on a low-cost semiconductor laser and a PC-interfaced, digital CMOS camera to acquire videos of speckle patterns, generated by irradiating scattering fluids; image sequences are further processed, analyzed, and compared with the aim to distinguish samples with different particulate concentration. Whereas, in general, demonstration of the functionality of innovative analytical techniques has been carried out on phantoms, such as specialized mixtures prepared in the laboratory; the fluid samples tested in our work were obtained by water dilutions of commercial rice milk that naturally contains lipid micelles acting as scattering particulate. After acquisition, speckle pattern images were elaborated to extract several statistical parameters that can be correlated with the concentration of scattering elements. Preliminary results show that the proposed technique allows to easily differentiate samples with different vegetable milk concentration.

II. INSTRUMENTAL CONFIGURATION
The instrumental configuration used for carrying out experimental measurements on turbid samples is reported in Fig. 1. A semiconductor laser (L658P040, Thorlabs, NJ, USA) emitting a maximum optical power of 40 mW at 658 nm is used as the light source. As reported in the literature, although using partially coherent sources could destroy the quality of the speckle pattern, the effect becomes negligible for semiconductor lasers with relatively long (>100 µm) coherence lengths [20]. Considering that the measured linewidth of the selected laser is of the order of 50 pm, its coherence length is approximately 6.4 mm, and thus, sufficiently long. The laser is powered through a current supplier and connected to a temperature controller for thermal stabilization to avoid fluctuation of the emitted optical power spectrum. An aspheric lens (C230260P-B, Thorlabs, NJ, USA) is used to direct the radiation onto the surface of a transparent polystyrene cuvette (volume of 4.5 mL, 10 mm × 10 mm × 5 cm) containing the liquid under test, at an angle δ ≈ 30 • . The laser spot on the cuvette has a diameter of 1 mm. Because of the angle of incidence δ, the surface of the scattering volume irradiated by the laser has an elliptical shape with axes length equal to d 0 = 1 mm and d 0 /cos(δ) ≈ 1.15 mm, as indicated in Fig. 1. Since semiconductor lasers emit radiation with elliptical polarization, a thin film linear polarizer is positioned in front of the lens to select only the polarization component along the main axis of the ellipse. Images and videos of the speckle pattern generated by the scattering fluids are acquired using a monochrome CMOS camera (Grasshopper3 GS3-U3-41C6NIR, FLIR System Inc., OR, USA) located in front of the cuvette, on the same side of the laser, at a distance of 16 cm. The selected orientation of the camera with respect to the direction of the laser beam prevents the reflected radiation form the front side of the cuvette to reach, and eventually saturate, the CMOS sensor. Moreover, in this way a high-intensity source of coherent light background noise is removed. The CMOS sensor has a size of 11.26 × 11.26 mm and a total number of pixels of 2048 × 2048; the dimension of each pixel is 5.5 × 5.5 µm. A second linear polarizer, identical to the previous one, is placed in front of the CMOS sensor. The camera is universal serial bus (USB)-connected to a laptop that allows to control the acquisition parameters by means of a proprietary software. Acquired videos are then processed by a custom written MATLAB script.

III. EXPERIMENTAL RESULTS
Experimental investigations were carried out on nine different turbid samples obtained by dilution, with deionized water, of commercial rice milk (Coop Italia, Italy) containing 11 g/L of lipids and 130 g/L of carbohydrates (among them 64 g/L are sugars), as declared in the nutrition facts on the package. Hence, samples with rice milk concentrations C rice milk of 22.22, 28.57, 33.33, 40.00, 50.00, 55.55, 66.67, 76.92, and 100% v/v were considered, corresponding to a concentration of lipid micelles as scattering elements of 2.44, 3.14, 3.67, 4.40, 5.50, 6.11, 7.33, 8.46, and 11.00 g/L, respectively. Each sample can be considered as a suspension of scattering microparticles (the lipid vesicles) surrounded by a liquid matrix mainly composed of water and sugar, as schematically depicted in the cuvette shown in Fig. 1 using yellow circles. According to data reported in the literature [21], the diameter of lipid vesicles suspended in rice milk is distributed between 0.5 and 100 µm. Hence, considering that the laser wavelength is 658 nm, the scattering process is mainly dominated by the Mie and Tyndall scattering regimes [22]. During experimental testing, the laser driving current was set to 81 mA and the temperature stabilized to 25 • C. The camera exposure time and framerate were set to 0.8 ms and 90 frames/s, respectively. Such value of the exposure time was chosen in order to reach a trade-off between a good signal-to-noise ratio with a sufficiently high value of intensity on one side, and the negative effect of the Brownian motion of the scattering elements in the fluid on the other side, since a longer exposure time would destroy the speckle pattern [15]. Videos were acquired in raw format with a depth of 8 bit, leading to 256 gray levels, ranging from 0 (corresponding to black) to 255 (corresponding to white). For every sample, a video of 100 frames was acquired. The inset in Fig. 1 shows an example of speckle pattern frames typically acquired for samples with the highest (100% v/v) and lowest (22.22% v/v) rice milk concentration, respectively. By a visual inspection, it is possible to notice the differences between the two pictures. The frame related to the 100% v/v rice milk sample is brighter and with higher contrast. Data acquired with the camera were elaborated in MATLAB environment. Each video was treated as a stack of 100 single images and a dark-background frame, recorded with the laser off, was subtracted from each frame. Then, the average intensity (in gray level) of each frame for every video acquired was computed, as displayed in Fig. 2(a): the average intensity depends on the concentration of rice milk. In particular, the recorded average intensity is the result of the superposition of two counteracting effects. Indeed, when diluting rice milk with increasing content of water, the concentration of scattering elements decreases, which would induce a reduction of the recorded average intensity. On the other hand, by adding water, the refractive index difference between the lipid vesicles (that is around 1.42-1.45 RIU [23]) and the surrounding matrix increases, which would lead to a higher collected intensity. For the tested concentrations, the decrease of scattering particulate with dilution prevails on the refractive index step increase. The average intensity as a function of the rice milk content is reported in Fig. 2(b), together with the median and the mode, as the main statistical parameters. They all exhibit a quadratic behavior as a function of the rice milk concentration as reported by the equations of the quadratic fitting with a high coefficient of determination R 2 . In particular, the relationship of average intensity, median, and mode versus concentration follows a linear behavior for C rice milk < 60% v/v, whereas it tends to saturate for higher concentrations. Such non-linear behavior can be explained by considering the two counteracting phenomena previously mentioned. Then, in order to study the whole distribution of the gray levels in the images, with the aim to extract some parameters not strictly depending on the intensity measurement, the histograms of the gray level distribution of the speckle pattern in the different frames were retrieved for all the samples. Fig. 3(a) reports ten histograms for each of the nine dilutions that we have analyzed. Their shape resembles the probability distribution of integrated blurred speckle patterns reported in [24]. Also, such histogram profile has been observed in another work exploiting semiconductor lasers for speckle generation [20].
It is possible to observe that the shape and the characteristics of the histograms depends on the rice milk concentration. Indeed, when the concentration of milk decreases, the histograms tend to shift toward lower levels of gray meaning that the frames tend to become darker in agreement with average, median, and mode reported in Fig. 2(b). Moreover, for decreasing values of C rice milk the histograms tend to become more symmetric with respect to the mode and the pixel intensity tend to gather over a narrower range of gray levels. To provide a quantitative analysis of such features, two additional statistical parameters, the kurtosis and the skewness, were computed. Kurtosis, reported in Fig. 3(b), is a measure of the tailedness of the gray level distribution: for every sample: the kurtosis is positive and it increases when the concentration of rice milk decreases. It is also interesting to notice that the standard deviation of the kurtosis decreases for increasing values of milk concentration. The same behavior is also followed by the skewness [Fig. 3(c)], which is an index of the distribution asymmetry. It is always positive but it decreases for higher concentrations of rice milk. From the investigation of these statistical parameters (average, median, mode, kurtosis, and skewness), which are easily extracted trough image processing, it is possible to distinguish different turbid samples characterized by a different content of scattering elements.

IV. CONCLUSION
In this work, we have illustrated the preliminary results of our investigations on turbid fluid distinction that employ a simple low-cost instrumental configuration for the acquisition of speckle pattern frames generated by illuminating rice milk diluted samples with a semiconductor laser. After the acquisition of experimental data, we extracted five statistical parameters that can be correlated with the concentration of scattering elements of each sample. Hence, by computing the average, median, and mode of the gray level intensity of scattered light and by retrieving the kurtosis and skewness of the entire gray level distribution, it is possible then to finely discriminate the concentrations of scattering elements. Among future perspectives, there is surely the need for investigating more complex statistical parameters such as the gray level co-occurrence matrix and the geometrical properties of the speckle pattern grains (such as area and diameter) and the interest in applying machine learning for the automatic recognition of samples. Further studies with this technique could also contribute to a better comprehension of the relationship between the speckle pattern and the transparent matrix that surround the scattering particles. Since the proposed detection technique is contactless, remote, and label-free; in the future, it could be exploited to measure biological samples and other kinds of liquid foods. A very interesting application would be the recognition of different types of milk and the identification of their adulteration.