LineFit: A Geometric Approach for Fitting Line Segments in Images | SpringerLink
Skip to main content

LineFit: A Geometric Approach for Fitting Line Segments in Images

  • Conference paper
  • First Online:
Computer Vision – ECCV 2024 (ECCV 2024)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 15113))

Included in the following conference series:

  • 57 Accesses

Abstract

We present LineFit, an algorithm that fits line segments from a predicted image gradient map. While existing detectors aim at capturing line segments on line-like structures, our algorithm also seeks to approximate curved shapes. This particularity is interesting for addressing vectorization problems with edge-based representations, after connecting the detected line segments. Our algorithm measures and optimizes the quality of a line segment configuration globally as a point-to-line fitting problem. The quality of configurations is measured through the local fitting error, the completeness over the image gradient map and the capacity to preserve geometric regularities. A key ingredient of our work is an efficient and scalable exploration mechanism that refines an initial configuration by ordered sequences of geometric operations. We show the potential of our algorithm when combined with recent deep image gradient predictions and its competitiveness against existing detectors on different datasets, especially when scenes contain curved objects. We also demonstrate the benefit of our algorithm for polygonalizing objects.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
¥17,985 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
JPY 3498
Price includes VAT (Japan)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
JPY 8465
Price includes VAT (Japan)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
JPY 10581
Price includes VAT (Japan)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. The RoofSat dataset. https://project.inria.fr/roofsat/

  2. Abdellali, H., Frohlich, R., Vilagos, V., Kato, Z.: L2D2: learnable line detector and descriptor. In: 3DV (2021)

    Google Scholar 

  3. Acuna, D., Ling, H., Kar, A., Fidler, S.: Efficient interactive annotation of segmentation datasets with polygon-RNN++. In: CVPR (2018)

    Google Scholar 

  4. Akinlar, C., Topal, C.: EDLines: real-time line segment detection by edge drawing. In: ICIP (2011)

    Google Scholar 

  5. Almazan, E.J., Tal, R., Qian, Y., Elder, J.H.: MCMLSD: a dynamic programming approach to line segment detection. In: CVPR (2017)

    Google Scholar 

  6. Arbelaez, P., Maire, M., Fowlkes, C., Malik, J.: Contour detection and hierarchical image segmentation. PAMI 33(5) (2011)

    Google Scholar 

  7. Barath, D., Matas, J.: Progressive-X: efficient, anytime, multi-model fitting algorithm. In: ICCV (2019)

    Google Scholar 

  8. Bauchet, J.P., Lafarge, F.: KIPPI: kinetic polygonal partitioning of images. In: CVPR (2018)

    Google Scholar 

  9. Cho, N.G., Yuille, A., Lee, S.W.: A novel linelet-based representation for line segment detection. PAMI 40(5) (2018)

    Google Scholar 

  10. Cohen-Steiner, D., Alliez, P., Desbrun, M.: Variational shape approximation. In: SIGGRAPH (2004)

    Google Scholar 

  11. Dai, X., Gong, H., Wu, S., Yuan, X., Ma, Y.: Fully convolutional line parsing. Neurocomputing 506 (2022)

    Google Scholar 

  12. Denis, P., Elder, J.H., Estrada, F.J.: Efficient edge-based methods for estimating Manhattan frames in urban imagery. In: Forsyth, D., Torr, P., Zisserman, A. (eds.) ECCV 2008. LNCS, vol. 5303, pp. 197–210. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-88688-4_15

    Chapter  Google Scholar 

  13. Fabbri, R., et al.: Trifocal relative pose from lines at points. PAMI 45(6) (2023)

    Google Scholar 

  14. Favreau, J.D., Lafarge, F., Bousseau, A., Auvolat, A.: Extracting geometric structures in images with Delaunay point processes. PAMI 42(4) (2020)

    Google Scholar 

  15. Gioi, R.V., Jakubowicz, J., Morel, J.M., Randall, G.: LSD: a fast line segment detector with a false detection control. PAMI 32(4) (2010)

    Google Scholar 

  16. Gomez-Ojeda, R., Moreno, F.A., Zuniga-Noel, D., Scaramuzza, D., Gonzalez-Jimenez, J.: Pl-SLAM: a stereo slam system through the combination of points and line segments. IEEE Trans. Robot. 35(3) (2019)

    Google Scholar 

  17. Gu, G., Ko, B., Go, S., Lee, S.H., Lee, J., Shin, M.: Towards light-weight and real-time line segment detection. In: AAAI (2022)

    Google Scholar 

  18. Hofer, M., Maurer, M., Bischof, H.: Efficient 3D scene abstraction using line segments. CVIU 157 (2017)

    Google Scholar 

  19. Huang, K., Wang, Y., Zhou, Z., Ding, T., Gao, S., Ma, Y.: Learning to parse wireframes in images of man-made environments. In: CVPR (2018)

    Google Scholar 

  20. Huang, S., Qin, F., Xiong, P., Ding, N., He, Y., Liu, X.: TP-LSD: tri-points based line segment detector. In: Vedaldi, A., Bischof, H., Brox, T., Frahm, J.-M. (eds.) ECCV 2020. LNCS, vol. 12372, pp. 770–785. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-58583-9_46

    Chapter  Google Scholar 

  21. Kaiser, A., Ybanez Zepeda, J.A., Boubekeur, T.: A survey of simple geometric primitives detection methods for captured 3D data. Comput. Graph. Forum 37 (2018)

    Google Scholar 

  22. Kirillov, A., et al.: Segment anything. In: ICCV (2023)

    Google Scholar 

  23. Lazarow, J., Xu, W., Tu, Z.: Instance segmentation with mask-supervised polygonal boundary transformers. In: CVPR (2022)

    Google Scholar 

  24. Lee, D., Hebert, M., Kanade, T.: Geometric reasoning for single image structure recovery. In: CVPR (2009)

    Google Scholar 

  25. Li, M., Lafarge, F., Marlet, R.: Approximating shapes in images with low-complexity polygons. In: CVPR (2020)

    Google Scholar 

  26. Liang, J., Homayounfar, N., Ma, W.C., Xiong, Y., Hu, R., Urtasun, R.: PolyTransform: deep polygon transformer for instance segmentation. In: CVPR (2020)

    Google Scholar 

  27. Lin, Y., Pintea, S.L., van Gemert, J.C.: Deep hough-transform line priors. In: Vedaldi, A., Bischof, H., Brox, T., Frahm, J.-M. (eds.) ECCV 2020. LNCS, vol. 12367, pp. 323–340. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-58542-6_20

    Chapter  Google Scholar 

  28. Liu, J., et al.: PolyFormer: referring image segmentation as sequential polygon generation. In: CVPR (2023)

    Google Scholar 

  29. Mateus, A., Tahri, O., Aguiar, P., Lima, P.U., Miraldo, P.: On incremental structure from motion using lines. IEEE Trans. Robot. 38(1) (2022)

    Google Scholar 

  30. Meng, Q., Zhang, J., Hu, Q., He, X., Yu, J.: LGNN: a context-aware line segment detector. In: ACM International Conference on Multimedia (2020)

    Google Scholar 

  31. Micusik, B., Wildenauer, H.: Structure from motion with line segments under relaxed endpoint constraints. IJCV 124 (2017)

    Google Scholar 

  32. Oesau, S.: Point set shape detection. In: CGAL User and Reference Manual. CGAL Editorial Board, 5.3 edn. (2021)

    Google Scholar 

  33. Pautrat, R., Barath, D., Larsson, V., Oswald, M.R., Pollefeys, M.: DeepLSD: line segment detection and refinement with deep image gradients. In: CVPR (2023)

    Google Scholar 

  34. Pautrat, R., Lin, J.T., Larsson, V., Oswald, M., Pollefeys, M.: SOLD2: self-supervised occlusion-aware line description and detection. In: CVPR (2021)

    Google Scholar 

  35. Pumarola, A., Vakhitov, A., Agudo, A., Sanfeliu, A., Moreno-Noguer, F.: Pl-SLAM: real-time monocular visual slam with points and lines. In: ICRA (2017)

    Google Scholar 

  36. Raguram, R., Chum, O., Pollefeys, M., Matas, J., Frahm, J.M.: USAC: a universal framework for random sample consensus. PAMI 35(8) (2013)

    Google Scholar 

  37. Raguram, R., Frahm, J.-M., Pollefeys, M.: A comparative analysis of RANSAC techniques leading to adaptive real-time random sample consensus. In: Forsyth, D., Torr, P., Zisserman, A. (eds.) ECCV 2008. LNCS, vol. 5303, pp. 500–513. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-88688-4_37

    Chapter  Google Scholar 

  38. Schnabel, R., Wahl, R., Klein, R.: Efficient RANSAC for point-cloud shape detection. Comput. Graph. Forum 26(2) (2007)

    Google Scholar 

  39. Sun, X., Christoudias, C.M., Fua, P.: Free-shape polygonal object localization. In: Fleet, D., Pajdla, T., Schiele, B., Tuytelaars, T. (eds.) ECCV 2014. LNCS, vol. 8694, pp. 317–332. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-10599-4_21

    Chapter  Google Scholar 

  40. Suárez, I., Buenaposada, J.M., Baumela, L.: ELSED: enhanced line segment drawing. PR 127 (2022)

    Google Scholar 

  41. Tardif, J.P.: Non-iterative approach for fast and accurate vanishing point detection. In: ICCV (2009)

    Google Scholar 

  42. Teplyakov, L., Erlygin, L., Shvets, E.: LSDNet: trainable modification of LSD algorithm for real-time line segment detection. IEEE Access 10 (2022)

    Google Scholar 

  43. Tong, X., Ying, X., Shi, Y., Wang, R., Yang, J.: Transformer based line segment classifier with image context for real-time vanishing point detection in Manhattan world. In: CVPR (2022)

    Google Scholar 

  44. Wu, S.T., Marquez, M.R.G.: A non-self-intersection Douglas-Peucker algorithm. In: IEEE Symposium on Computer Graphics and Image Processing (2003)

    Google Scholar 

  45. Xu, C., Zhang, L., Cheng, L., Koch, R.: Pose estimation from line correspondences: a complete analysis and a series of solutions. PAMI 39(6) (2017)

    Google Scholar 

  46. Xu, Y., Xu, W., Cheung, D., Tu, Z.: Line segment detection using transformers without edges. In: CVPR (2021)

    Google Scholar 

  47. Xue, N., Bai, S., Wang, F., Xia, G.S., Wu, T., , Zhang, L.: Learning attraction field representation for robust line segment detection. In: CVPR (2019)

    Google Scholar 

  48. Xue, N., et al.: Holistically-attracted wireframe parsing. In: CVPR (2020)

    Google Scholar 

  49. Yu, M., Lafarge, F.: Finding good configurations of planar primitives in unorganized point clouds. In: CVPR (2022)

    Google Scholar 

  50. Zhang, H., Luo, Y., Qin, F., He, Y., Liu, X.: ELSD: efficient line segment detector and descriptor. In: ICCV (2021)

    Google Scholar 

  51. Zhang, Y., Wei, D., Li, Y.: AG3line: active grouping and geometry-gradient combined validation for fast line segment extraction. PR 113 (2021)

    Google Scholar 

  52. Zhang, Z., et al.: PPGNet: learning point-pair graph for line segment detection. In: CVPR (2019)

    Google Scholar 

  53. Zhou, Y., Qi, H., Ma, Y.: End-to-end wireframe parsing. In: ICCV (2019)

    Google Scholar 

Download references

Acknowledgements

This work was supported by Airbus DS and the French Space Agency (CNES). The authors thank Laurent Gabet, Emmanuel Garcia and Roberto Dyke for the technical discussions.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Florent Lafarge .

Editor information

Editors and Affiliations

1 Electronic supplementary material

Below is the link to the electronic supplementary material.

Supplementary material 1 (pdf 20059 KB)

Rights and permissions

Reprints and permissions

Copyright information

© 2025 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Boyer, M., Youssefi, D., Lafarge, F. (2025). LineFit: A Geometric Approach for Fitting Line Segments in Images. In: Leonardis, A., Ricci, E., Roth, S., Russakovsky, O., Sattler, T., Varol, G. (eds) Computer Vision – ECCV 2024. ECCV 2024. Lecture Notes in Computer Science, vol 15113. Springer, Cham. https://doi.org/10.1007/978-3-031-73001-6_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-73001-6_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-73000-9

  • Online ISBN: 978-3-031-73001-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics