# Track Line Recognition Based on Morphological Thinning Algorithm +
###### Abstract  
In the field of intelligent driving of freight trains, determining the track line ahead of the train is an important function in the autopilot technology of such trains. Combining the characteristics of freight railway tracks, we conduct an in-depth analysis of the shortcomings of object detection technology in extracting track lines and propose an improved Zhang-Suen (ZS) thinning theory for a railway track line recognition algorithm. Through image preprocessing and single pixel thinning steps, a continuous track line is obtained and then processed by a denoising algorithm to obtain a complete track line. Experimental results show that the track extracted by our method has good continuity and less noise. It can simultaneously perform track detection on straight roads, curves and turnouts, and is suitable for changing weather conditions such as sunny daytime, mild rainy daytime, cloudy daytime, night with lamp lighting and night without lamp lighting conditions. t +
Footnote †: This paper is an extended version of a paper published in the 2021 IEEE Conference on Cognitive and Computational Aspects of Situation Management, CogSIMA held in Tallim, Estonia, 14-22 May 2021. In the past decade, the development of deep learning and convolutional neural networks led to great progress in object detection technology. It includes a wide range of fields, for example, intelligent video surveillance, vehicle automatic driving, robot environment perception, and visual human-computer interaction. However, there are still many unresolved problems. Combining the current research by domestic and foreign scholars in the field of target detection and the scenarios applicable to this paper, the existing problems can be summarized as described below. The narrow and long object problem: Current mainstream object detection algorithms include the one-step SSD (Single Shot MultiBox Detector) algorithm [3], the YOLO (You Only Look Once) algorithm [4], and the two-step Faster R-CNN (Region-CNN) algorithm [5]. Two types of object detection algorithms have limitations in terms of narrow and long object detection. If the object is too narrow and long to become a small target, the ground truth box cannot find the corresponding default box to match it during training, so the detection effect is not reliable. The SSD network trains the anchor boxes, with each feature map randomly corresponding to several anchor boxes. If the corresponding anchor boxes are relatively small, it is difficult to obtain sufficient training using the pixels on the corresponding feature map. During testing, the predicted results may be inaccurate, which will greatly interfere with the normal results [6]. YOLO directly obtains prediction results through global features and depends entirely on data accumulation. It is not effective for detecting objects with weak characteristics. The two-step detection algorithm based on R-CNN does not scale the original image, resulting in a much slower detection speed than the one-step detection algorithm. Moreover, if there are many objects in the image and the aggregation is strong, the detection effect of the two-step detection algorithm is not ideal. We define the proportion of effective information in the ground truth box as _PEI_ in Equation (1): this can be used as a measure of the proportion of the object to be examined in the ground truth box, evaluating the feasibility of training and prediction results. In the object detection models based on deep learning, most deep learning models train images with a proportion of effective information higher than 50%, the accuracy of the model being even higher. In other words, the higher the proportion of effective information, the more accurate the model training.