## 2 Materials and Methods
### Developed Image Processing and Analysis Technique  
The recorded sequence of images was subjected to pre-processing and analysis. Pre-processing consisted of the following stages:  
* conversion of a series of RAW images to TIFF format with optional reducing the size of a digital image to reduce data volume,
* extracting information about the recording time of each photo in the sequence with an accuracy of \(1/100\) of a second,
* conversion of color images to grayscale,  
Figure 2: Flow diagram of the entire measurement procedure.  
* cropping obtained images to the following regions: the examined paper sample, the checkerboard on the movable handle, and the checkerboard on the fixed handle,
* linear filtering of the sample image by means of a filter that enhances the vertical edges in the image; its mask is shown in Figure 3,
* linear filtering of checkerboard images using a filter that emphasizes the corners of the checkerboard fields in the image; its mask is shown in Figure 4.  
Figure 4: Filter mask designed to emphasize checkerboard corners in an image.  
Figure 3: Filter mask designed to emphasize edges in an image.  
The results of filtering the sample image are shown in Figure 5a. Figure 5b shows the image of the sample itself with the detected edges of the sample: left (green) and right (red). Detecting the left edge is very difficult due to the low contrast in the image, hence in further analysis it was decided to rely on the detection of the right edge. This cannot be generalized to all cases. The contrast depends on the direction and lighting of the sample. In the future, choosing the right filter mask should be an option for the analysis algorithm.  
Figure 6 shows the result of filtering the checkerboard images placed on both handles of the testing machine and the places where the corners marked with red dots were detected. To detect the corners between the white and black fields, regardless of their order, filtering was repeated twice with the filter mask rotated 90 degrees. Next, in the obtained images, the places of the corners were detected independently by detecting the maxima in the images after the filtering and the resulting information from both images was combined.  
Figure 5: (**a**) The result of filtering the image of the paper sample during the measurement, (**b**) the image of the sample with the detected left edge marked in green and the right edge in red.  
Figure 6: The result of filtering the checkerboard image on the moving (**a**,**b**) and still (**d**,**e**) handle and images of the handles themselves (**c**,**f**) with the corner detection points marked in red. Pictures (**b**,**e**) show the result of filtering with a filter with a mask rotated by 90\({}^{\circ}\).  
The coordinate sets of the points of the detected edges and corners were input information to the algorithm for the analysis of image data. The image coordinates were converted to metric coordinates (mm) based on information about the spatial resolution of the images and the arbitrarily assumed place of the beginning of the coordinate system (associated with the place where the sample is handled in a still holder).  
The shape of the edge of the test sample in subsequent images of the recorded sequence is shown in Figure 7.  
The apparent movement of the lower end of the sample edge is the result of limiting the analysis field to the area of correct edge detection in the image. The assumed origin of the coordinate system, associated with the edge of the still handle, is below the bottom edge of the image.