
Missing Rail Fastener Detection Based on Machine Vision Method 
Yongzhi
 
Min
1*
,
 
Benyu Xiao
1
, Hongfeng Ma
2 
and Biao Yue
1
 
1
School of Automation and Electrical Engineering, Lanzhou Jiaotong University, Lanzhou, China   
2
School of Electronical Information Engineering, Lanzhou Institute of Technology, Lanzhou, China 
su_ymin01@qq.com, 13893178455@163.com, 13609345559@139.com, 1440127943@qq.com 
Keywords:  Fastener  missing  detection,  area  positioning,  template  matching,  occlusion  removal,  machine  vision, 
minimum distance classifier. 
Abstract:  Rail  fastener  missing detection is  an  important  part  of railway  daily  inspection,  according  to  the  need  of 
modern railway automatic detection, a method of rail fastener missing detection based on template matching 
is proposed in this paper. Firstly, in order to deal with the interference of environmental light, according to 
the basic principle of machine vision, a simple rail inspection car is designed for image acquisition. Secondly, 
according  to the  characteristics of the  track  image, the  rail  fastener  area is  located  by using the  mutation 
information  of the  image.  Then,  through the establishment  of  template, test  images are matched  with the 
template image, when the matching degree between test images and template images is low, it is need to detect 
the occlusion area of the test image and if there is a occlusion in the test image, remove the occlusion area 
from the test image and sample images to obtain new sample images and test image. Finally, the minimum 
distance classifier is used to detect the missing rail fastener. Simulation results show that the correct detection 
rate  of  this  algorithm  is  93.7%  and  the  average  detection  time  of  each  image  is  385.74  ms,  providing  a 
reference for real-time detection of railway line. 
1  INTRODUCTION 
With  the  rapid  development  of  high-speed  railway, 
how  to  ensure  the  safe  operation  of  the  train  has 
attracted more and more attention of the public. Track 
fastener  is  an  important  component  for  connecting 
rail  and  track  sleeper,  playing  an  important  role  of 
holding  on  the  track  gauge  and  preventing  the  rail 
from  vertically  and  horizontally  moving  relative  to 
the track sleeper, once be lost will bring security risks 
to the safe operation of the train(Gibert, et al, 2017). 
In  recent  years,  many  domestic  and  foreign 
scholars have done a lot of research on the detection 
of  missing  track  fastener  and  have  obtained  some 
achievements. Among them, Wang L et al.(2011) use 
principal  component  analysis  (PCA)  algorithm  to 
extract the feature vector of the rail fastener nut and 
use  the  minimum  distance  classifier  to  detect  the 
fastener. Yang J et al. (2011) use the orientation field 
algorithm and the template matching method to detect 
the state of the rail fastener. Jia L H(2014) carries on 
processing to the image edge by using mathematical 
morphology, intercepts the sub module from the test 
images to match with the standard rail fastener image 
and uses the support vector machine (SVM) method 
to detect the  missing fastener. Yan F(2014) extracts 
the  edge  feature  of  the  fastener  image,  and  then 
respectively use the BP neural network and fuzzy C 
mean  clustering  method  to  identify  the  missing 
fastener.   
The  existing  researches  mainly  focuses  on  the 
case that the track fastener image is not be occluded. 
In that case, the local characteristics of rail fastener is 
not interfered by the external environment and can be 
easily extracted. However, the track fasteners may be 
obscured by such as fallen leaves or food bags et al. 
in  the  actual  railway  lines,  causing  some  of  local 
features  of  track  fastener  be  split  and  cannot  be 
accurately extracted. 
Taking into account the situation that rail fastener 
may be obscured by some occlusions, a method based 
on  machine  vision  method  for  the  detection  of 
missing rail fastener is proposed in this paper. Firstly, 
the rail fastener area is located by using the position 
relationship among  components  of the track image. 
Then, select a track image that contains rail fastener 
a track image lacking of track fastener as the sample 
images,  and  the  test  image  is  compared  with  the 
sample images. When there is a high matching degree 
between  the  test  image  and  the  sample  images, the 
Min, Y., Xiao, B., Ma, H. and Yue, B.
Missing Rail Fastener Detection Based on Machine Vision Method.
In 3rd International Conference on Electromechanical Control Technology and Transportation (ICECTT 2018), pages 119-124
ISBN: 978-989-758-312-4
Copyright © 2018 by SCITEPRESS – Science and Technology Publications, Lda. All rights reserved
119