Code covered by the BSD License  

Highlights from
2D Rotated Gaussian Fit

5.0 | 1 rating Rate this file 51 Downloads (last 30 days) File Size: 1.9 KB File ID: #39448
image thumbnail

2D Rotated Gaussian Fit



Function will fit a 2D gaussian function. It will also find the rotation angle for the 2D gaussian.

| Watch this File

File Information

Matlab's Surface fitting does not (yet) include fairly standard defined surfaces. The present contribution is a simple implementation of the surface fit to the problem of fitting a 2D gaussian to an observed object in an image. Keep the image size small in order not to suffocate the fitting routine.

Gauss2DRotFit requires an input in the form of a 2D intensity image of the 2D gaussian. It also accepts as a second input an structure defining the lower, upper bounds as well as a best guess of the 7 fit parameters. The structure has 3 fields: 'Lower','StartingPoint' and 'Upper'. A title string may be provided as a third input parameter.

Required Products Curve Fitting Toolbox
MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
12 Feb 2015 Jozsef Orbán

A bit more detailed help in the file header would be useful.

Functions not declared (not involved in the file):
prepareSurfaceData( X,Y, im )
fit( [xData, yData], zData, ft, opts )

Could you please help or revise the given code.

Comment only
01 Dec 2013 Lee Albert

what do you mean by 'Lower', 'StartingPoint' and 'Upper'?

Comment only
01 Dec 2013 Lee Albert

I have read the code and find it very good. But now I do have some problem in calling the function.By more details, I do not know the data-style of 'im' in your code and the meaning of 'varargin'. So could you give me a example of calling the function. If it is convenient by email, please inform me. By the way my email is: Thank you!

Contact us