Applications of pattern recognition for dendritic microstructures

The Primary Dendrite Arm Spacing (PDAS) is the most important length scale in directionally solidified single crystal alloys. It determines the propensity for defect formation, solution heat treatment times and mechanical properties of the material. In this work a CMSX4 single crystal sample was imaged under a Scanning Electron Microscope (SEM). An automatic dendritic mapping (DenMap) algorithm using Normalised Cross-Correlation (NCC) is combined with Shape-Limited Primary Spacing (SLPS) to determine the local nearest neighbour dendrites and the corresponding dendritic packing. The algorithm located the dendritic centres, calculated the local PDAS, packing pattern, and relationship between PDAS and packing pattern for 256 dendrites in 1 minute 10 seconds. This is the first fully automatic method to produce a clear Gaussian distribution of local PDAS and packing pattern; thus, enabling rapid data gathering potential for single-crystal microstructures.


Introduction
Dendritic structures are one of the most complex forms of crystallisation in nature and technology. The primary dendrite arm spacing (PDAS) is known to control the segregation properties [1,2], which controls the chances for defect formation [3] and the mechanical properties of the material [4].
It is of vital importance to be able to characterise this length scale in a way that is repeatable, accurate and rapid. Current methods of determining mean primary spacing utilise the counting method [5][6][7]: where A is area, Nd is number of dendrites within that area and B is a fitting coefficient for the array. However, this method provides no way of determining the local PDAS or the PDAS distribution. Other authors have attempted to characterise the local PDAS [8][9][10][11][12]. Warnken and Reed [12] developed an algorithm based on calculating the closest three neighbouring dendrites then iteratively adding neighbours.  [13] attempted to automate the dendritic core selection process in optical images using a four-fold symmetry algorithm. However, this method required removing of background and manual thresholding, returned only an 87.7% detection accuracy, and required extensive computational time.
In this work, we utilise a Normalised Cross-Correlation technique [14] to detect dendritic cores within a single crystal CMSX4 sample, then apply Voronoi tessellation combined with a novel Shape-Limited Primary Spacing (SLPS) algorithm to calculate true local nearest neighbours. Thereby creating a map of packing pattern and local PDAS distribution over the sample surface.

Application of pattern recognition
A 2nd generation CMSX4 single crystal bar sample, with a diameter of 9.4mm, was provided by Rolls-Royce Plc. The bar was sectioned using normal metallographic techniques and imaged on a FEI 650 Quanta SEM at the University of Leicester. Dendritic core detection classically requires time intensive laborious manual determination of the dendrite cores. In this work, automatic, rapid and accurate core detection is achieved using a Normalised Cross Correlation algorithm (NCC), DenMap. First the image is pre-processed first with a Fast Fourier Transform Band Pass Filter to suppress or enhance unwanted features followed by a transformation back into real space using an inverse Fourier transform. This step is followed by histogram equalisation to remove blurring and shift the contrast to sharpen all the features, especially the dendritic core. Once image pre-processing is completed, scale and rotation are calculated to generate a template image. The template image is inputted into NCC and scanned across the sample surface. NCC provides a measure of similarity between the two data sets, with outputs being between 1 and -1, 1 being an exact match with the template. Following this, automatic thresholding is applied, with the maximum value of the NCC algorithm corresponding to the exact location of the dendritic core, as shown in figure 1(b). The total processing time for dendritic core determination from figure 1(a) is exactly one minute, and achieved 100% detection. Now a method to determine the local PDAS is required.
First the x and y pixel positions are sorted in a clockwise direction, the first data point taken from the top left of the image and the last data point the centre. Then the same method as Tschopp et al. [8] is applied, whereby, the image is split by Delaunay triangulation. Each dendrite has a corresponding region where all points of the plane are closer to that dendrite than to any other. To overcome the problems associated with determining the true nearest neighbours, a Shape-Limited Primary Spacing (SLPS) IOP Conf. Series: Materials Science and Engineering 861 (2020) 012057 IOP Publishing doi:10.1088/1757-899X/861/1/012057 3 algorithm is developed, derived from observed single-crystal packing patterns in nature. The method suggested herein applies the Modified-Warnken-Reed method as suggested by Tschopp et al. [8], however, the coefficient alpha is replaced with a SLPS term, KSLPS (equation (2)). The purpose of KSLPS is to permit the algorithm to automatically remove any incorrectly captured FNN from Voronoi tessellation; thus, providing an accurate description of the influence of the solidification conditions on the local dendritic neighbourhood. KSLPS is geometrically derived from the square counting method, equation (1), combined with the formula for a regular polygon as where α is side length, λ is PDAS and N is coordination number. The N is determined from the number of local dendrites bound to a central dendrite. In order to set systematic rules and comparatively relate packing of dendrites of different N, each central dendrite is bound by a regular polygon, with a fixed λ from the centre to a neighbouring dendrite. With a unique KSLPS determined for each N it is now possible to determine true nearest neighbours and thus the local PDAS distribution. KSLPS is applied to the Modified-Warnken-Reed method [10] (equation 3) where, ̅ is the average local PDAS, λσArray is the PDAS standard deviation for the whole array and RSLPS is the radius of the shape limiting circle about the central dendrite. First the nearest neighbours are determined by Voronoi tessellation and then RSLPS is calculated. If a dendrite is outside of RSLPS then the algorithm removes the outlier and recomputes based on the new determined nearest neighbours and updated . The algorithm follows the same process for each point in the dataset. A full description of the method will be published in the future.

Application of pattern recognition
The total processing time for dendritic core determination combined with SLPS for the CMSX4 micrograph with 256 dendrites is exactly one minute and 10 seconds on an Intel® Core™ i5-6500 Desktop PC with a 3.2 GHz CPU and 8GB RAM. The results from SLPS are shown in figure 2. The local PDAS variation results are shown in figure 3(a). The algorithm captures a Gaussian distribution of local PDAS and determines the ̅ as 419 µm. The classical counting method (equation (1)) calculated the ̅ as 423 µm using a B coefficient (equation (1)) equal to 1.075. This small discrepancy of 4 µm is likely due to taking B = 1.075 for an ideally packed hexagonal array [6]. The smooth Gaussian distribution and the close match with the classical method implies SLPS can successfully remove incorrectly captured first nearest neighbour dendrites included in the Voronoi tessellation. Therefore, the algorithm can successfully capture the influence of solidification conditions on the local dendritic neighbourhood. As a result, the model can provide new information in regard to the types and quantity packing patterns within figure 2. It should be clarified that a sample section provides only a snapshot of solidification at a moment in time and packing patterns may change when viewed in 3D due to a change in solidification conditions [11]. The relationship between PDAS and determined packing pattern is shown in figure 4. The N7 and N8 packing patterns identify shapes where the local PDAS is large in comparison to the spacing between true nearest neighbour dendrites (figure 4). Large PDAS indicate the interdendritic regions, as Ni, Ti, Ta, and Al preferentially partition to these regions, high coordination number shapes indicate areas rich in these elements. These high coordination numbers are typically surrounded by N3, N4 and N5 packing patterns with small local PDAS (figure 2). As Re, W, Co and Mo partition to the dendritic core, areas with increased core density indicate regions with a high concentration in these elements. As N3 and N8 possess the smallest and largest PDAS on average, they are related to the areas with the most severe microsegregation levels. As the N6 patterns are between the two segregation extremes they form under a composition closer to nominal. Interestingly, the ̅ for the N6 patterns is 430 μm which is the closest out all determined patterns to the ̅ for the bulk array. One could draw the conclusion that as the N6 pattern frequency is the highest (figure 3(b)), forms under a composition closer to nominal and the local and IOP Conf. Series: Materials Science and Engineering 861 (2020) 012057 IOP Publishing doi:10.1088/1757-899X/861/1/012057 5 bulk ̅ are similar, that it could be the preferential packing formation within a single-crystal array. This conclusion is supported by what is observed within experiment [15].

Conclusions
DenMap is developed to automatically detect dendritic cores using Normalised Cross-Correlation. Auto detection is combined with a dendritic pattern detection algorithm, Shape-Limited Primary Spacing (SLPS). SLPS calculated the local PDAS distribution in a CMSX4 alloy with 256 dendrites in 1 minute and 10 seconds. The model provides a Gaussian distribution of local PDAS variation and removes any large outliers. The technique can quantify the relationship between packing patterns and microsegregation and the results suggest single-crystal arrays have a natural tendency to form hexagonally packed structures.
DenMap-SLPS enables the rapid, accurate and quantitive data gathering. Consequently, this new model enables the standardisation of single-crystal characterisation and confidence in comparison between different experimental results. It follows, that the new approach will elucidate a deeper understanding between single-crystal formation and the processing parameters.