4

I have some planes in 3D space, which in theory should all intersect at the same line.

Each plane is calculated by taking 3 measured points. However there is some error in the measurement of these points.

So in practice, the planes do not all intersect at the same line.

How can I get the "average" intersection line for all these planes?

I could just intersect each plane with each other plane, and average the lines. However, when two planes have almost the same orientation, a small error in their measurements will result in a huge error in their calculated intersection. So I would be magnifying the measurement error when calculating the average intersection this way.

Is there a fairer way to calculate the common intersection line?

HugoRune
  • 13,157
  • 7
  • 69
  • 144
  • Weight the intersection lines with a small value for *same orientation planes* and a bigger one for *orthogonal planes*... Or eliminate intersections of *near parallel planes*. – Jean-Baptiste Yunès Jun 28 '16 at 10:00
  • Yes, weighting each individual line should work, thanks! I am curious if there is some mathematical justification for the exact weight, i.e. if I weight each line by [angle-between-the-planes-in-rad]² would I get the best fit result, or is there some other optimal value for the weight. – HugoRune Jun 28 '16 at 10:15
  • I thought about it..but have no good answer on this. You have to manage both the error model and the angle between planes. I think you mustn't not use linear function, use some fast growing function, an exponential-like? Really favor orthogonals. All of this depend on the number of planes, etc. – Jean-Baptiste Yunès Jun 28 '16 at 10:22
  • Take the dot product to get the cosine of the angle between the normals of the planes, and subtract abs(this) from 1. This should give you ~0 when the planes are nearly parallel and ~1 when perpendicular. Then to adjust for the fact that reasonable values above zero still give sufficient accuracy, take some large root of this value, e.g. 10th root or something. –  Jun 28 '16 at 10:31
  • Perhaps only consider the "best" sample lines? That is, for each plane, find the the one other plane most orthogonal to it, and consider only that line. If you have `n` planes you will end up with `n` lines, possibly not all unique. Average those. In any event I would recommend you come up with a variety of representative test cases and try several approaches to see which produces the "best" results. – Patrick87 Jun 29 '16 at 15:13

1 Answers1

0

I think what you need is not averaging but an algorithm which detects outliers (i.e. bad intersections lines) and discards them.

One standard algorithm doing this is the random sample consensus (RANSAC). But for be able to use it you would have to define some kind of distance between lines, which should be possible to do in a meaningful way.

Another possibility to find the inlier (i.e. good intersection lines) is the Hough transform. In this algorithm, the whole parameter space of lines is subdivided into cells. A calculated intersection line "votes" for the cell which contain the parameters of this intersection line. The parameter cell with the most votes wins. One can refine the result by calculating the average line from all lines which voted for the winning cell.

ead
  • 32,758
  • 6
  • 90
  • 153