• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How do you detect the largest set of parallel lines in an image?

Resolved: How do you detect the largest set of parallel lines in an image?

0
By Isaac Tonny on 16/03/2023 Issue
Share
Facebook Twitter LinkedIn

In this post, we will see how to resolve How do you detect the largest set of parallel lines in an image?

Question:

I have images with multiple line in them and I’m looking to detect the largest set of lines which are (approximately) parallel using Python and OpenCV. For example give:
enter image description here
The green lines are the best set:
enter image description here

Best Answer:

you can follow the following steps
  • Apply the Hough Line Transform to detect all line segments in the image.
  • Group the line segments based on their orientation using a clustering
  • Identify the largest cluster of lines. These will be the set of lines that are approximately parallel.

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com

algorithm geometry python
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to compare two text files and and change the sign of the data in powershell?

27/03/2023

Resolved: Java Virtual Machines deleted

27/03/2023

Resolved: PyCharm cannot see my newly compiled .pyc see on import

27/03/2023

Comments are closed.

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.