2.3.2. Implementation

Although, in theory, twelve or more different analysis methods could be used in the virtual data fusion implementation for analysing the ASR-sensitive aggregate dataset, in practice such a full implementation was impractical. We selected a partial implementation of the scheme including only three analysis approaches. The choice included the approaches that would produce cracking data with sufficient accuracy for this specific application while simultaneously testing the effectiveness of the virtual data fusion concept for obtaining accurate and consistent results. A successful demonstration of the virtual data fusion method with only three analysis components would then give justification for the further development of the algorithm to gradually include additional analysis modules, simultaneously growing in accuracy and resiliency. Moreover, the modular architecture of the strategy could more easily be adapted to different problems than a full but rigid analysis.

In fact, for the specific ASR-sensitive aggregate analysis described in this paper, it was not important to separate internal pores from internal cracks since the surface area of both pores and cracks was vulnerable to ASR degradation. Thus, modules related to this differentiation could be left out of the analysis. Furthermore, since scans were not available at varying levels of degradation, all methods relying on changes in sample state relative to time (such as DVC-based methods) were also left out of this analysis. All image analysis described in this paper was completed using custom algorithms developed and implemented in MATLAB [49].

#### Module 1: Identification of Objects with Low Density

When cracks or pores have widths exceeding two voxels, the voxels in their centres are completely filled with air. Thus, these central voxels are characterized by a particularly low greyscale value. In order to separate these voxels, a threshold has to be selected and subsequently used for image binarization. All voxels darker than the threshold would then be transformed to white and all voxels lighter than the threshold transformed to black. Given that this threshold must be consistently applied for a large range of datasets, an automated selection method was implemented.

Using the triangle selection algorithm [50,51], a virtual line is drawn from the origin of the image histogram to the top of the largest histogram peak (excluding the initial peak at zero, which represents voxels from the air around the specimen) (Figure 4). A calculation is then conducted to determine which point on the histogram is furthest from the virtual line along an intersecting, perpendicular line. The location of that point is identified as a potential threshold. It was found, however, that such a threshold is rather over-encompassing, leading to the introduction of considerable noise into the resulting binarized images. Thus, a slightly more conservative threshold value was also implemented for this module that is 25% lower than the original threshold. An example of the results from this analysis can be observed in Figure 5.

**Figure 4.** Automated threshold selection using the triangle approach (based on figure in [10]).

**Figure 5.** Binarization of greyscale image using the conservative and over-encompassing thresholds identified using the automated selection method (based on figure in [10]).

### Module 2: Identification of Objects with High Gradient

When an object in a CT-image has either a much higher or a much lower greyscale value compared to the surrounding material, its edges can be identified as regions of high gradient. For this purpose, a gradient-magnitude image is calculated from the original CT-image through the use of the Sobel operator (Figure 6) [52]. Since the resulting gradient image consists of a wide range of grey values, it must also be binarized. For this purpose, a histogram of the gradient image grey values is computed and another automated triangular threshold selection is completed, this time from the right edge of the histogram (Figure 7). The resulting binary image contains the edges of both bright and dark objects in the original CT image (Figure 8). In order to remove the edges associated with the bright (high-density) objects in the CT-image as well as some of the noise, the binarized gradient image can be multiplied by a binarized CT-image (this time using the "over-encompassing void-solid threshold" identified in Figure 4) (Figure 9).

**Figure 6.** Generation of the gradient-magnitude image (based on figure in [10]).

**Figure 7.** Automated gradient threshold selection using the triangle approach (based on figure in [10]).

*Materials* **2020**, *13*, 3921

**Figure 8.** Binarization of the gradient image (based on figure in [10]).

**Figure 9.** Generation of an image containing the outer edges of only low-density objects (based on figure in [10]).

Module 3: Identification of Objects above a Given Size

Prior to noise identification and removal, the results from Modules 1 and 2 were combined into a single image (Figure 10). This ensured that the centres and edges of the cracks/pores would both be present and accounted for during object size analysis. The object size analysis was completed using a connected components algorithm. During this analysis, individual voxels are assessed to determine whether they are part of a larger object in the binary image by analysing whether they adjoin other voxels of the same color. For this analysis, white voxels with touching faces, edges or corners (also known as "26-connected") were identified as connected. Objects with voxel volumes smaller than 125 voxels were subsequently identified and eliminated (Figure 11).

**Figure 10.** Fusion of images resulting from Modules 1 and 2 (based on figure in [10]).

**Figure 11.** Removal of noise from binary crack and void image (based on figure in [10]).

It was found that the use of smaller cubes than 125 voxels (with five voxel long sides) tended to leave considerable noise within the image while the use of larger cubes resulted in the loss of a considerable number of voxels along the path of the cracks. Given that the full CT images each contained over seven billion voxels, such an object with a volume of 125 voxels represented less than one ten-millionth of the total image volume. A flowchart of the entire crack-detection process is provided in Figure 12.

**Figure 12.** Flowchart of crack-detection process (based on figure in [10]).
