# Transmission Tower Re-Identification Algorithm Based on Machine Vision
## 2 The Proposed Method
### Transmission Tower matching Network
#### 2.3.2 Training Dataset Image Augmentation  
Images of transmission towers that are captured might originate from various collection points, under diverse lighting and weather conditions. Owing to these extrinsic factors, the color, brightness, contrast, and other visual characteristics of the images may be affected to varying extents. While specific environmental backgrounds might momentarily assist in identifying the transmission towers, considering the variability of the external environment, models should refrain from an over-reliance on such information. Consequently, this study introduces an image augmentation technique involving the random bottom occlusion of transmission towers, combined with enhancements in the HSV channel and random image flipping, to enrich the dataset.  
By employing random horizontal flipping augmentation on images, this technique can effectively enlarge the transmission tower matching dataset, thereby augmenting its diversity and robustness in deep learning applications. The image augmentation technique in the Hue, Saturation, Value (HSV) channel can adjust hue, saturation, and value to enhance visual effects. This method aims to simulate varying weather conditions, thereby enabling the model to adapt to diverse meteorological scenarios. The HSV enhancement values chosen in this study were referenced from the YOLOv8's augmentation values, with gain coefficients of {0.015, 0.7, 0.4}. While local environments can facilitate the matching of images with the template library, it is pertinent to note that transmission towers are situated outdoors, where environmental conditions might vary. In practice, the vicinity of the base of transmission towers may undergo substantial alterations. To address this, this study implements a random bottom occlusion strategy for image augmentation. The height of the introduced random white block, denoted \(H_{a}^{z}\), falls within the range \(\left[H_{a}^{\mathrm{G}},H_{a}^{\mathrm{4}}\right]\). Concurrently, its width, \(W_{a}^{z}\) lies in the range \(\left[W_{a}^{\mathrm{8}},W_{a}^{\mathrm{2}}\right]\). When the block is superimposed onto the image at coordinates \((H_{p},W_{p})\), \(H_{p}\) is confined to the range \(\left[H-H_{a}^{\mathrm{4}},H-H_{a}^{\mathrm{2}}\right]\); \(W_{p}\) is restricted to \((0,W-W_{a}^{\mathrm{2}}]\). This augmentation is strategically implemented to ensure that the images are adaptive to localized environmental changes. The formulas for calculating the width and height of the added white block are respectively presented in Equations (7) and (8).  
\[H_{a}^{z}=int\bigg{(}\frac{H}{z}\bigg{)} \tag{7}\]  
\[W_{a}^{z}=int\bigg{(}\frac{W}{z}\bigg{)} \tag{8}\]  
where \(H\) and \(W\) denote the height and width of the image, respectively. \(z\) represents the enhancement coefficient. Post enhancement, the height and width of the required white block are expressed as \(H_{a}^{z}\) and \(W_{a}^{z}\).  
The results obtained from applying the three image augmentation techniques are depicted in Figure 6.  
Figure 5: Framework of the matching network.