You are on page 1of 5

2021 IEEE International Conference on Power Electronics, Computer Applications (ICPECA)

Rail Track Edge Detection Methods Based on


Improved Hough Transform
2021 IEEE International Conference on Power Electronics, Computer Applications (ICPECA) | 978-1-7281-9004-4/20/$31.00 ©2021 IEEE | DOI: 10.1109/ICPECA51329.2021.9362706

Xiaoguang Li Zijian Cong Yong Zhang


School of Electric and Information School of Electric Information School of Electric and Information
Changchun Guanghua University Engineering Changchun Guanghua University
Changchun, China Changchun University Changchun, China
e-mail: 843973603@qq.com Changchun, China e-mail: 511304994@qq.com
e-mail: 3282801491@qq.com

Abstract—In order to ensure the safety of train operation, it collision between the train and the obstacles by considering
is necessary to strengthen the real-time monitoring of train the reaction time and speed of the driver, delay time of
operation environment. This paper use improved Hough wireless communication, safety protection distance and other
transform to detect the rail track edge. First, detect the edge of factors, and developed the train collision early warning
the image use Canny operator. Second, find the lines among system. Albrecht[6] et al. Through finding the optimal speed
the edge image. Third, find longest lines as the outlines. Matlab switching point, the corresponding train speed control curve
simulation is used to detect the collected image. Experimental is generated, which can provide drivers with strategies and
results show that this detection method can get a good result. control suggestions on energy-saving driving. From the
perspective of train operation safety, Wu Pan[7] focuses on
Keywords—image process, Hough transform, rail track
outline, edge detection
the early warning system of train approaching, and realizes
the function of train approaching early warning by means of
direct communication between trains. By analyzing the brake
I. INTRODUCTION system structure and braking principle of the train. Chen
With the development of the economy, the construction Sijie[8] constructs the corresponding braking model of the
scale of urban rail transit is expanding year by year. The train, which can provide a more accurate control curve for
operation mileage grows continuously. It has been the the driver to control the car. However, the above-mentioned
preferred mode of transportation for passengers in medium train warning and control technology mainly provides early
and large cities. But because of the large passenger and small warning for the driver, and does not realize the active control
departure interval, urban rail trains usually causes accidents. behavior. When the driver reacts too slowly and the
The accidents is not only difficult to rescue, but also may emergency is not enough, it is likely to endanger the traffic
cause more serious casualties and ultimately affect the travel safety. Therefore, the research on Automatic Train Braking
of passengers. Therefore, it is very important to use the Technology under emergency situation should be further
obstacle detection device to monitor the running strengthened.
environment of the train in real time, and take corresponding
measures to timely warn or control the train. II. ANALYZE OF TRAIN TRACK IMAGE
In the research of obstacle detection technology, there are On a single track, the image of the track is mainly
many perfect research methods. Ryuta[1] et al. Used composed of two rails and the partition between the rails.
monocular vision image to detect the obstacles along the The detection of the outer edge of the track can be
railway, and used the simulation scene to verify the understood as straight line detection. The image is relatively
reliability of the method. Jaehyun Han[2] et al. Proposed a simple. When the track is paved, in order to reach the
method of using range sensors to detect the boundary and destination, it often turns. The turning radius is generally
internal obstacles of the operating environment. At the same greater than 20 meters. Sometimes, in order to change lanes,
time, the usability of this method was verified by special the tracks will cross each other in important hubs the orbit
means. Huang Rulin[3] et al. proposed an obstacle detection arrangement is more complicated. The rail track images are
method based on space-time feature vector, which is mainly shown in figure 1.
used to detect dynamic obstacles, and has strong feasibility.
Qu Yue[4] adopts multi-technology fusion detection, studies Rail track image has complex background. That makes
video image and lidar, and proposes and verifies the fusion the detect work more difficult. It is very important to detect
algorithm. However, the above obstacle detection methods the track obstacle accurately. The image content includes
do not detect static obstacles and dynamic obstacles at the straight track, curved track, cross track, etc.
same time, and do not clarify the information transmission
mode of obstacle detection results, so the detection accuracy
and information transmission efficiency need further
research and improvement.
In the aspect of train early warning and control
technology research, there are also many research results at
this stage. Li Sihui[5] et al. Calculated the time to avoid the

978-1-7281-9004-4/21/$31.00 ©2021 IEEE 12 Shenyang, China


January 22-24, 2021

Authorized licensed use limited to: BOURNEMOUTH UNIVERSITY. Downloaded on June 25,2021 at 14:12:04 UTC from IEEE Xplore. Restrictions apply.
image space is transformed into the problem of finding the
maximum number of sinusoidal curves passing through
points in polar coordinate space. In the Hough space,
the more the number of intersection points of the curve is,
the more certain the parameters are, and the fuller the graph
is drawn.

Fig. 1. Rail track image Fig. 3. Cartesian coordinate system and polar space

III. PINCIPLE OF HOUGH TRANSFORM IV. RAIL TRACK EDGE DETECTION BASED ON IMPROVED
Hough Transform was proposed by Paul Hough in 1962. HOUGH TRANSFORM
The central idea is to detect lines through coordinate
transformation. In Cartesian coordinate system, the equation A. Rail track image enhancement
of oblique cut line is equation 1. The anti sharpening mask technology is first used to
strengthen the edge and detail information of the image in
the camera. Optically, the focusing positive film and
(1) defocusing negative film are added to the negative film to
improve the high frequency information of the positive film
The slope does not exist when the line is perpendicular and highlight the contour information. Because the
to the x axis, which brings many inconveniences. Suppose k defocusing negative has the same effect as the "blur"
and q are the independent variable and variable. Equation 1 template and is opposite to sharpening, it is called
can be changed as equation 2. The space is called Hough UM(Unsharp masking). In the image processing technology,
space. the UM method is to use the UM to passivate and blur the
original image, which is equivalent to low-pass filtering.
Then, the difference between the blurred image and the
(2)
original image point by point is performed to obtain the
image with high-frequency information. Then, it is
In Cartesian coordinate system, a line corresponds to a multiplied by a correction factor, and finally summed with
point in Hough space. A straight line in Hough space the original image, so as to enhance the original image The
corresponds to a point in Cartesian coordinate system. high frequency components in the initial figure and the
Several points in Cartesian coordinate system correspond to purpose of the contour. The whole process can be expressed
several lines in Hough space, which is shown in figure 2. as equation 5 and 6.

(5)

(6)

Here, is the gray value of pixel


, is the low frequency value. is the
high frequency value. is the pixel value after enhance.
Fig. 2. Cartesian coordinate system and Hough space
The image enhanced by linear anti sharpening mask only
Use and to express the line. Equation 1 can be enhances the high-frequency component of the original
changed as Equation 3 and 4. image, and does not suppress the low-frequency information
of the image, the contrast between the surface defect and the
background in the rail image is not well enhanced, and the
surface defect is not highlighted.
(3)
For the gray value of a specific pixel in the
original image, the low-frequency anti sharpening mask
value is usually the average pixel gray value of the adjacent
(4) local area with the pixel as the center. Here, the local area is
set as the window area with the point (x, y) as the center and
A point in image space corresponds to a curve in the length and width of (2n + 1). N is a positive integer. The
parameter space. In this way, the problem of line detection in

13

Authorized licensed use limited to: BOURNEMOUTH UNIVERSITY. Downloaded on June 25,2021 at 14:12:04 UTC from IEEE Xplore. Restrictions apply.
gray mean value of the adjacent local area can be calculated Canny edge detection was proposed in 1986, and it has
by Equation 7. been more than 30 years. However, Canny algorithm is still
one of the most classic and advanced algorithms in image
edge detection.
Compared with Sobel, Prewitt and other operators,
Canny algorithm is more excellent. Sobel, Prewitt and other
(7)
operators have the following disadvantages. The gradient
direction of the edge is not fully utilized. Finally, the binary
Enhanced images are shown in Figure 4. graph is simply processed by single threshold.
Canny algorithm is improved based on these two points.
A non maximum suppression method based on edge gradient
direction and a dual threshold lag threshold processing are
proposed.
Detect the edges using Sobel operator.

(a) straight line rail track

(9)

Calculate the amplitude and angle of the image.

(10)
(b) straight line rail track

(11)

The amplitude is suppressed along the gradient direction.


The horizontal edge gradient direction is

(c) cross line rail track The direction of 135 ° edge gradient is

The vertical edge gradient direction is

The direction of 45 ° edge gradient is


(d) cross line rail track
Fig. 4. Rail track enhancement images

B. Edeg detection of rail track line At each point, compared with the two pixels along its
corresponding gradient direction, if the center pixel is the
Rail track line has an obvious feature of line. So use maximum value, it will be retained; otherwise, the center will
Hough Transform to detect the line. Make the image into be set to 0. In this way, the non maximum value can be
gray scale using weighted average method as shown in suppressed and the point with the largest local gradient can
Equation 8. be retained to obtain the refined edge.
The points less than the low threshold are discarded and
assigned 0; the points larger than the high threshold are
(8) immediately marked (these points are determined edge

14

Authorized licensed use limited to: BOURNEMOUTH UNIVERSITY. Downloaded on June 25,2021 at 14:12:04 UTC from IEEE Xplore. Restrictions apply.
points) and assigned 255; the points less than the high represents the track side line.
threshold and greater than the low threshold are determined
by 8 connected regions. The simulation results of MATLAB are shown in Figure
6 and Figure 7.
The gray images and edge images are shown in Figure 5.

Fig. 6. Detect result for one rail track

Fig. 7. Two cross rail tracks

Fig. 5. Canny edge detection images In Figure 6, the rail track are straight, two straight lines
can be detected. In Figure 7,the rail track are crossed, two
C. Line detect groups of track lines can be seen.
Use Hough Transform to detect the lines. The outlines of
rail track are needed. During the above calculate, the lines VI. CONCLUSIONS
are more than the outlines. So find longest lines as the This paper use Hough Transform to detect rail track edge.
outlines. The image content includes straight track, curved track, cross
track, etc. This detection method can get a good result. But
V. EXPERIMENTAL RESULTS the lines are straight. More research on curve edge are
The above methods are simulated. Based on the image needed.
detection technology, The image content includes straight
track, curved track, cross track, etc. Matlab simulation is ACKNOWLEDGMENT
used to detect the collected image, and the identified line The work is supported by Department of science and

15

Authorized licensed use limited to: BOURNEMOUTH UNIVERSITY. Downloaded on June 25,2021 at 14:12:04 UTC from IEEE Xplore. Restrictions apply.
technology of Jilin Province(2020C019-8). [4] QU Yue, Research on non contact obstacle detection system for urban
rail train[D]. Beijing, Beijing Jiaotong University, 2017
[5] LI S H,CAI B G,LIU J,et al. Collision risk analysis based train
REFERENCES collision early warning strategy[J]. Accident Analysis & Prevention,
[1] NAKASONE Ryuta, NAGAMINE Nozomi. Frontal Obstacle 2018,112: 94 - 104.
Detection Using Background Subtraction and Frame Registration[J]. [6] ALBRECHT A R,HOWLETT P G,PUDNEY P J,et al. Energy-
IEEE Railway Technical Research Institute,2017,58( 4) : 298 - 302. efficient train control: From local convexity to global optimization
[2] HAN J,KIM D,LEE M,et al. Enhanced Road Boundary and Obstacle and uniqueness[J]. Automatica,2013,49(10) : 3072 - 3078.
Detection Using a Downward-Looking LIDAR Sensor[J]. IEEE [7] WU Pan. Research on early warning system of metro train
Transactions on Vehicular Technology,2012,61( 3) : 971 - 985. approaching [D]. Beijing, Beijing Jiaotong University, 2014
[3] HUANG Rulin, LIANG Huawei, CHEN Jiajia, et al.. Dynamic [8] CHEN Sijie. Research on control curve of heavy haul train operation
obstacle detection, tracking and recognition method for unmanned control system [D]. Beijing, Beijing Jiaotong University, 2016
vehicle based on lidar[J]. Robot, 2016,38( 04) : 437 - 443.

16

Authorized licensed use limited to: BOURNEMOUTH UNIVERSITY. Downloaded on June 25,2021 at 14:12:04 UTC from IEEE Xplore. Restrictions apply.

You might also like