
April 7th, 2008, 02:10 PM
|
| Newbie | | Join Date: Jan 2008
Posts: 24
Country: Thanks: 3
Thanked 0 Times in 0 Posts
| |
Quote:
Originally Posted by mathceleb Because you spoke like a gentleman and respect the principles of capitalism, I too will try to provide you a solution at no-cost as well. | Well, I simply know to value the time and effort I could save by having the right person do the right thing. I thank you for your offer, but I will insist on compensating any work put into this after the fact at least.
The problem is...: I have a set of points to which I want to fit ellipses (all five parameters: ellipse center coordinates, axis lengths, tilt angel). Fitting one ellipse to a set of points, is a standard problem with ready-made solutions. But I want to do this in plural. Two, or three, ellipses need to be fitted simultaneously. Each ellipse has its own set of points. The trick is that there is a certain relationship between the ellipses which must be respected. Now I will try to describe this relationship, or "restriction", between the ellipses. All points and all ellipses are in the same plane. But consider each ellipse as the projection of a circle in 3D. These two or three circles are concentric and lie in parallell planes, but on different heights on their common central axis. It is as if any two of the circles are on the surface of a cone, but all three of them are not necessarily on the same cone. The radii of and height distances between the circles are known. Fitting the ellipses one by one and then average things out between them, isn't ideal. The main problem with this is that normally I will only have points from the upper half of one ellipse, and only points from the lower half of another ellipse. This makes rather small "errors" in the points near the end of each ellipse-half, cause quite large distortions in the parameters in the ellipses fitted to each of them. Imagine, the wide half of a horisontally oriented ellipse, is not far off from being the narrow end of a much larger vertically oriented ellipse. Such fitting errors in the individual ellipses don't average out well if the restrictions are imposed afterwards. If I could fit points to both the upper and the lower half of the same ellipse simultaneously, the results would be much more stable. However, this cannot be done. But if the relationship between the ellipses could be respected during the fitting process, then the "multi-ellipse object" would be surrounded by points and this would reduce the fitting errors considerably. Does this make sense? Quote: | Except I will avoid MatLab like the plague, and most likely provide you a user friendly and quick solution on Excel/VBA. | I'd need something which executes fairly swiftly. But if it can be compiled, or if I can understand the solution method well enough to implement it myself in for example Matlab and then compile it, it'd do it for me. And any step on the way is of course helpful. Cheers! |