Fitting a line to the set of planes

199 Views Asked by At

The methods of fitting lines, planes to the set of points are rather popular. But is it possible to do anything similar for the case when the 3D line is fitted to the set of 3D planes?

I.e. there are planes $\pi_i = \{a_i x + b_i y + c_i z + d = 0\}, i = 1, \ldots, n$; and we are searching for a line $L = \{A + tv | t \in \mathbb{R}\}$ that fits them in the best manner.

There is no strict understanding of how to measure the distance from the plane to the line, so any suggestions are welcome.

My own suggestion is to consider the dual transformation $\delta(\{a x + b y + c z + d = 0\}) = (-\frac{a}{d}, -\frac{b}{d}, -\frac{c}{d})$ and then find the best fitting line to dual images of planes, and then map this line back to the primal space. But the problem of such method is that dual transformation doesn't save the Euclidean distance.

EDIT: It can also be assumed (from the practical origin of the problem) that no two normals of planes are equal, in order to exclude the case of parallel planes.

1

There are 1 best solutions below

2
On BEST ANSWER

Maybe the following could work (note that everything marked with "should" is things I believe are true, but don't actually know for sure; you definitely should check them if you consider using this method):

In a first step, determine a point that minimizes the average square distance to all planes. It seems obvious to me that a good average line should pass through that point. If there's more than one such point, since parallel planes are explicitly excluded, they should already form a line, in which case you're finished.

Otherwise, determine the direction of the line as the vector which minimizes the square scalar products with all normals to the plane (that is, which is as orthogonal as possible to all plane normals).