## 3 Image Processing Workflow  
### Image Smoothing  
Subject to equipment operating conditions in image signal acquisition processing, as well as external conditions, such as temperature and changing stressors, scanned digital rock images will inevitably generate some noise. Noise influences the analysis of authentic image characterization. Consequently, de-noising is the primary/initial requirement for image smoothing [19]. The more commonly used method for denoising is the digital image filtering method, which mainly includes mean (average) value filtering, median filtering, and Gaussian filtering [20]. More specifically, mean filtering is indicative of a filter template in which the mean grayscale value of each pixel is obtained, whereas median filtering indicates that, within the filter mask, each pixel is assigned a median grayscale value. In Gaussian filtering, however, each point in the center of the filter mask is a target point and the weighting of the remaining points follows the Gaussian distribution, thereby calculating the grayscale value of the target point. In accordance with the corresponding principles, images processed by mean filtering were smoother; however, there was poor processing of image feature boundaries while median filtering had a fixed effect on preserving feature boundary processing. Gaussian filtering was mainly applied to reduce Gaussian noise. Additionally, smallest unvalue segment assimilating nucleus (SUSAN) smoothing (the SUSAN noise filtering algorithm) [21] was also applied in digital rock image smoothing. The principle of SUSAN smoothing is that, within the given filter template range, the threshold is set for the grayscale difference with the target point. A large weight is given to the point where the grayscale difference is within the threshold range, and a small weight is given to points outside the threshold range, so as to effectively preserve the feature boundaries of the image while smoothing the image. Due to the requirements of current mandates, segmentation and identification must be performed on each mineral particle in digital rock images, and retention of border features is required to be relatively high, therefore, median filtering or SUSAN smoothing methods can initially be used. The SUSAN filtration algorithm is presented as follows:  
\[J(x,y)=\frac{\left(\sum_{i\
eq 0,j\
eq 0}I(x+i,y+j)\times e^{-\frac{x^{2}}{2 \sigma^{2}}-\frac{(I(x+i\
eq j)-I(x,y))^{2}}{i^{2}}}\right)}{\sum_{i\
eq 0,j \
eq 0}e^{-\frac{x^{2}}{2\sigma^{2}}-\frac{(I(x+i\
eq j)-I(x,y))^{2}}{i^{2}}}}, \tag{1}\]  
where \((i,j)\) refers to the pixel position in the filter mask, \(r=\sqrt{i^{2}+j^{2}}\), \(r\) indicates the pixel point and the distance from the center pixel, \(t\) stands for the brightness margin threshold, \(\sigma\) refers to the Gaussian standard deviation, and \(i\) represents the grayscale value of the pixel point. Smoothing filtering was carried out on the scanned MAPS images. In the image-smoothing process, filters with similar radii were used and different filtering methods (SUSAN, mean, and median) were used on image-smoothing conducted by MAPS. For comparison, smoothing results were obtained for selected replacement areas. More noise signals exist in raw scanned images, resulting in certain changes in the grayscale occurring within the same particle (Figure 1). This will likely influence the grain extraction processes, such as threshold segmentation or grayscale texture. Among each of the filtering methods, mean filtering can make blurred edges, while SUSAN and median filtering retain the edges in images allowing for the realization of a favorable performance. Moreover, after SUSAN filtering, surfaces of particles show comparably increased smoothing. Accordingly, the results of SUSAN smoothing were selected as the basis for correction. Figure 1: Results of different smoothing methods compared with the original images. **(A)** The original image. (**B**) The image processed with mean filter smoothing.