Real-Time Traffic Light Signal Recognition System for a Self-driving Car

  • Nakul AgarwalEmail author
  • Abhishek Sharma
  • Jieh Ren Chang
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 678)


In this paper, the implementation of image recognition for traffic light signal recognition system is demonstrated. The detection of traffic light signal is an essential step for a self-driving car. Here we present a method for the recognition of traffic lights using image processing and controlling the vehicle accordingly. The algorithm developed in this research work is tested and processed using a Raspberry Pi board. The input-output modules such as camera, motors and chassis of the model car are all integrated together so they can perform as a single unit. For processing the image on real-time, OpenCV is used as an API to perform essential steps in the detection of signal like capturing, resizing, thresholding and morphological operations. Contour detection on a binary image has further been used for object detection. The algorithm has been tested with Valgrind profiling tools Callgrind and Cachegrind.


Self-driving autonomous car Color detection Image processing Opencv Binary image Contour detection Convex hull Raspberry Pi 


  1. 1.
    Jensen, M.B., Philipsen, M.P., Møgelmose, A., Moeslund, T.B., Trivedi, M.M.: Vision for looking at traffic lights: issues, survey, and perspectives. In: IEEE Transactions on Intelligent Transportation Systems (2015)Google Scholar
  2. 2.
    Williams, C.: Stop lights, sunsets, junctions are tough work for Google’s robo-cars (2016).
  3. 3.
    Lee, U., et al.: EureCar turbo: a self-driving car that can handle adverse weather conditions. In: 2016 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Daejeon, pp. 2301–2306 (2016)Google Scholar
  4. 4.
    Yu, C., Huang, C., Lang, Y.: Traffic light detection during day and night conditions by a camera. In: IEEE 10th International Conference on Signal Processing Proceedings, Beijing, pp. 821–824 (2010)Google Scholar
  5. 5.
    Campbell, J., Amor, H.B., Ang, M.H., Fainekos, G.: Traffic light status detection using movement patterns of vehicles. In: 2016 IEEE 19th International Conference on Intelligent Transportation Systems (ITSC), Rio de Janeiro, pp. 283–288 (2016)Google Scholar
  6. 6.
    Shi, Z., Zou, Z., Zhang, C.: Real-time traffic light detection with adaptive background suppression filter. IEEE Trans. Intell. Transp. Syst. 17(3), 690–700 (2016)CrossRefGoogle Scholar
  7. 7.
    John, V., Yoneda, K., Liu, Z., Mita, S.: Saliency map generation by the convolutional neural network for real-time traffic light detection using template matching. IEEE Trans. Comput. Imaging 1(3), 159–173 (2015)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Michael, M., Schlipsing, M.: Extending traffic light recognition: efficient classification of phase and pictogram. In: 2015 International Joint Conference on Neural Networks (IJCNN), Killarney, pp. 1–8 (2015)Google Scholar
  9. 9.
    Suzuki, S., Abe, K.: Topological structural analysis of digitized binary images by border following. Comput. Vision Graph. Image Proc. 30(1), 32–46 (1985)., ISSN 0734-189XCrossRefzbMATHGoogle Scholar
  10. 10.
    Fisher, R., Perkins, S., Walker, A., Wolfart, E.: Mathematical morphology.
  11. 11.
    Najman, L., Talbot, H.: Mathematical morphology, 1st edn. ISTE, London (2010)zbMATHGoogle Scholar
  12. 12.
    Fisher, R., Perkins, S., Walker, A., Wolfart, E.: Morphology.
  13. 13.
  14. 14.
    Chanda, B., Majumder, D.: Digital image processing and analysis, 1st edn. Prentice-Hall of India, New Delhi (2007)Google Scholar
  15. 15.
    Fisher, R., Perkins, S.,Walker, A., Wolfart, E.: Median filter.
  16. 16.
    Huang, T., Yang, G., Tang, G.: A fast two-dimensional median filtering algorithm. IEEE Trans. Acoust. Speech Signal Process. 27(1), 13–18 (1979)CrossRefGoogle Scholar
  17. 17.
  18. 18.
  19. 19.
  20. 20.
  21. 21.
    Viola, P., Jones, M.: Robust real-time face detection. In: Proceedings Eighth IEEE International Conference on Computer Vision. ICCV 2001, pp. 747–747 (2001)Google Scholar
  22. 22.
    Diaz-Cabrera, M., Cerri, P., Sanchez-Medina, J.: Suspended traffic lights detection and distance estimation using color features. In: 2012 15th International IEEE Conference on Intelligent Transportation Systems, Anchorage, AK, pp. 1315–1320 (2012)Google Scholar
  23. 23.
    Krizhevsky, A., Sutskever, I., Hinton, G. E.: ImageNet classification with deep convolutional neural networks. In: Proceedings of NIPS, pp. 1097–1105 (2012)Google Scholar
  24. 24.
    Philipsen, M.P., Jensen, M.P., Møgelmose, A., Moeslund, T.B., Trivedi., M.M.: Learning based traffic light detection: evaluation on challenging dataset. In: 18th IEEE Intelligent Transportation Systems Conference (2015)Google Scholar
  25. 25.
    Li, Y., Møgelmose, A., Trivedi, M.M.: Pushing the “Speed Limit”: high-accuracy US traffic sign recognition with convolutional neural networks. IEEE Trans. Intell. Veh. 1(2), 167–176 (2016)CrossRefGoogle Scholar
  26. 26.
  27. 27.
    Online diagram software to draw flowcharts, UML & more. Creately.

Copyright information

© Springer International Publishing AG 2018

Authors and Affiliations

  • Nakul Agarwal
    • 1
    Email author
  • Abhishek Sharma
    • 2
  • Jieh Ren Chang
    • 3
  1. 1.Undergraduate, Computer Science and EngineeringThe LNM Institute of Information TechnologyJaipurIndia
  2. 2.Department of Electronics and Communication EngineeringThe LNM Institute of Information TechnologyJaipurIndia
  3. 3.Department of Electronic EngineeringNational Ilan UniversityYilanTaiwan

Personalised recommendations