A new approach for particle size characterization of soil based on dynamic image analysis (DIA)

Particle size distribution (PSD) affects soil behaviour and plays a main role in geotechnical engineering. In site investigations of large engineering structures, in earthquakes and liquefaction research and before filter material selection, it is necessary to make a number of PSD analyses. There are two popular techniques to determine PSD in the lab: sieving for the coarse-grained samples and hydrometer analysis for fine-grained samples. However, determining the PSD of soil in the lab has some challenges such as time, labour, difficulty and errors related to the analysis. The newly developed dynamic image analysis (DIA) method based on wavelet transformation (WT) analysis is used as the main approach for determining particle size distribution. The DIA method contains saving the image and processing it with the software for a specified goal. The DIA method holds many advantages over the hydrometer analysis, including automating the test, reducing errors, monitoring and evaluating the particles at any time. In this paper, the PSD of fine-grained soil with a plasticity index (PI(=30 has been determined. The images of soil were prepared with a digital camera at a different time when particles settled through a sedimentation cylinder and were analysed with MATLAB software. The results were compared with the hydrometer analysis. The results showed that at t=15 min, a complete overlapping was seen between the DIA method and hydrometer analysis. The D20, D50 and D80 values by the DIA method were determined respectively, 0.0017, 0.012 and 0.031 mm at t=15 min. The results demonstrated that the DIA technique can be implemented for all types of fine-grained soils, more easily than the hydrometer analysis. The differences between the methods’ results were raised due to the amount of data provided by them.


Introduction
The PSD of soil is one of the most essential and vital soil properties (e.g., Tafesse et al., 2012). In civil engineering, particle size distribution is used to predict engineering properties, such as the groundwater drainage, fill material and soil improvement method. PSD is used to estimate soil behaviour, such as liquefaction (e.g., Tabrizi-Zarringhabaei et al., 2019). There are two common methods to determine PSD: sieving for coarsegrained soils and hydrometer analysis for fine-grained soils.
Hydrometer analysis is based on the principle of sedimentation and Stoke's law so it has some limitations (e.g., Ghasemi et al., 2018). It presumes that all soil particles are globular, but some particles are plate-shaped and flaky. The container, which is not infinitely long, while Stoke's principle is for infinitely free falling particles. A lot of particles are used in the hydrometer analy-sis while Stoke's law is for a single particle. Hydrometer analysis is a time-consuming process.
Image processing would be a practical alternative to make an accurate measurement of particle size distribution. Image processing is the use of computer algorithms to create, process, communicate and display digital images for specified purposes. The image analysis techniques can be summarized in four basic steps: taking photographs with a digital camera, storing the image file as a digital file, image processing to edit the digital images for specific analysis, and analysis of the modified image to quantify the properties of an object (Dipova, 2017). The imaging method has some advantages over hydrometer analysis such as less errors, preparation of visual data of the soil and it is fast and easy.
Image analysis is used for detailed works of many disciplines, including medicine, genetics, biology, textiles, food science, geology, physics, chemistry, agriculture, forestry, mining, computer engineering, civil engineering and environmental sciences. For example, an MRI plays a crucial role in many medical treatments  (Pham et al., 2000). Image analysis is used for cancers and heart diseases diagnosis (Wang et al., 2009). Determining an individual's identity by image analysis (Jain et al., 2006). The image processing method has been applied increasingly for food quality evaluation (Du and Sun, 2004). Machine vision systems provide quality control and real-time feedback for industrial processes, overcoming physical limitations and subjective judgment of humans. The image processing techniques for developing a low-cost machine vision system for pharmaceutical capsule inspection has been explored (Islam et al., 2008). Eremin (2006) used an imaging technique for quality control of a sheet metal roll. Imaging techniques are also used in the field of engineering. Kuo et al. (1996) used image analysis of gravel particles for controlling asphalt quality. Later, a particle shape factor was determined (Kuo and Freeman, 2000;Sukumaran and Ashmawy, 2001). The imaging method was used to control pavement performance (Tutumluer and Pan, 2008). Sukumaran and Ashmawy, 2003 correlated particle shape and angularity obtained from images with hopper flow rates and pluviated void ratios. Bowman et al. (2001) used fourier shape descriptors to determine the particle shape. Later, this method was used to determine the creep (Bowman and Soga, 2003). The powder characteristics in the viscosity model were analysed in terms of the interparticle distance. The newly developed image processing method to quantify the interparticle distances for powder particle sizes can enhance the understanding of physical phenomena in various industrial applications because the interparticle distance enables a quantitative analysis of rheological characteristics such as viscosity or powder agglomeration (Park and park, 2018). Using digital images of soil horizons, their boundaries, and purity were evaluated. Soil profile images in JPEG format were taken from 17 morphologically different soil profiles using a digital camera. Soil colour models and image texture features were extracted from the soil profile images, and k-means clustering was used to segment the soil profile. Four models with different input variables were compared, and soil horizon boundary features (distinctness, tortuosity, mean curvature, and topography) and horizon features (thickness and purity) were calculated (Zhang and Hartemink, 2019). Based on digital image processing, an automatic generation method of PFC∼2D numerical model of soil-rock mixture microstructure was proposed, and the experimental simulation was carried out with MATLAB. Thus, the rapid, real and automatic modelling of heterogeneous material microstructure by PFC∼2D software was realized (Pengfei and Xingping, 2019). Araujo et al. (2015) studied the use of image analysis together with the degree of sphericity and fractal theory as a tool to measure the textural parameters of the shape and surface texture of two types of quartz sands. A laboratory testing program was used to evaluate the feasibility of using a digital image analysis technique to track deformation of geosynthetics during tensile testing. The technique developed in this study offers great potential to determine deformations in geosynthetics.
As mentioned above, determining the particle size distribution through imaging techniques has been widely used in studies. However, none of them have focused on dynamic image analysis. The aim of this study is to explain a new method called dynamic image analysis for determining the PSD of fine-grained soil.

Testing apparatus and instrumentation
The device uses a sedimentation cylinder and a high magnification camera (Canon 70D) to take an image of the cylinder and micro-lens for magnification. A spacer is also used between the micro-lens and the camera. The spacer is used to increment the magnification factor of an obtained image so that tiny particles will look larger after it is magnified. In the end, a computer system is utilized for controlling the input and to display the output results. All these tools are shown in Figure 1.

Wavelet transformation analysis
The soil is immediately dropped into a water-filled sedimentation cylinder through a funnel. The soil grains are separated along the way downward into the sedimentation cylinder. When the soil particles are settling, a stable camera is used to take images of the soil. The separation of grains is necessary for dynamic image analysis to create valid outcomes. The nine images of fine-grained soil were prepared with a digital camera when the hydrometer was read and analysed with MATLAB software. The results of the dynamic image analysis method were compared with the hydrometer analysis. All the other test conditions such as soil, amount of soil, sample preparation, temperature, etc. are the same for both the dynamic image analysis method and the hydrometer analysis.
In this paper, wavelet transformation is utilized for analysing the images of the sample and determining its PSD. This technique uses the wavelet transform and the quantity of energy included at each wavelet decomposition level. The energy of a level relies on the grain size in images. At each decomposition level, energy is calculated. The total energy in the 3 directions at the i-th level is calculated by Equation 1: (1) Where: E i -energy of each decomposition level, E Horizontal i , E Vertical i , and E Diagonal i -energies in horizontal, vertical, and diagonal directions, respectively.  The E i is a calculation of the size of discrepancies among the mean grayscale amounts of neighbouring zones in the image.
The E i gets mutually bigger for very big images. The real E i values are not very helpful since values increase only with the image size, but the distribution of energy by decomposition level is useful. According to this, the E i for all levels must be normalized by the total E i of the main image by Equation 2: (2) Where: E normalized -the total amount of it is a hundred percent. Therefore, the effect of ambient conditions was almost omitted by using it at each level. The energy distribution between the decomposition levels is used to cal-  where WI is well matched to pixels per grain diameter (PPGD). (3) Where: WI -wavelet index of each decomposition level, i -number of decomposition level.
The relevance among WI and PPGD is expressed by Equation 4: (4) Where: PPGD -pixel per grain diameter. The real grain size is then calculated by Equation 5: Where: D -is equal to the diameter of the sample grains (mm), M -is equal to the camera magnification (Pixels/mm).

Materials
The soil geotechnical properties are given in Table 2. The soil sample is shown in Figure 4. The sample for this study was taken from Tabriz city. The soil sample was classified as (CH) according to ASTM D2487. The example of the sample image is shown in Figure 5 and the black dots are soil particles.

Results and discussion
The results of the DIA at different times are shown in Figures 6, 7 and Table 3. The hydrometer analysis was carried out in a laboratory and its result is shown in Figure 8 and Table 3. Table 3 shows that the difference of the D 80 values between the DIA method and hydrometer analysis at time 0.5 min to 1440 min respectively are almost 22.5, 18.4, 11.4, 6, 0, 3.3, 6.8, 24, 47%. The difference between the DIA method and hydrometer analysis in D 50 values at the different time respectively are almost 25, 20, 7.6, 0, 0, 20, 22.4, 41.1, 71%.
The results of the dynamic image analysis method and hydrometer analysis were compared and show that at t=15 min, a complete overlapping was seen between the DIA and hydrometer analysis methods. The results  show that at time 0.5 min up to 1440 min, the curves moved to the left because bigger particles settled fast. According to Table 3, at time 0.5 min up to 1440 min, the particles get smaller. The differences in hydrometer analysis and dynamic image analysis results are because of the fact that the hydrometer analysis makes just nine data points compared to a lot of information by the dynamic image analysis technique. A good agreement was seen between the dynamic image analysis method and hydrometer analysis. According to Table 2, the soil name is fat clay (CH). Since fat clay has a high plasticity index and it is closer to the clay, the DIA method and the hydrometer analysis are different. Therefore, when the plasticity index increases, the soil clings to the clay and the difference between the DIA and hydrometer analysis methods increases because particles get smaller. Table 3 shows that the difference of the D 20 values between the DIA and hydrometer analysis methods at time 0.5 min to 1440 min respectively are almost 45. 1, 43.3, 43.3, 43.3, 0, 21.4, 21.4, 21.4%. The D 50 values for the entire duration of the DIA method are closer to the hydrometer analysis. The results showed that when particle size decreases, the difference between the DIA method and hydrometer analysis increases.

Conclusions
Proper classification of earth material is essential for the anticipation of soil behaviour. For classification by either the AASHTO or the Unified Soil Classification system, the soil grain size distribution must be determined. The grain size distribution provides quantitative estimates of the engineering behaviour of soils. However, the characterization of particle sizes in the lab has some difficulties and is a time-consuming process. This paper describes the development of a computer vision algorithm designed to process the images collected using a digital camera to determine the PSD of fine-grained soil. The new method is termed "DIA", which combines rapid soil grain segregation by size through a waterfilled sedimentation column with image processing to measure the grain size distribution. The images of finegrained soil prepared with a digital camera at a different time when particles were settled through a sedimentation cylinder and were analyzed with MATLAB software. The results were compared with a hydrometer analysis. However, DIA has the potential to simplify and decrease error compared to the hydrometer analysis. The D 20 , D 50 and D 80 values by the DIA method were determined respectively, 0.0017, 0.012 and 0.031 mm at t=15 min. There is complete overlapping between the DIA method and hydrometer analysis results at t=15 min. The results showed that at time 0.5 min up to 1440 min the gradation curves move to the left because bigger particles settled fast. The differences in hydrometer analysis and dynamic image analysis results are because of the fact that the hydrometer analysis makes just nine data points compared to a lot of information by the dynamic image analysis technique. The dynamic image analysis test is a suitable alternative to hydrometer analysis for sizing particles. The PSD of fine-grained soil could be determined by one image at t=15 min so the DIA method is fast.