# Integrated Image Processing Toolset for Tracking Direction of Metal Grain Deformation
###### Abstract
Although binary images consist of significantly fewer intensity parameters than their counterparts, such as grayscale and sRGB images, they are more effective in terms of conceiving the shape and size of the object with significantly fewer computational processes, which is very beneficial for object recognition [31]. The algorithm separates the 0-255 image pixel intensity into a dual collective pixel intensity representing black and white colors. Image binarization works in a manner similar to that of a filter by transforming the unsuitable intensity matrix value of the pixel using a specific threshold separator [32]. The main focus of researchers is thus to improve the accuracy and reliability of the threshold separator, thus reducing the structural degradation of the image's parts [26; 27]. Experiments have shown that a uniform threshold value for the entire image dataset makes the extraction process suboptimal, owing to the changes in lamination and the poor image quality, especially at the edges [30; 32]. In the case of extracting a metallographic image of a metal polycrystalline, the careless implementation of a threshold separator can eliminate the essential features of the grain, thus reducing the extraction accuracy of the GB. Unfortunately, the toolsets for automatically adjusting the thresholding are lacking, making the extraction process of GB unreliable. In addition to extracting the GBs, the initial and final positions of the metal grain after the deformation must be recognized to track the grain deformation. This is essential because it has been found experimentally that, owing to the high spatial resolution of the optical microscopy used during the data acquisition, any positional error potentially reduces the precision of the final desired result [33]. Several methods have been proposed to address these issues. For example, [PERSON] et al. (2013) proposed a GB segmentation technique for the polycrystalline images acquired under ambient light conditions with small inconsistencies in the light source reflectance [34]. The combination of an sRGB-to-gray-level image converter and a Gaussian filter (\(\sigma=30\)) was utilized to increase the dataset clarity, after which an expert manually drew the boundaries of the grain on each ground-truth. This method successfully solves typical optical micrograph problems, including the lack of optical contrast, which occurs when adjusting the random parameter to achieve a clear grain image. Unfortunately, manually segmenting and stitching the grain section images requires a significant amount of time, and it is strongly dependent on the concentration of the expert. In the case of GB segmentation, [PERSON] et al. (2019)proposed a deep-learning approach for segmenting plain microstructure images using generative adversarial networks (GANs) [35]. The dataset was prepared using an image binarization process with a global threshold (50-110) depending on the original image's intensity. The proposed model can efficiently detect very thin edges in the vicinity of other thin edges. Again, it was found that global thresholding must be addressed to prevent erosion followed by dilation, which causes edge uniformity [36]. In addition, manual stitching can be improved by utilizing an image-stitching algorithm to improve the join quality with a quantifiable performance. The image-stitching algorithm is performed by using feature detectors (FDs) [37], which track the key points in two or more frames and match pixels based on their value and physical proximity [38; 39; 40; 41; 42; 43]. Achievements in GB tracking are progressing rapidly for in situ atomic-resolution experiments [44]. Despite the extensive implementation of image-processing algorithms for grain boundary tracking, several issues regarding the user flexibility and training time remain unresolved [45]. Still, it has been found that the application of FDs to image processing using a binary image gave a faster tracking performance while using fewer computational resources [46; 47].