Simultaneous regression of multiple curves in the same dataset or image? I am getting the pattern shown in the picture from an experiment. To my human brain it is evident that it consists of some 20 straight lines. I need to find position and slope of all these lines (perform a regression). But I need to do it completely automatically. If this were a a single sequence I would have used RLS(Recursive Least Squares) or Kalman filter. But how can I go about if I want to make 20 simultaneous regressions that do not conflict with each other?

What would be the most generic way to solve these kind of problems (say if I have an image of 20 overlapping boxes and need to find size, position and angle of all of them, at once)? I suppose the solution is more than well-known since this would be fundamental for any image recognition, but I cannot find a generic description of the method.
There are many possible methods.  In your picture, there aren't too many dots, so the following algorithm might be good enough:


For each pair of points, find the line through them.  Count the number of points that are approximately on that line.
Choose the line that has the most number of points on it.  Output that line.  Delete all points that are approximately on that line from the figure.
Repeat until no points remain.


For fancier methods (e.g., if you have a huge number of points, or some prior model for what kinds of lines you expect to see), you can look at RANSAC and the expectation maximization (EM) algorithm, but given your sample picture, the above simple method might be adequate in your setting.