Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Best fit ellipse given vertice and a few points
Date: Tue, 21 Oct 2008 12:45:04 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 29
Message-ID: <gdkisg$4qg$1@fred.mathworks.com>
References: <gdfuiq$det$1@fred.mathworks.com> <gdkaed$bhd$1@fred.mathworks.com> <gdkd4l$5on$1@fred.mathworks.com> <gdkfhh$s5q$1@fred.mathworks.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1224593104 4944 172.30.248.35 (21 Oct 2008 12:45:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 21 Oct 2008 12:45:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:496513


"Conrad Andrew" <conrad7@gmx.net> wrote in message <gdkfhh$s5q$1@fred.mathworks.com>...

> Thanks for your reply John. To answer your questions, I want to fit the data with errors allowed for both x and y. The ellipse may be tilted if the data dictates it. The problem that I have is that Fitelllipse assumes (I think so anyway) that the data provided is spread around the ellipse to be approximated while what I have (5 points) belongs to only one of the quadrants. One additional point provided belongs to the vertex of the ellipse, adjacent to the 5 points provided. What I want is a best fit of an ellipse based on this data if it's possible.
> 

Fits to a curve with errors in both x and y
are quite difficult in general. The problem
is, given a point in the (x,y) plane, and a
general ellipse defined by a set of parameters,
what is the distance to that ellipse from the
point?

The fact that your data lies all in one quadrant
is a problem because the fitting scheme will
be a nonlinear one. So if I had to come up
with starting values for the ellipse parameters,
I would use either eig or svd to estimate the
ellipse orientation and size. But that would
indeed presume a set of points that were
scattered around the perimeter of the ellipse.

If you have additional information about a
vertex of the ellipse (do you mean that point
where the ellipse is most highly curved when
you say vertex?) I'm not sure that this provides
you with anything useful beyond the fact that
the ellipse passes through that point.

John