Fast and accurate line detection with GPU-based least median of squares

Gil Shapira, Tal Hassner

Research output: Contribution to journalArticlepeer-review


We propose an accurate and efficient 2D line detection technique based on the standard Hough transform (SHT) and least median of squares (LMS). We prove our method to be very accurate and robust to noise and occlusions by comparing it with state-of-the-art line detection methods using both qualitative and quantitative experiments. LMS is known as being very robust but also as having high computation complexity. To make our method practical for real-time applications, we propose a parallel algorithm for LMS computation which is based on point-line duality. We also offer a very efficient implementation of this algorithm for GPU on CUDA architecture. Despite many years since LMS methods have first been described and the widespread use of GPU technology in computer vision and image-processing systems, we are unaware of previous work reporting the use of GPUs for LMS and line detection. We measure the computation time of our GPU-accelerated algorithm and prove it is suitable for real-time applications. Our accelerated LMS algorithm is up to 40 times faster than the fastest single-threaded CPU-based implementation of the state-of-the-art sequential algorithm.

Original languageEnglish
Pages (from-to)839-851
Number of pages13
JournalJournal of Real-Time Image Processing
Issue number4
StatePublished - 1 Aug 2020

Bibliographical note

Publisher Copyright:
© 2018, Springer-Verlag GmbH Germany, part of Springer Nature.


  • CUDA
  • Duality
  • Hough transform
  • Image processing
  • Least median of squares (LMS)
  • Line detection
  • Robust regression


Dive into the research topics of 'Fast and accurate line detection with GPU-based least median of squares'. Together they form a unique fingerprint.

Cite this