Abstract: Existing rail transport monitoring systems mostly rely on track circuits and pressure sensors, which are susceptible to mechanical wear and electrical sparks, affecting safe production. Furthermore, the sensors are located beneath the track, and the harsh environment of underground tunnels with accumulated water further impacts sensor performance, leading to difficult system maintenance and poor reliability. This paper proposes a video image processing method that utilizes pattern recognition, optimal thresholding, and geometric similarity theory to achieve non-contact monitoring and measurement. Research results show that the system can effectively monitor data such as train speed, direction of movement, abnormal train conditions, and train load. The system operates safely and stably. Keywords: Infrared CCD; Railway Transportation; Surveillance and Measure; Video Image Abstract: Existing surveillance and measurement of railway transportation under mines mostly uses railway circuit and pressure sensors. However, these sensors can produce electrical sparks, which affect production safety. Furthermore, sensor installation under railway lines, exposure to water in the mine, and harsh environments all affect sensor performance. Simultaneously, system maintenance becomes very difficult, and system reliability decreases. This paper proposes a non-contact surveillance and measurement method that utilizes video image processing, pattern recognition, optimum threshold value, and geometric similarity theory. Research results show that this system can effectively monitor and measure data such as train speed, direction, unusual conditions, and payload. Moreover, this system operates safely and stably. Keywords: Infrared CCD; Railway Transportation; Surveillance and Measure; Video Image Introduction Railway transportation systems are one of the main tools in mine transportation, playing a crucial role. How to safely and reliably monitor mine track transportation systems is of great significance for ensuring safe production in mines. The current mine track transportation monitoring mostly uses track circuits and pressure sensors. Therefore, the existing mine track transportation monitoring system has the following shortcomings: (1) Using contact sensors, there is a possibility of mechanical wear and friction generating electric sparks, which affects safe production; (2) The monitoring is not visual, and the monitor can only see some digital indicators, resulting in poor monitoring effect; (3) The sensors are set under the track, and the underground roadway is flooded and the environment is harsh, which seriously affects the performance of the sensors; (4) The system has high cost, large maintenance, and poor reliability. In order to effectively solve the above problems, this paper proposes to use a non-contact video image processing method to realize mine track transportation monitoring. Since the infrared band has the advantages of high spatial resolution, good penetration and small scattered light[1], the mine track transportation monitoring system uses infrared CCD. 1 Infrared CCD Mine Track Transportation Monitoring System The infrared CCD mine track transportation monitoring system based on ADSL (Asymmetric Digital Subscriber Line) twisted pair broadband transmission technology[2] is shown in Figure 1. The video signal from the infrared CCD camera is processed by video image algorithms such as pattern recognition and optimal threshold. Various feature quantities of train images and payload (referring to the goods transported by the train, such as ore, coal, etc.) are extracted from the video image. The calculation results obtained from the monitoring are transmitted to the computer of the monitoring center through the ADSL MODEM. The PC of the monitoring center will display the analysis results of the train transportation status, thereby realizing non-contact and visualized remote monitoring and measurement. In order to minimize the amount of data transmitted, under the premise of meeting the actual monitoring needs, this system adopts 256-level grayscale images with an image size of 320×240 pixels. [align=center] Figure 1 Infrared CCD Mine Rail Transportation Monitoring System[/align] The infrared CCD mine rail transportation monitoring system has six main functions: train speed calculation, train direction identification, train car counting, train payload calculation, train operation abnormality alarm processing (including train stop alarm and train overspeed alarm), system initialization and setting and saving of common parameters[3]. 2 Mine Track Transportation Monitoring 2.1 Train Speed Calculation Measuring and calculating train speed using image processing is a complex problem. Therefore, this system analyzes the basic characteristics of the train based on the continuous images acquired by the video image acquisition system [4] and the principle of pattern recognition. First, determine whether the train has reached the monitoring point. If the train has reached the monitoring point, compare the changes in the train's state and position in adjacent motion frame images. Then, calculate the train's running speed based on the relationship between these six quantities: the change in position, the time required to generate the change, the infrared CCD field of view (angle), the CCD sampling strategy, the size of the sampling area corresponding to the sampling strategy, and the vertical distance between the infrared CCD lens and the train. The specific algorithm and corresponding calculation steps are as follows. 2.1.1 Detecting the Train's Timestamp and Position First, based on the top-view features of the train image and the basic principle of pattern recognition, detect the timestamp of the train entering the monitoring screen and its specific position in the image. There are few types of moving objects in the mine, which facilitates the rapid identification of moving objects in the mine. In addition, the top-view features of the underground train image are relatively regular rectangles, so rapid identification is entirely possible. In the field of artificial intelligence, computer vision mainly focuses on image processing algorithms. There are many image processing methods, with varying degrees of effectiveness. This paper chooses statistical pattern recognition as the theoretical basis for the algorithm, not only because it is the most widely used method, but more importantly because the design goals of this system and the features of the objects to be recognized are very suitable for processing using statistical pattern recognition. 2.1.2 Train Speed Detection Regarding the problem of train speed detection, this paper uses the detection of adjacent moving frames and the calculation of the relationship between position changes and time between adjacent moving frames to obtain the train's speed. (1) Based on the differential frame motion detection method, the first frame motion image of the train entering the monitoring site can be obtained; (2) Using the motion detection principle, the second motion frame of the train entering the screen is detected, and the position of the second motion frame in the image and the timestamp of the train entering the screen are sent to the monitoring PC on the well via ADSL; (3) The monitoring PC on the well calculates the difference frame P between the two adjacent motion frames of the monitored train entering the monitoring screen based on the relevant parameters of (1) and (2); (4) Based on the obtained difference frame P, the length of the train moving in the second motion frame relative to the first motion frame is calculated, that is, the number of moving pixels ΔP; (5) The total field length L (in meters) of the train movement direction corresponding to each frame image obtained by the monitoring system can be calculated according to formula (1); (6) Based on the timestamps corresponding to the first and second motion frames of the train entering the screen, the running speed V (meters/second) of the train is calculated. 2.1.3 System constraints According to various parameters and their interrelationships, the total field length of each frame of the infrared monitoring system in the direction of train movement is L = 2 × [d × tan (α/2)]. If the field of view of the selected CCD lens is 80° and the distance between the lens and the upper surface of the monitored train is 1 to 1.5 meters, then, under the PAL signal [5] condition (25 frames of video images per second), what is the maximum speed of the train that the infrared monitoring system can detect without distortion? According to the sampling theorem [6], if the sampling frequency of the monitoring system is fs = 25Hz (PAL system), consider the two cases where the distance between the CCD lens and the upper surface of the monitored train is 1 meter and 1.5 meters respectively. (1) The CCD lens is 1 meter away from the monitored train. Based on these parameters and basic assumptions, the total length of the field of view corresponding to the direction of train movement in each frame of the image can be calculated according to formula (3): L = 2×[d×tan(α/2)] = 2×[1×tan(80°/2)] = 2×0.8391 = 1.6782 meters. According to the sampling theorem, the sampling frequency fs must be greater than twice the highest frequency of the measured signal so that the sampled signal will not have aliasing, that is, fs ≥ 2fc. If calculated according to fc = fs/2, fc = 12.5Hz. In this case, the maximum operating speed of the train can be Vmax = 20.98 (m/s), that is, the monitored train can pass through the monitoring location at a maximum speed of 75.5 km/h. However, the current maximum design speed of mine trains is only 10 m/s (equivalent to 36 km/h). Under normal circumstances, the speed of the train in the mine is usually 3 m/s to 5 m/s. Therefore, this monitoring system can fully meet the monitoring needs. (2) To meet the maximum design speed of 10 m/s, the shortest distance between the CCD lens and the upper surface of the monitored train is d = L/(2×0.8391) = 0.8/(2×0.8391) = 0.4767 meters. That is to say, if the distance between the CCD lens of the monitoring system and the upper surface of the monitored train is greater than 0.5 meters, the mine train can be effectively monitored. Similarly, if the distance between the lens and the monitored object is appropriately increased, objects with higher running speeds can be monitored. In this respect, the application scope of this system is wider. 2.2 Train movement direction identification First, two basic concepts are defined: the train's upward direction and the train's downward direction. The train's upward direction: the direction in which the train transports products from the mining area to the surface is defined as the train's upward direction; the train's downward direction: the direction in which the train travels from the surface to the mining area is defined as the train's downward direction. The specific implementation method is as follows: (1) First, based on the top-down features of the train image and the basic principle of pattern recognition, detect whether the "moving object" has entered the monitoring screen and its specific position in the image; (2) Based on the characteristic that the train image obtained by the CCD camera from the top view of the train has "rectangular features", distinguish and identify whether the moving object entering the monitoring site is a train; (3) Based on the pre-agreed train up direction, train down direction and CCD lens arrangement position, continuously track the first motion frame, second motion frame and third motion frame of the train entering the monitoring screen, use the second motion frame, the first motion frame and their difference frame to preliminarily determine the train's running direction, and then use the third motion frame, the second motion frame and their difference frame to verify whether the previously determined preliminary running direction is correct. 2.3 Train running abnormal alarm handling 2.3.1 Train stops running after entering the monitoring site Due to the special underground conditions, once the running train stops running due to mechanical or electrical reasons, the monitoring system should immediately alarm the control center above ground and lock it. Because coal bunker capacity is limited, a shutdown of the train transport system could lead to anything from work stoppages and coal bunker accidents in the relevant mining areas to locomotive rear-end collisions or other accidents. Therefore, the monitoring system must issue alarms promptly to ensure transport safety. The alarm process is as follows: After the train enters the monitoring screen, the system continuously acquires video images, constantly comparing the differences between frames. Using an inter-frame thresholding method, it determines the train's operating status. Once the train stops (several consecutive identical frames or inter-frame differences less than a given threshold), the underground monitoring system immediately sends a train stop flag and timestamp to the surface monitoring center. Upon receiving the stop flag and timestamp, the surface PC locks the system, issues audible and visual alarms, and records the monitoring log. The monitoring system then enters a stop mode until the train resumes normal operation. After the train resumes operation, the system sends a train operating status flag and corresponding timestamp so the surface PC can release the system lock, clear the alarm, and complete the monitoring log recording. These log records provide a basis for future accident analysis, judgment, and handling. 2.3.2 The implementation of the overspeed alarm function in the overspeed alarm monitoring system has changed the situation where it was impossible to quantitatively monitor the illegal operation of underground train drivers in the past. It is of great significance to the safe operation of the train transportation system and the identification and differentiation of the responsibility for accidents in the train transportation system. The specific steps for implementing overspeed alarm processing are as follows: (1) First, according to the needs of each mine rail transportation and the rail traffic situation, the speed threshold for overspeed alarm is set on the PC above ground. This threshold can be changed in real time according to actual needs. Therefore, the overspeed alarm has great flexibility. (2) After the monitoring system detects that the train has entered the monitoring site, it calculates its speed and transmits the train speed result obtained by the monitoring system to the PC above ground via ADSL. (3) The PC above ground compares the received train speed with the set overspeed alarm threshold. If it finds that the speed of the running train exceeds the alarm limit, it will issue an audible and visual alarm to prompt the management personnel to take corresponding measures and automatically record the overspeed alarm in the safety log (mainly including: the running speed of the train, timestamp, etc.). 3. Field Experiment and Analysis Based on the previously discussed requirements for mine track transportation monitoring, this system underwent field experiments at Pingdingshan Mining Group. The specific experimental results are shown in Figure 2 (the experimental data is from synchronized video recordings). [align=center]Figure 2 Experimental Results Obtained in the Underground[/align] The field experimental results show that this system can complete various monitoring tasks for track transportation. Monitors can easily understand important data such as train speed, direction of movement, abnormal train conditions, and train payload. The system operates stably, reliably, and accurately. 4. Conclusion In summary, considering the special characteristics of the mine environment and the requirements for underground transportation monitoring, a non-contact image processing method is adopted to realize mine track transportation monitoring. The surface monitoring center can not only observe some digital indicators in a timely and accurate manner but also directly view the monitoring images of the underground site. This is of significant practical importance for managers to comprehensively and accurately understand the underground transportation production situation and ensure mine safety. Furthermore, the infrared CCD mine track transportation monitoring system can also be used in other mine transportation environments such as conveyor belt transportation, showing broad application prospects. The innovations of this paper are: 1. It proposes to use video image processing methods, and utilize pattern recognition, optimal threshold and geometric similarity theory to realize non-contact monitoring and measurement. 2. It proposes a calculation method for the interrelation of six factors, including position change, time required to generate change, infrared CCD field of view (angle). References [1] Chen Yongfu, ed. Infrared Detection and Control Circuit [M]. Beijing: People's Posts and Telecommunications Press, 2006. [2] Guan Yong, Zhang Jie, Sun Jiping. Research on xDSL technology group and mine remote communication [J], Journal of Liaoning University of Engineering and Technology, 2004, 23(4): 493-495. [3] Guan Yong. Mine remote video monitoring system based on infrared detection technology [D]. Beijing: Beijing Campus of China University of Mining and Technology, 2004. [4] Han Xiangjun. Design and implementation of embedded video acquisition system [J], Microcomputer Information, 2006, 22-2: 26-28. [5] Ruan Qiuqi. Mathematical Image Processing [M]. Beijing: Electronic Industry Press, 2001. [6] Fan Changxin, Zhang Fuyi, Xu Bingxiang. Principles of Communication [M]. Beijing: National Defense Industry Press, 2002.