# Newly Designed Identification Scheme for Monitoring Ice Thickness on Power Transmission Lines
## 3 New Scheme for Iced Transmission Line Identification
### Line Icing Identification  
The next step is the identification of the line of the PTLI. At this stage, the upper and lower lines of the iced transmission line are determined for further analysis based on 3D measurements. This study uses a connected component labeling modification to distinguish between the upper and lower lines. This method gives a unique label to each object in an image by converting a binary image into a symbolic image, in which all pixels belonging to each connected component are uniquely labeled. So, the PTLI lines can be distinguished using unique labels (the top and bottom lines). In computer vision, connected component labeling detects connected regions in binary digital images.  
The first scan assigns provisional labels to object pixels and records equivalences. Label equivalences are resolved during or after the initial scan. Then, all equivalent labels on the second scan are replaced by representative labels. These two-scan labeling algorithms have some defects since a recursive algorithm may possibly cause overflow. In addition, this method produced a good performance but took a long time. The implementation of image processing systems requires faster computer processing. Based on the above problems, this study modified the classic method for labeling connected components. This research uses a one-time scanning algorithm with a scanning mask of size three so that the labeled pixels adjacent to the current object pixels will have the same label using the last-in-first-out stack processing scheme. The classic algorithm is enhanced by employing a larger scanning mask pattern to reduce the processing time and memory space required for analyzing neighboring pixels. The concept of scanning mask technology to find 4-connectivity is presented in this subsection. The approach is that the image with the raster scanning direction is scanned from top to bottom, left to right, and pixel by pixel. The fundamental operation of each iteration is shown in Figure 12. In this method, the pixels will be mask scanned until an unlabeled object X pixel is found in the input image. Then, the object pixel X is labeled with the same label number as one of its neighboring pixels, P, Q, R, or S. In the case of label conflicts, equality can be resolved by choosing the lower number, i.e., \(label(X)=\min(Label(P)\), \(label\)\((Q)\), \(label\)\((R)\), \(label(S))\).  
Figure 13 illustrates an example of the labeling used in this study. The labeling procedure utilized in this study is described below. The red arrows in Figure 13 indicate the labeling process, while the black arrows block indicates the process of labeling area expanded.  
1. Unlabeled object pixels with coordinates \((0,0)\) are shown in the scan mask, represented by dotted lines.
2. Based on point (b) in Figure 13, the label with '1' in the current pixel is processed.
3. The mask is scanned at the next unlabeled pixel (2, 0).
4. At point (d), the labeling of pixels with '2' is illustrated. Currently, there are two labels on the pixel objects.
5. The mask is scanned at the next unlabeled pixel (3, 0).  
Figure 12: The scan mask with 4-connectivity (the current pixel X is compared to its neighbor’s pixels P, Q, R, and S).  
Process of labeling with '2' again because its neighboring pixels are already labeled '2', so that expanded the labeling area.
* The mask is scanned at the next unlabeled pixel (1, 1) in point (g).
* Pixels are labeled with '1' because the diagonals of adjacent pixels (0, 0) are already labeled with '1'.
* Because the pixels at location (1, 1) are labeled with '1', the labeling area expanded.
* The labeled areas '1' and '2' intersect, so the labeled area is expanded to a square of four pixels containing (0, 0), (0, 1), (1, 0), and (1, 1) using the expansion rule.
* The mask is scanned at the next unlabeled pixel (2, 1).  
Labeled '1' because the left pixel has been labeled \"1\". Here, all eight connected neighboring pixels update their labels with minimum values.