## 2 Digital Image Processing for Tracking Target Point Displacement
### Pre-Process for Digital Image Processing (DIP)  
An image consists of a set of pixels, and image analysis uses unique information such as the color intensity of each pixel. The volume of data increases with the increase in the number of unused pixels in the image analysis; therefore, more resources are required to process the additional data, resulting in reduced device efficiency. Depending on the shooting environment and experimental configuration, an ROI can be set and analyzed to improve the efficiency because the original images stored for displacement tracking through DIP include areas that are unnecessary for the analysis.  
In this study, the first image with the least deformation and the last image with the largest deformation among the set of images acquired at regular intervals were used to set the ROI (Figure 3). In other words, after demarcating the area to be analyzed in each of the first and last images by a rectangle, the ROI was created by combining the two rectangles. The ROI that included both rectangles was generated by combining the minimum and maximum values of the horizontal (\(x\)-direction) and vertical (\(y\)-direction) coordinates from the four-pixel coordinates of the two rectangles generated from the two images.  
In Figure 3, Rectangle 1 and Rectangle 2 represent the rectangles used to demarcate the area to be analyzed in the first and the last images, respectively; \(\mathbf{P}_{1}~{}=~{}(x_{1},y_{1})\) and \(\mathbf{P}_{2}~{}=~{}(x_{2},y_{2})\) are the two coordinates of Rectangle 1; and \(\mathbf{P}_{3}~{}=~{}(x_{3},y_{3})\) and \(\mathbf{P}_{4}~{}=~{}(x_{4},y_{4})\) are the two coordinates of Rectangle 2. The collected and vectorized components can be expressed as \(\mathbf{x}~{}=~{}[x_{1},\,x_{2};\,x_{3},\,x_{4}],\,\mathbf{y}~{}=~{}[y_{1},\,y _{2};\,y_{3},\,y_{4}]\). Equation (1) gives the range of ROI expressed by the \(\mathbf{x}\), \(\mathbf{y}\) vector.  
\[\text{ROI}~{}=~{}[(\text{min}(\mathbf{x}),\,\text{min}(\mathbf{y}));\,(\text{ max}(\mathbf{x}),\,\text{max}(\mathbf{y}))]. \tag{1}\]  
In contrast to the physical coordinate system, the value of the Y component of the pixel coordinate system increased downward from the top of the image. The image was trimmed to remove the external pixels excluded in the ROI by applying the generated ROI to the image set. Through this process, the original image with \(6720\times 4480\times 3\) pixels and a data capacity of 6150 kb was reduced to \(4700\times 1621\times 1\) pixels and 141 kb, respectively, and the image size and data capacity were reduced by approximately 86.72% and 97.71%, respectively.  
After the analysis, because the image was composed of pixels, it was converted into a physical unit by using a scale factor. The scale factor was determined using the pixel size and the physical dimensions of a specific object in the image. In this study, the scale factor was calculated using the  
Figure 3: ROI generated by combining two rectangles.  
ratio between the pixel sizes of the two points constituting Rectangle 1 of the first image, which was used when setting the ROI, and the size of the specimen as follows:  
\[Scale\,Factor\ =\ \frac{D}{d}\ =\ \frac{X_{2}-X_{1}}{x_{2}-x_{1}}, \tag{2}\]  
where \(D\) denotes the horizontal length of the actual specimen; \(d\) denotes the pixel size at the same location; \(X\) is a physical coordinate; and \(x\) is the pixel coordinate.