## 2 Materials and Methods
First, the wet and dry images were pre-processed by the following expression for dark current correction, flat field correction and neutron flux fluctuations correction [4]  
\[ \begin{split} I_{\text{wet}}=&\ f_{\text{r}}\frac{I_{ \text{wet sample image}}{}^{-I}{}_{\text{dark field}}}{I_{\text{flat field}}-I_{\text{dark field}}},\\ I_{\text{dry}}=&\ f_{\text{r}}\frac{I_{\text{dry}} \text{ sample image}{}^{-I}{}_{\text{dark field}}}{I_{\text{flat field}}-I_{\text{dark field}}},\end{split}  \tag{1}\]  
where \(f_{\text{r}}\) is the factor to correct the neutron beam fluctuations and is equal to the ratio in the mean intensity values of the same no object area between the sample images and the flat field images. A median filter (3 \(\times\) 3 pixels) was used to remove bright spots due to scattered \(\gamma\)-rays in the normalized images (\(I_{\text{wet}}\) and \(I_{\text{dry}}\)). The normalized wet images \(I_{\text{wet}}\) were divided by the normalized dry images \(I_{\text{dry}}\). As an example, the pre-processed image of FA10 after 273 min of water absorption is shown in Figure 5a. The area inside the yellow box is the region of interest (ROI), which is manually selected to overlap with the sample area as much as possible. The mean intensity value of ROI as a function of distance from its bottom edge is given by the blue line. We can see that the blue line has an obvious jump. The jump area corresponds to the water front in FA10. The areas before and after the jump correspond to the wet and dry areas in FA10, respectively. It can be seen from Figure 5a that the water front in the cement-based sample can be observed through the average intensity distribution of the pre-processed image. However, the shape of the water front and the average height of the water front cannot be obtained because the edge appears fuzzy in the pre-processed image. Therefore, edges (including sample edges and the water front) play a very important role in our process of image analysis. We need an algorithm that can effectively smooth the image without blurring the edges. The Kuwahara filter [18; 19; 20] is an algorithm that meets these requirements. Therefore, the Kuwahara filter was selected for further processing. Figure 4: Schematic diagram of sample placement. The result of using Kuwahara filtering is shown in Figure 5b,c. We found that by using the Kuwahara filter alone, it can give a clear water front, but the position of the water front is not accurate (black line) compared with the result of the pre-processed image (blue line). The Kuwahara filter combined with the Gaussian filter [21] can give a clear and accurate water front (red line). Therefore, the Gaussian filter and the Kuwahara filter were used together after the image had been pre-processed. After we get the clear and accurate shape of the water front, another question arises, i.e., how to get the average height of the water front. Since our spatial resolution is 0.15 mm/pixel, the water front is composed of 167 pixels (25/0.15 mm) in our images. The height of the water front is the average of the heights of these 167 pixels. The calculation method of the average height of the water front is shown in Figure 6.  
Figure 5: Examples of the resulting images and their mean intensity values as a function of distance from the bottom edge of ROI: (**a**) a pre-processed image; (**b**) the image processed by Kuwahara filter; (**c**) the image processed by Gaussian filter and Kuwahara filter. Figure 6: Schematic diagram of the water front average height calculation method. Figure 11: Neutron imaging depicting water front movement as a function of time in MP10. Figure 12: Neutron imaging depicting water front movement as a function of time in MP20. Figure 10: Neutron imaging depicting water front movement as a function of time in FA60.