Abstract
The mechanical properties of the geo-materials are greatly affected by the internal micro structure system. Multi-scale modelling and analysis are considered as an effective tool for revealing the mechanical process. Aiming at the problems of the light intensity decrease and the uneven illumination, a Retinex scale optimized image enhancement algorithm is proposed, based on the light reflection model and Retinex theory. Based on the Retinex theory, a Monte-Carlo random geometric numerical model of the microstructure is established, with some soil specimens in South China as the study object. After that, three-axis consolidation process of soft soil materials are simulated, which are compared with the experimental data. The results show that: the Retinex scale optimized image enhancement algorithm can accurately estimate the illumination component, eliminate the influence of the uneven illumination, improve the contrast of image and retain the details of the microstructure simultaneously. The random field model with this algorithm is simple and effective, the image becomes clearer, and the contrast ratio is improved, after using Retinex algorithm to enhance the CT image of rock and soil. The threshold segmentation of the enhanced image, and the fidelity between the enhanced image and the original image, are higher than that of the homomorphic filtering method and histogram equalization method, which explained that the algorithm could preserve the microstructure information of the micro image well. The result of numerical simulation is similar with the one obtained from conventional three axis consolidation test, which proves that the simulation result is reliable.
Introduction
How to establish the relationship between macro and micro is the key problem to be solved in the study of nonhomogeneity of rock and soil materials across scales. Generally, in the research of multi-scale model, different macro and micro relationship rules are established based on different assumptions to figure out the problem of weak coupling or strong coupling scale [1–4]. In the weak coupling problem, the microscopic and macroscopic scales can be separated completely, and the microstructure is represented by a representative volume element (RVE). In the strong coupling problem, the micro-length is relatively small rather than infinitely small. In this process, the stochastic finite element method arises [5]. In other words, material characteristics (such as undrained shear strength and Young’s modulus) is arbitrary in the multiscale modeling process, and they change along the smooth curves in space, which suggests that these characteristics can be quantified by the random variables of a particular location, and the values of these variables can be described by the joint probability distribution; besides, the Monte Carlo method [6] is used to simulate the multi-scale random field. In this process, various types of random polygon units are not given freely, they are controlled by the soil parameters including pore ratio e and grain size distribution obtained in the CT images of actual geotechnical tests, so that the macroscopic performance of the micro structure of the soft soil can be guaranteed to match the actual performance to the greatest extent.
In the modelling process from CT images to the microscopic properties of soil particles, grasping the microscopic characteristics of the soil is of great importance. The human eyes can distinguish the characteristics of the different parts clearly when it comes to the observation of the sub-micron scale line under the microscope. However, the images generated by computer micro vision system become difficult to distinguish. The key reason is that the human vision system (HVS) plays the role of intelligence under the common action of the retina and the cerebral cortex [7]. For example, HVS can identify objects with different scales in a large gray scale, contrast and spatial resolution, and adapt to the uneven illumination changes of different regions. At this point, HVS is an advanced filter, and it is a high pass filter to distinguish the object from the background of uneven illumination. What’s more, it is a low pass filter to distinguish the object from the noise, and HVS can adjust the contrast and spatial resolution automatically by different light illumination [8].
After the spatial scale’s enlargement of the soil CT image by microscope, the light that represents the surface features of the object is focused by the lens on the CCD pixel, which causes a very weak induction, but the proportion of all kinds of noise is very large. Meanwhile, the point spread function of microscope has a smoothing effect on the low pass filter, which causes the loss of the image micro structure detail information, and various kinds of fuzzy factors, such as vibration, atmospheric disturbance, uneven illumination, and so on, make the image quality seriously degrade, so the quality of the image needs to be improved that the image can be observed and measured by the computer micro visionsystem.
In the field of image processing technology, scholars have studied a great variety of effective filters, including low-pass filters, high-pass filters, band-pass filters, band-stop filters and so on [9]. It is feasible to select the frequency of the pass band as needed. If the filter parameters are reasonable, the effect of noise and illumination can be removed effectively, but these parameters are often difficult to select accurately, because there is no unified method, especially the intelligent adaptive filter lacks.
The usage of the coaxial light source in the micro vision system causes uneven illumination on measurements. Except for this, the magnification of the optical microscope reduces the density of the light intensity on the image [10]. Micro vision system has many shortcomings under the interference of optical diffraction and noise, including large dynamic range of gray scale, low contrast between the fine structure and the background, low gray value of pixels on the overall image, and extremely low SNR. These unfavorable factors limit the application of image enhancement algorithm, bring new problems to the enhancement of image quality. Uneven illumination makes light intensity of the central area of optical axis strong, and it makes light intensity of the areas which are far from the optical axis comparatively dark. So that the gray value of the background pixels of the image’s central region is higher than that of the target pixel in the surrounding areas. This pixel gray level, which represents the inconsistent between the objects, is the fundamental cause that hampers the enhancement of the image. If the image histogram equalization method is used, the contrast of the image would be improved. However, this method would mess up the relationship between the gray level of the large dynamic range and the object structure property; the direct consequence is a mixture of gray values that belong to different structures and the loss of details of image structure [11].
Founded on the Retinex theory, this chapter defines the optimization criterion which is based on contrast statistics and proposed scale optimized Retinex algorithm [12]. The chapter uses image filtering technique and image enhancement method, based on analyzing the cause of hindering micro visual images enhancement, aiming at the problem of uneven illumination of the micro vision image, to enhance the micro vision image, therefore improves the contrast and simultaneously eliminating the influence of the uneven illumination.
Retinex algorithm of Scale optimization
Land proposed Retinex theory in the literature [13, 14], Retinex is the compound word of retina and cortex, which represents a model of human vision perception of color and brightness. The model considers that the human eyes can stably perceive the object’s colors and details when the same object is under different illuminations or in the shadow, without being effected by illumination change. According to the theory, the feeling caused by feature point in the human eye is determined by the reflection function of the object, this function is only related to the properties and the composition of the material, but not related to the distribution and transformation of the light intensity. Thus, in the computer vision image with uneven illumination, one or more paths can be taken around a pixel point to calculate the average value of the pixel path as the light component. The gray value of the pixel is divided by the light component to get the reflection component for eliminating the effect of the light. The center/surround Retinex using Gaussian function can estimate the light component very well. The scale parameter of Gaussian function can balance and compress the dynamic range, retaining the original image information. The larger the parameter, the more the gray dynamic range is compressed, and details will be affected accordingly; the smaller the parameter, the more the image is sharpening.
Single Scale Retinex algorithm
According to the single scale Retinex algorithm (SSR), the distribution of the light which is emitted from the surface of an object, is obtained by the intensity distribution of incident to the surface of an object multiply object surface reflection function,that is the model of the light reflection imaging. As shown in the formula (1) [11]:
In this formula: i (x, y) represents the distribution of light intensity on the surface of an object, which is related to the gray level distribution of the image acquisition system; r (x, y) represents the reflecting function of the surface of an object, reflects the morphology and material properties of the object surface. l (x, y) represents the intensity distribution of an incident light.
Gaussian function is used as a convolution sum to check the original image to do convolution, which can smooth out the details of the shape of the object, to estimate the intensity distribution of the incident light and get the light image component, as shown in the formula (2):
The Gaussian convolution kernel function is shown in (3):
In formula (3), c is the scale parameter that determines the smoothness of Gaussian convolution kernel, and λ is the normalized constant, to make G (x, y) satisfy ∬dxdy = 1. Logarithm on both sides of the (1), (2) and (3) are substituted to get (4):
Then take the exponential operation of the results obtained from the (4) model, so that we can obtain the reflection component image of the surface topography and the material distribution, and finally achieve the goal of eliminating the influence of the uneven illumination.
Micro visual image enhancement results based on histogram equalization shows that, because of the uneven illumination, the pixel dots of the same material in the micro vision image have different pixel gray level due to the different light intensity, which is the main reason of hindering the improvement of image contrast. In order to improve the gray level’s contrast between lines and substrate pixel, and avoid damaging the micro structural of the image line, appropriate Gaussian smoothing scales must be taken to estimate the light component of the center/surround Retinex model.
In the SSR algorithm, the scale parameter of Gauss convolution kernel for estimating the optical component is crucial, on the one hand, the large scale dynamic range of the gray scale which is caused by uneven illumination can be compressed by a large scale, and on the other hand, smaller scale plays a role of image fidelity. micro visual images which adopted coaxial illumination is enlarged by microscope magnification, making 68μm, width 85μm field obtain the light illumination energy dispersed to 1200×1500 pixels of image, and the image intensity density becomes extremely weak. Due to the uneven distribution of light intensity of the coaxial light source, the gray value of pixels in the central region is different from the surrounding area. If the illumination is too large, the light intensity in the center region of the image will be saturated. Thus, a moderate intensity of light is needed. But this will lead to low overall image pixel gray value, and low contrast between metal lines corresponding to the pixel gray value and the substrate pixel gray value. In order to eliminate the influence of uneven illumination, the center/surround Retinex model is the best choice, the reflection component is obtained by estimating the light component to observe the morphology of the line.
According to this feature, a selection criterion of image enhancement scale optimization is proposed in this paper, the parameters of the selected Gauss scale parameters can be optimized and the estimated light component is the best based on this criterion. In the ideal reflection component image, the gray level’s contrast of metal line and the pixel contrast of substrate are large and the difference between them is small. It is actually required that the mean value of the local contrast is large enough while the variance of contrast in different regions is as small as possible. Conversely, if the smooth transition would lead to the overlarge of the compressed dynamic range, it will lead to the combination of the pixels of different materials so that the details of microstructure will be damaged, the corresponding results include the contrast of the local area are not uniform and the variance of contrast becomes larger; If the smoothing is not enough, there is a bias in the estimation of the illumination component, the effect of uneven illumination is insufficient, still hinder the improvement of contrast, thus the average contrast is small.
From the above analysis, in order to achieve the goal of eliminating the effect of illumination uniformity and image fidelity, a selection of a reasonable scale parameter is needed. The optimization of the standard is to make the reflection image component of the local area contrast biggest, and make the variance of contrast in different regions least at the same time. So:
In (5), r (x, y, c) represents the reflection component of the pixel (x, y) controlled by c. The enhanced reflection component image is denoted as
The calculating formula of the average window contrast
According to the analysis above, based on the optimal criterion of the average value of the window contrast and variance structure scale, the calculating formula can be defined as follows:
The
To test the adaptability of the algorithm to the illumination change, the simulation experiment was carried out with the artificially simulated image. The simulated image is composed of black and white stripes with a width of 15 pixels, its structure is similar to that of the photoresist mask, simulating the intensity distribution of coaxial light source in the form of Gaussian function, The light component model is shown in the formula (10):
Where γ is the coaxial halo size, l is the modulation ratio of coaxial light and ambient light. The halo scale parameters take 265, 270, 275, ... 310, generating 10 images in the simulation. In this paper, the scale optimized Retinex algorithm is proposed to deal with the simulated image, the results obtained are put in the normalized mean square error (NMSE) operation with the original simulated image, to measure the fidelity of the image before and after the enhancement. Treatment results are shown in Table 1, although the image light component changes, the reflection component of the smoothing function is unchanged, so Gauss scale estimation values are almost the same, and the estimated value of the scale is related to the number of fringe pixels. The simulation results show that the Retinex enhancement algorithm based on scale optimization can adapt to the changes of light intensity and scale.
The simulation results of scale optimization Retinex algorithm
Retinex algorithm image enhancement result
In order to test the adaptability of the algorithm to different light intensity transformation, use the blue coaxial light to irradiate number “6” and the 7th groups of the standard line with a minimum width of 2.19μm on the calibration plate, the original image is shown in Fig. 2(a, c, e, g). Use the algorithm proposed in this paper to enhance the image, the result is shown in Fig. 2(b, d, f, h). The figure shows that the proposed algorithm can adapt to the change of light intensity, eliminate the uneven illumination and improve the contrast at the same time, and reproduce the details of the microstructure well.
a Number ‘6’ under weak light
c Number ‘6’ under strong light
e The 7 th group under strong light
g The 7 th group under weak light
b,d,f,h are the corresponding enhanced image of a,c,e,g

The micro-vision image of the 600 line-pairs/millimeter calibration board

The enhancements of micro-vision images under different illumination intensities.
The purpose of image enhancement is to observe the measurement site clearly, and to facilitate the selection of measuring points. Use histogram equalization method, the method of the filter and the algorithm proposed in this paper to enhance the microscopic images of measuring position S2 on a photoresist mask, and do the best threshold segmentation to the image which is enhanced; the results are shown in Fig. 3, it is obvious that the image which is enhanced in this paper eliminate the impact of uneven illumination in this paper, and the result of image segmentation is closer to the micro structure feature of the original image, the enhanced results of the histogram equalization method and the method of filtering can not eliminate the light component successfully.
a Original picture
b Image enhanced by histogram equalization method
c Image enhanced by the method of the filter
d Image enhanced by algorithm proposed in this paper

The comparison of enhanced micro-vision images for photomask.
In order to compare the performance of image enhancement algorithms, the method of homeostasis filtering enhancement and the method of the scale optimized Retinex are used to enhance the micro image, the visual of the enhanced image is compared, the normalized mean square errors of the original images and the images enhanced by various methods are calculated, and the fidelity between them is weighed.
Homomorphic Filtering Method is a frequency domain filtering method based on light reflection model, this method first takes the logarithm of the image, and isolates the light component image and the reflection component image, and then uses the Fourier transform to transform all the components into the frequency domain. After that, it uses the low-pass filter or high-pass filter to filter the results of the Fourier transformation. For example, low pass filter shall be adopted if the illumination component needs to be retained, and the high pass filter shall be adopted if the high frequency component needs to be enhanced. The spatial image can be obtained by Fourier transformation of the results of the filtering, and then the exponential operation is used to get the results of the enhancement. Butterworth filter and Gauss filter can be used in the method of homomorphic filtering, according to the micro visual image of the illumination model, this paper uses Gaussian high pass filter for processing, the purpose is to enhance the micro structure image component of the sub-micron scale line, The frequency response of the filter is shown in the formula (11);
Where D (u, v) is the distance between the point range frequency origin and the point (u, v) in the frequency domain coordinate. Dcut is the lower cutoff frequency of the high-pass filter, c is the parameter to control the transition surface smoothness of the filter function. The fillet surface transits from the low frequency gain rl to the high frequency gain rh.
Because the method of the homomorphic filtering has many parameters, the value of the parameters shall be determined by repeated trial, when rh = 4, rl = 0.5, c = 3.5, and the value of Dcut is between 5 to 7, the details are reserved well, but they are affected by the light greatly. When the value of Dcut is between 8 to 12, it is less affected by the light, but some parts of the details are missing. When the value of Dcut is 13 or 14, the impact of the illumination is eliminated, but the details of the micro structure can hardly be resolved at the same time, which leads to a blank image. Therefore, when Dcut = 10, the 600 line calibration block image which enhanced by homomorphic filtering method achieve the best effect, as shown in Fig. 4 (a). The results obtained from the Retinex enhancement algorithm which is using the scale optimization are shown in Fig. 4 (b). As is shown in the comparison of experimental results: Scale optimized Retinex enhancement algorithm can automatically select the scale parameters, and obtain the image with high contrast and good microstructure; when the homomorphic filtering method is used to enhance the microstructure image, it cannot improve contrast as well as reserve the details of the microstructure. The homomorphic filtering method in eliminating light component of the image, makes the implementation of submicron scale line became discontinuous; this is because the lower cut-off frequency can not be distinguished from the light component and the micro structure image component, put the line information into the light component, caused the elimination of the light component as well as the weakening of the micro structural detail image component. The enhanced results of the Fig. 4 (b) used the optimal scale parameter of 20 pixels, this value is close to the number of the pixels in the line width, which consistent with the theoretical analysis.

The comparison of enhancing algorithms for microscopic image of 600LP.
a The image enhanced by homomorphic filtering method
b The image obtained from the scale optimized Retinex enhancement algorithm
Use the histogram equalization method, the method of filtering, the scale optimized Retinex algorithm method to enhance the microscopic image of 600LP and the lithography mask measurement position S2 microscopic image, then the normalized mean square error (NMSE) is used to calculate the fidelity between the original image and the enhanced image, the results in shown in Table 2.
The fidelities of image enhancement algorithm
The original image of the microscopic image of 600LP and the results of the histogram equalization method are shown in Fig. 3, Fig. 4 (a), the enhancement results of the lithography mask measurement position S2 in shown in Fig. 4. According to the contrast of fidelity, the fidelity between the image enhanced by the scale optimized Retinex algorithm method and the original image is the highest, which is much higher than that of the the histogram equalization method and the method of filtering. Experiments show that this method can not only eliminate the effect of uneven illumination, improve the micro visual image contrast, better preserve the middle and the high frequency components of the micro structure information, but can also automatically select the parameters.
Due to light intensity decrease and the uneven illumination caused by amplification effect of microscope, the original micro image can not be simulated with ANSYS directly. Based on the method proposed in Section 3.2, the Retinex scale optimized image enhancement algorithm can accurately estimate the illumination component, eliminate the influence of the uneven illumination, improve the contrast of image and retain the details of the microstructure simultaneously. The image in Fig. 5(b) is the one after optimization.

The comparison of enhancing algorithms for microscopic image of 600LP.
According to the method of generation and random distribution of random polygon element, Visual C# has been adopted as develop tool, combined with OpenGL graphics library, to write simulation program of random geometric model of soft soil microstructure. The width and height of model, the void ratio and the percentage of each group in soil samples are input into this program as modeling parameters. It has the characteristics of less modeling parameters, easy to obtain and control, thus realize the ANSYS numerical simulation of microstructure evolution. The process is as follows:
Firstly, construct the geometric element model. All of the geometric elements in the random geometric model of soft soil microstructure are derived from the Geometry base class, which is the parent of all geometric element classes and generalizes the common properties and methods of all. The four basic geometric elements in this simulation modeling program are: Point, Line, Triangle and Polygon.
Secondly, conduct mathematical algorithm design is conducted, including the random field calculation of uniform distributed random numbers uniform distributed in random field and random numbers with known probability density functions, and vector and coordinate transformation, which can realize the coordinate transformation of each vertex coordinate from the local coordinate system to the global coordinate system when the polygon element is randomly distributed.
Thirdly, output the information in the random geometric model of soft soil microstructure to the text file. By calling OpenGL graphics library, graphical visualization module can be realized through mapping the model area and all kinds of polygon units. This module establishes the OpenGL frame in the program and initialize it by the steps of obtaining the view device description table, setting the pixel format, creating the drawing description table, and setting the drawing scene. After that, the OpenGL drawing function is used to draw the polygon element, according to the coordinate of each vertex of the polygon element.
Finally, ANSYS parametric design language (APDL) is used to save the geometric information of each polygon element and model region in the random model of the soft soil microstructure into the ANSYS command stream file. The ANSYS Import function is used to read the file, which can import the saved model into ANSYS.
We present a random field model of a typical soft soil consolidation process in the Pearl River delta area of China. Based on the existing test data from the selected silt clay, the soft soil microstructure random field model is modeled with self written codes and the data.
As shown in Table 3, the established model of soft soil microstructure is relatively close to the actual soil sample statistically. Figure 5 is the contrast image of the soil microstructure random field model of soil sample and actual soil sample microstructure, where the black polygon represents the pore unit, polygons in other colors represent different kinds of structural units, and the remaining white space representsstructure connection. In soil sample actual microstructure image, the black part represents the pore, and the white part represents the soil skeleton. The soil sample microstructure random field model and the soil sample actual microstructure image are relatively similar, which proves that the proposed modeling method is practical and effective. a Soil microstructure random field geometry model b Scanning electron microscopy images of microscopic structure
Microstructure geometric model component statistics of soil sample compared with the test results
The soil samples from an expressway in the Pearl River delta area of south of China are collected to conduct the indoor triaxial consolidation test. In this test, the curves of pore water pressure versus time of the soil samples are measured. Then the data of the indoor triaxial consolidation test will be used to conduct the finite element numerical simulation study with the geometric model above.The parameters of random field geometric model will be given shown as Table 4.
Parameters of triaxial consolidation test
Parameters of triaxial consolidation test
This finite element simulation uses the ANSYS to analysis the two-dimensional 8 node plane element (PLANE82) in the software, this element has good adaptability and high precision, and it can be well adapted to the curve boundary.
Because the soil is mainly composed of micro powder and clay at the micro level, so the 3 types of materials, including structural connection, powder particle unit and flocculation unit, are defined. the powder and the flocculation unit use the linear elastic model in the ANSYS material library, the connection structure using Drucker Prager model (Drucker-Prager, DP). Specific parameters are shown in Table 5.
Material parameters of the finite element model
Material parameters of the finite element model
Determine the unit type and the type of material, and then divide the grid, taking the accuracy of the calculation into account. The size of the dividing cell is set as 2μm, select quadrilateral mesh, the results of the model are shown in Fig. 6. The dimension of this model mentioned above is μm, which is just a small area in the soil sample. Actually, the model is restricted by the soil skeleton around, so that the boundary conditions can be treated as follows: nodes at the bottom of the model are imposed displacement constraints along horizontal and vertical direction, nodes at left and right sides of the border are imposed displacement constraints along horizontal direction.

Finite element mesh.
To verify the validity of the results, Timehist postprocessor is used to measure the displacement of each element node at each time step in this paper. Through statistical method, area compression at each time step can be measured and body strain is figured out. Comparing the body strain with the practical one (such as Fig. 7), it is shown that the trend of simulative and practical curves are similar, which proves that the results of simulation are practical and reliable.

Volumetric strain comparison of model computation results with triaxial test results within each substep.
Intercept the 10, 50, 100, 200, 300, 500 sub steps of simulation data, count the boundary of each sub step model and the displacement of each node on the right boundary, average them respectively, the curves of average compression of the model’s vertical and horizontal directions are therefore obtained.
Structural unit volume and pore structure are one of the most important factors in the microstructure of soft soil, and also play a decisive role in the engineering mechanical properties of soft soil. The Monte Carlo method has been used to generate a certain amount of polygon unit in random shape, size and surface characteristics, which represent all kinds of structural units of soft soil microstructure and pore, and these units are randomly distributed to the area of a given size, and the stochastic geometric model for the microstructure of soft soil is established. In this paper, we aim at the decrease of the light intensity caused by the amplification by an optical microscope and the problem of uneven illuminations hindering to the enhancement of microscopic images, based on the light reflection model and Retinex theory, proposes the scale optimized Retinex algorithm method. Simulation and experimental results show that: the algorithm is suitable for the coaxial light source with different scale and intensity, and can estimate the light component and the reflection component accurately. The results of the enhanced image are higher than that of the method of filtering and histogram equalization. It shows that this algorithm can preserve the microstructure information of the micro image while enhancing the image. With visual C# as the development tool, combined with OpenGL graphics library, soft soil microstructure random geometric model of simulation modeling program is compiled, and the mircostructure of the soft soil samples is simulated. Comparing the simulation results of different time steps of the model and the results of the three axes of soil samples, the results show that the change trends are basically the same, on the one hand, the results show that the consolidation process of soft soil on the macroscopic scale is the result of the deformation of the micro structure on the micro scale, on the other hand, the feasibility of the modeling method is verified. The random geometric model of soft soil structure proposed in this paper based on the soil void ratio and percentage of each grain group which are obtained from conventional soil tests, the needed modeling parameters are few and easy to obtain.
Footnotes
Acknowledgements
This research work herein has been supported by the National Natural Science Foundation of China (No. 51678578 & 51108472), the Natural Science Foundation of Guangdong China (No. 2016A030313233), the Guangdong Provincial Science & Technology Program of China (No. 2015A020217004), the Department of Communications of Guangdong Province of China (No. 2016-02-026) and Guangzhou science and technology plan projects (201704020139).
