Code covered by the BSD License  

Highlights from
Sub-Sample Peak Fitting 2D

5.0

5.0 | 2 ratings Rate this file 11 Downloads (last 30 days) File Size: 2.07 KB File ID: #26504
image thumbnail

Sub-Sample Peak Fitting 2D

by Eric

 

28 Jan 2010

Find sub-sample location of global maximum in a 2-dimensional numerical matrix.

| Watch this File

File Information
Description

This small contribution is useful in cases where you search for the position of a peak within an intensity matrix (correlation or energy fields) of low resolution. Since this is only a 2nd-order-fit the sub-sample accuracy will only be acceptable as long as the peak area is 'smooth' around the peak location. This is not an exact solution, since it does not consider any underlying signal characteristics.

Sample usage: % 2d-gauss: center=19.5; sigma=5

>> M = exp(-((1:30) - 19.5).^2/(2*5^2));
>> P = peakfit2d(M'*M);
>> disp(P);
   19.5050 19.5050

MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
09 Sep 2010 Mauro

thx a lot :-) i use it for track movements on a avi-video

05 Jun 2011 Ketan

Works fine, I am also using it in a tracking application.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
approximation Eric 28 Jan 2010 11:53:11
fit Eric 28 Jan 2010 11:53:11
peak Eric 28 Jan 2010 11:53:11
interpolation Eric 28 Jan 2010 11:53:11

Contact us at files@mathworks.com