0

enter image description here Hi, I have a set of points (scatter plot). I am interested in finding multiple (approximately) horizontal straight lines (or clusters) in this data. For example in the image attached, I have drawn straight lines to show the desired result. Number of total possible straight lines in the data is unknown beforehand.

I shall be really thankful if anyone could tell me how to approach this problem. Thanks in advance!

Kashif
  • 29
  • 6

1 Answers1

2

I'd use the RANSAC algorithm (see example in the documentation) or the Hough transform (See example here). Once lines are found, you can set a bound to their slope to select those that are close to being horizontal given some tolerance.

bla
  • 25,846
  • 10
  • 70
  • 101