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 11:07:01 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 40
Message-ID: <gdkd4l$5on$1@fred.mathworks.com>
References: <gdfuiq$det$1@fred.mathworks.com> <gdkaed$bhd$1@fred.mathworks.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1224587221 5911 172.30.248.37 (21 Oct 2008 11:07:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 21 Oct 2008 11:07:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:496493


"Conrad Andrew" <conrad7@gmx.net> wrote in message <gdkaed$bhd$1@fred.mathworks.com>...
> "Conrad Andrew" <conrad7@gmx.net> wrote in message <gdfuiq$det$1@fred.mathworks.com>...
> > Hi,
> > 
> > Is it possible to obtain a best-fit ellipse given a few known points:
> >  . One of the vertices
> >  . several points (up to 5) located on one of the quadrants which is adjacent to the known vertex point
> > 
> > I tried using the FitEllipse function but it doesn't appear to work well with the data that I have. Is there another function that works similarly to FitEllipse using the points that I have?
> > 
> > Thanks
> 
> If it's not possible to solve this problem the way it is, could someone please let me know?

Yes, it is possible to "fit an ellipse" to data.

It is also true that you have not provided
enough information about your definition of
what fitting an ellipse means to you. Do you
mean a fit with errors allowed in both x and y?
Will your ellipse be allowed to tilt? What was
inadequate about the fit with the code that
you tried? Does that data have a better fitting
ellipse known to you? Some people want to
achieve a degree of fit to some data that is
wildly better than the data merits. There are
many things we may want in this world that
cannot be achieved.

Finally, you say that you have UP to 5 points
to fit an ellipse. However, a fully general
ellipse will require AT LEAST 5 points. Any
less than that number and the fit will not
even be unique. More than 5 points and the
fit will not in general be exact, however there
will generally be an optimal choice for the
parameters, regardless of whether the
chosen fitting scheme succeeds in the task.

John