I think I have a working numerical solution for the 3D geometry problem I posted above. But if someone sees an algebraic solution, it'd help.
Would this be an apropriate "flow chart" for the multi-ellipse fitting problem: 1) Guess the (five) parameters of one ellipse.
I have a way to make a pretty good initial guess. The horisontal distance between the points most to the right and most to the left, will be close to the long axis length, and the short axis will normally be about half as long. The tilt will normaly be modest. 2) Calculate the parameters of the other ellipses.
Given one ellipse, the parameters of all the other ellipses can be calculated. This is where the 3D-stuff with circles comes in. In 3D the relationship between the circles is easy. But the same relationships formulated it in terms of ellipse parameters in the 2D plane, i more complicated. However, this I am almost finished with, using a numerical method. 3) Calculate the degree of fit of the ellipses to the observed points belonging to each of them.
This is done using the method of least squares or something like that. 4) Calculate a new guess for the five parameters of one of the ellipses.
This is what is tricky to me, but probably straight forward for the experienced math user. Unless we can find a nice algebraic solution to the 3D-problem above, there will be no way get the derivatives required by Newton-Raphson or Levenberg-Marquardt. But the secant method should work fine. However, I'm a bit confused about changing all 5 ellipse parameters simultanously. I use the secant method for the 3D-problem above, but it only involves one single variable to change, the location of V on its big circle. 5) Go to step 2. |