Code covered by the BSD License  

Highlights from
imgaussian

Be the first to rate this file! 27 Downloads (last 30 days) File Size: 4.28 KB File ID: #25397
image thumbnail

imgaussian

by Dirk-Jan Kroon

 

24 Sep 2009 (Updated 01 Oct 2009)

Fast Gaussian filtering of 1D, 2D greyscale / color image or 3D image volume.

| Watch this File

File Information
Description

IMGAUSSIAN filters an 1D, 2D color/greyscale or 3D image with a Gaussian filter.

Instead of using a multidimensional Gaussian kernel, it uses the fact that a Gaussian kernel can be separated in 1D kernels.

By the default the code uses IMFILTER for the filtering. But also a cache efficient MEX / c-code implementation is included. Compile with: "mex imgaussian.c -v"

J=IMGAUSSIAN(I,SIGMA,SIZE)

Comparison time needed to filter image volume of 512x512x512 with Gaussian kernel of sigma 1:
- 90.8 seconds : Imfilter with 3D gaussian kernel
- 21.8 seconds : Imgaussian using imfilter
- 8.18 seconds : Imgaussian using the MEX file

For small 2D images ( < 1024x1024 ) or large kernels (sigma 10), Imgaussian using imfilter is faster than the MEX file. This is because imfilter uses the "Intel Performance Primitives Library", and the MEX file only normal cache optimized c-code.

MATLAB release MATLAB 7.9 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
01 Oct 2009

Linux Ubuntu Tested

Tag Activity for this File
Tag Applied By Date/Time
imgaussian Dirk-Jan Kroon 24 Sep 2009 09:55:16
gaussian Dirk-Jan Kroon 24 Sep 2009 09:55:16
filtering Dirk-Jan Kroon 24 Sep 2009 09:55:16
imfilter Dirk-Jan Kroon 24 Sep 2009 09:55:16
filter Dirk-Jan Kroon 24 Sep 2009 09:55:16
color Dirk-Jan Kroon 24 Sep 2009 09:55:16
3d Dirk-Jan Kroon 24 Sep 2009 09:55:16
2d Dirk-Jan Kroon 24 Sep 2009 09:55:16
greyscale Dirk-Jan Kroon 24 Sep 2009 09:55:16
image volume Dirk-Jan Kroon 24 Sep 2009 09:55:16
image Dirk-Jan Kroon 24 Sep 2009 09:55:16
image processing Dirk-Jan Kroon 24 Sep 2009 09:55:16
kernel Dirk-Jan Kroon 24 Sep 2009 09:55:16
sigma Dirk-Jan Kroon 24 Sep 2009 09:55:16
color image Dirk-Jan Kroon 24 Sep 2009 09:55:16
filter shalini 02 Oct 2009 13:00:33
filtering shalini 02 Oct 2009 13:00:42
2d Joan Garcia 13 Oct 2009 01:18:31

Contact us at files@mathworks.com