[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Intersection line and its error of two best fitting planes
From: |
Leo Butler |
Subject: |
Re: Intersection line and its error of two best fitting planes |
Date: |
Sat, 15 May 2010 16:12:04 +0100 (BST) |
User-agent: |
Alpine 1.10 (DEB 962 2008-03-14) |
On Sat, 15 May 2010, address@hidden wrote:
< Dear Leo!
<
<
< Many thanks for Your reply.
<
< On 14/05/10 21:25:46, Leo Butler wrote:
< > < 2010/5/14 <address@hidden>
< > < I have two sets of measured points (in 3D). Points of each set are
supposed to
< > < sit on a plane.
< > < Now I want to find the intersection line and its directional and
positional
< > < error.
< > < The best fitting plane could be found with linear regression. The plane
is in vector 'B', errors etc can be found in variables 'Residuals' and 'STATS'
< >
< > It looks like a linear regression problem, but it's not.
< > An affine plane P in R^3 is determined by a unit normal n and
< > a constant c such that
<
<
< I need some time to catch up on this with some math books;-) And to understand
< Your octave code.
< For that: Waht would be the name of the method You use for solving the
< problem?
Constrained least squares. The idea is very geometric. I've co-authored
a couple papers on this, the most relevent is part 3 of
http://erdelyi.maths.ed.ac.uk/~lbutler/bayes-ii-draft.pdf
< Also I wonder what is a? It's not defined in Your code.
<
<
< Is the resulting plane the same for both methods and only the error differ?
< Looking at the nice visualization of Stefans solution, I'd say it looks well
< fitted!
No, least squares estimates the normal vector, but the constant is only
implied (it's the reciprocal of the length of the normal vector). The
bulk of the error occurs in the estimate of the constant (not
surprising, since the OLS objective function does not utilise the
constant.)
Thus, you are getting a plane close to parallel to the real plane, but
you can do better by reducing the error in the constant.
<
< Still I'm not sure how the error of the planes (what ever method used) would
< go into the error of the orientation and displacement of the intersection
< line.
Nonlinearly. As I said, this is a (differential) geometric problem.
<
< As a physicist I just had the idea of doing it like this:
<
< 1. Take just three points of each set to define two planes (without error).
< 2. Find the intersection line (without error) of these two planes.
< 3. Do this for all possible combinations of three points of each set
< 4. Calculate a mean direction vector of the intersection line by adding up all
< normalized direction vectors from the iteration.
< 5. Divide the mean direction vector by the number of vectors added and the
< inverse of its lenght should be a measure of its error.
< 6. Do the same for the displacement vector.
<
< But I'm not sure if this procedure is correct to determin the error of the
< orientation and displacement vector.
I would go about it somewhat differently.
Let's think of the following map f: given two non-parallel affine planes in R^3,
P & Q, the map gives you P intersected with Q = an affine line L in R^3.
You are given noisy data P' and Q' and want to estimate f(P,Q)=L by L'.
The most natural thing to do is to set this up as a constrained least
squares problem. First, an affine line L in R^3 has a unique point p that
is closest to 0, and a unit direction vector v that is unique up +-1,
so L={p+t*v : t in R}. Second, as you note, 3 points uniquely determine
each affine plane and (assuming they are not parallel), an affine line.
Third, these affine lines will not agree, but they can't be averaged
(it's non-sense), so let's write an objective function that makes sense:
G(L;{L_i}) = sum_{i,j} |p_i-p|^2 + d(v_i,v)^2
where d is the smallest of v_i-v and v_i+v and L_i (L) is the i-th
determined by p_i and v_i (p and v).
With your map f, you get an objective function that is a function of
your data, that can be minimised to get L (i.e. p and v).
Finally, can I ask what you are using this for?
Leo
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.