File Exchange

image thumbnail

2D Rotated Gaussian Fit

version 1.0 (1.9 KB) by

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

8 Downloads

Updated

View License

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.

Comments and Ratings (3)

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.

Lee Albert

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

Lee Albert

Hi,Petersen
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: 2110190101@email.szu.edu.cn. Thank you!

MATLAB Release
MATLAB 7.13 (R2011b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video