Skip to content

Instantly share code, notes, and snippets.

@smithdanielle
Last active April 29, 2020 19:47
Show Gist options
  • Save smithdanielle/84f49d396233d9a91eae to your computer and use it in GitHub Desktop.
Save smithdanielle/84f49d396233d9a91eae to your computer and use it in GitHub Desktop.
Create a 1-dimensional gaussian filter and apply it (MATLAB)
function gaussFiltered = gaussFilter1D(m, sigma)
cutoff = ceil(3*sigma);
h = fspecial('gaussian',[1,2*cutoff+1],sigma); % 1D filter
gaussFiltered = conv2(h,h,m,'same');
@xetadeveloper
Copy link

xetadeveloper commented Apr 29, 2020

Hey, sorry but can i use this for a scalar value? I want to apply a filter a value gotten from the processing of orientation estimation in fingerprint as stated in the paper I am using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment