# Dealing with Low Quality Images in Railway Obstacle Detection System
## 6 Conclusions  
This paper presents an improved edge detection method for the automatic detection and rejection of images of inadequate quality regarding the level of blur. The method is designed to be used as part of the obstacle and track intrusion detection systems in railways, which are of great importance in modern autonomous driving systems. Practically, for the successful operation of the decision support system, which makes complex decisions based on the information coming from the processing results of deep learning models, it is necessary to have a good training database comprised only of images of adequate quality regarding blur. Furthermore, the same blur detection (BD) algorithm is used to reject blurred images from the processing pipeline, thus saving the computational time for processing of good quality images. The proposed BD algorithm is based on the classic Laplace operator, but with significant improvements with regard to noise reduction and the automatic calculation of thresholds. To verify the effectiveness of the proposed approach, we performed several experiments with the proposed and other state-of-the-art methods on our own real-world railway dataset. This database consisted of 2180 images obtained from on-ground testing in real-world conditions by different types of cameras mounted in front of the train. The analysis of the obtained experimental results favored the proposed method over the others in terms of better accuracy, precision, recall and F score. To make a fair comparison with the other methods, we also performed an analysis based on the precision-recall curve, and it should be highlighted that the proposed improved algorithm yielded the highest precision within the entire recall range [0, 1]. In addition, precision values for the proposed technique are greater than 0.5, indicating that there is a slight probability of missing real positive samples in all thresholds.  
Conceptualization, S.P. and M.M.; methodology, M.M. and S.-D.S.; MATLAB software S.-D.S., software S.P. and M.M.; validation, M.B.; formal analysis, D.A. and S.-D.S.; investigation, S.P.; resources, M.B.; data curation, writing--original draft preparation, S.P.; writing--review and editing, D.A., S.-D.S., M.M. and M.B.; visualization, S.P. and M.B.; supervision, M.M. and D.A.; project administration, S.-D.S.; funding acquisition, S.-D.S. All authors have read and agreed to the published version of the manuscript.  
The authors disclosed the receipt of the following financial support for the research, authorship, and/or publication of this article: This research received funding from the Shift2 Rail Joint Undertaking under the European Union's Horizon 2020 research and innovation program under Grant Agreement No. 881784.  
Not applicable.  
Figure 8: Quantitative precision–recall curve of different blur-detection approaches.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** Not applicable.  
**Acknowledgments:** This work has been supported by the Ministry of Education, Science and Technological Development of the Republic of Serbia. Special thanks to the Serbian Railways Infrastructure, and Serbia Cargo for the support in conducting the SMART and SMART2 OD field tests.  
**Conflicts of Interest:** The authors declare no conflict of interest.