Rank: 397 based on 166 downloads (last 30 days) and 3 files submitted
photo

Richard Brown

E-mail
Company/University
University of Canterbury
Lat/Long
-43.5, 172.600006103516

Personal Profile:

I'm working as a postdoc in the Department of Mathematics and Statistics at the University of Canterbury, New Zealand, doing mathematical modeling for problems in ecology, particularly modelling the spread of invasive weeds.

My PhD was a little different - developing a 3D motion acquisition system for the DIET breast cancer imaging system, being developed at the same university in the Mechanical Engineering Department.

Professional Interests:
applied mathematics - computer vision, modelling, geometry

 

Watch this Author's files

 

Files Posted by Richard View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
07 Sep 2007 Published MATLAB Files nearestneighbour.m Computes nearest neighbour(s) by Euclidean distance Author: Richard Brown nearest, neighbor, neighbour, closest, delaunay, dsearch 81 5
  • 5.0
5.0 | 3 ratings
29 May 2007 Published MATLAB Files fitellipse.m Fit ellipses to 2D points using linear or nonlinear least squares Author: Richard Brown approximation, interpolation, least squares, ellipse, fit, conic 50 13
  • 4.6
4.6 | 5 ratings
21 May 2007 Published MATLAB Files fitcircle.m Fits circles to 2D data using nonlinear least squares to minimise geometric error Author: Richard Brown fitcircle, least squares, approximation, interpolation, circle, gauss newton 35 6
  • 4.66667
4.7 | 3 ratings
Comments and Ratings by Richard View all
Updated File Comments Rating
25 Jan 2012 fitellipse.m Fit ellipses to 2D points using linear or nonlinear least squares Author: Richard Brown

@Pierre: Thanks, good catch! I'll put a new one up shortly that checks explicitly for an axes handle.

@Valeria: The order of the axes is not specified - there is no guarantee that the first will be the major axis. If you want to enforce this it's a trivial modification.

18 Sep 2011 fitcircle.m Fits circles to 2D data using nonlinear least squares to minimise geometric error Author: Richard Brown

Hi Brian

This code computes a least squares fit, which is not robust to large outliers - the results you got are not unexpected, nor are they wrong.

Because the objective being minimised is a function of the square of the distance, big outliers will skew the fit. If your data is known to have significant outliers, least squares is not a good choice of objective to minimise.

cheers,

Richard

14 Mar 2011 fitellipse.m Fit ellipses to 2D points using linear or nonlinear least squares Author: Richard Brown

@nancy:
1. Not entirely sure what you mean, but if you've used edge to find the edges of your ellipse, then you can use find on the resulting black and white image to get the coordinates of the edge pixels. 2. You can fit an ellipse to all of the edge pixels if you like, you don't need to choose a subset.

@Felipe: No they're not obvious. I'll get back to you with a better answer a bit later - I'm from Christchurch New Zealand, and my university has its hands full getting our teaching back underway after the earthquake a few weeks ago.

21 Apr 2010 fitellipse.m Fit ellipses to 2D points using linear or nonlinear least squares Author: Richard Brown

Hi Jenn

I'll investigate this ... I'm not sure if I have access to a copy of 2007a, but I'll see if I can find one. It definitely works on newer versions!

regards,

Richard

05 Jan 2009 matlab piano piano simulation using known note frequencies. Author: sheperd velasco

Your submission doesn't work - you need to supply Keyboard.fig as well as the m-file

Comments and Ratings on Richard's Files View all
Updated File Comment by Comments Rating
25 Jan 2012 fitellipse.m Fit ellipses to 2D points using linear or nonlinear least squares Author: Richard Brown Brown, Richard

@Pierre: Thanks, good catch! I'll put a new one up shortly that checks explicitly for an axes handle.

@Valeria: The order of the axes is not specified - there is no guarantee that the first will be the major axis. If you want to enforce this it's a trivial modification.

20 Jan 2012 fitellipse.m Fit ellipses to 2D points using linear or nonlinear least squares Author: Richard Brown Rodríguez, Valeria

Hi. It seems the code sometimes switch the major and minor axes. This is problematic for plotting. Besides this, the code is very useful.

Greetings.

19 Jan 2012 fitellipse.m Fit ellipses to 2D points using linear or nonlinear least squares Author: Richard Brown Roduit, Pierre

First, thank you for this code.
Just a comment on this part of this code.

if ishandle(varargin{1})
    hAx = varargin{1};
    varargin(1) = [];
else
    hAx = gca();
end

If a figure 1 is open and you try to draw an ellipse with a center at [1,1], it will take take these coordinates as a reference. Not an obvious error...

18 Sep 2011 fitcircle.m Fits circles to 2D data using nonlinear least squares to minimise geometric error Author: Richard Brown Brown, Richard

Hi Brian

This code computes a least squares fit, which is not robust to large outliers - the results you got are not unexpected, nor are they wrong.

Because the objective being minimised is a function of the square of the distance, big outliers will skew the fit. If your data is known to have significant outliers, least squares is not a good choice of objective to minimise.

cheers,

Richard

30 Aug 2011 fitcircle.m Fits circles to 2D data using nonlinear least squares to minimise geometric error Author: Richard Brown Wheeler, Brian

To test thus function I fed it data for a 360 point unit circle. As expected it returned a unit circle centered on zero.

Distorting one point of the circle to a radius of 6 gave expected results:
radius 1.01408739256055
center [ 3.76743045176789e-17 0.0281775669475842]

Distorting the same point of the circle to a radius of 7 gave UNEXPECTED results:
radius 3.258619140676808
center [1.25049755875451e-15 3.17478833187820]

Thoughts anyone?

Top Tags Applied by Richard
approximation, interpolation, least squares, circle, closest
Files Tagged by Richard View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
07 Sep 2007 Published MATLAB Files nearestneighbour.m Computes nearest neighbour(s) by Euclidean distance Author: Richard Brown nearest, neighbor, neighbour, closest, delaunay, dsearch 81 5
  • 5.0
5.0 | 3 ratings
29 May 2007 Published MATLAB Files fitellipse.m Fit ellipses to 2D points using linear or nonlinear least squares Author: Richard Brown approximation, interpolation, least squares, ellipse, fit, conic 50 13
  • 4.6
4.6 | 5 ratings
21 May 2007 Published MATLAB Files fitcircle.m Fits circles to 2D data using nonlinear least squares to minimise geometric error Author: Richard Brown fitcircle, least squares, approximation, interpolation, circle, gauss newton 35 6
  • 4.66667
4.7 | 3 ratings

Contact us at files@mathworks.com