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.