## 2 Overview  
The train pantograph is an arched device erected on the train roof. When the train is running, the device lifts and transmits the current between the carbon slide and the overhead contact line with high voltage, which is the core component of the power system in train operation.  
In this paper, the proposed method is mainly based on the on-board PCS contact detection platform, and the hardware mainly includes two subsystems: the data acquisition system erected on the roof of the train, which uses high-speed stereo cameras assisted with light-emitting diode (LED) lighting equipment to collect clear pantograph catenary component images when the train is running, and the data processing system inside the train body, which processes images in real-time, and gives various kinds of contact parameters after processing as an output, which is transmitted to the cab for driving assistance and fault warnings.  
As the main target of PCS contact analysis, determining the location of the contact points is difficult in real-time, especially when the train is running all day. Complex outdoor illumination situations and background conditions further increase the difficulty of its stable detection and positioning. In this paper, a parameter adaptive localization method is proposed to solve these issues. First, a basic positioning framework is built by combining simple gray features and hog features, and using template matching and KCF tracking method [21] to obtain the position. On this basis, a fusion verification method based on hash similarity analysis [22] and L1-loss constraints is added, so that the tracking detection parameters can be adaptively updated according to the input image. The closed-loop control is used to realize the long-time robust positioning of the train under outdoor operation.  
For horn detection and sparks, we used a deep learning method for object detection, which can effectively solve issues related to occlusion and illumination changes. Using RefineDet [20], we constructed a horn and spark training set with existing data and carried out data expansion. To ensure the detection rate was sufficient for the network's framework, we further optimized the parameter structure and pruned the feature map prediction branch, which balanced the real-time performance and positioning precision.  
Finally, using the obtained image features, we reconstructed a 3D shape of the pantograph slide online, and measured the pantograph slide posture, contact line offset, and two abnormal detections of arcs and PCS separation. Compared with simply evaluating the position of the contact points, the contact line offset can provide feedback on the real position more intuitively and can be used for more effective analysis and prediction of carbon slide wear in the later stage. Meanwhile, the abnormal detection of pantograph pose, arcing, and PCS separation can provide early warnings in an extreme contact situation, the overview processing is shown in Figure 1. The implementation details of the method are shown in Section 3.  
Figure 1: Overview of the online pantograph and catenary system (PCS) intelligent perception analysis system and illustration of the four modules: data collection, feature localization, reconstruction, and data analysis.