How to apply Gaussian filter on images in MATLAB?

 Réponse acceptée

You can use imgaussfilt function for 2-D gaussian filtering as below:
I = imread('mypic.jpg');
Iblur = imgaussfilt(I, 1);
where the second input of imgaussfilt is standard deviation sigma.

6 commentaires

Hi, Thanks for your reply. But I am getting this error when I am running above commands.
??? Undefined function or method 'imgaussfilt' for input arguments of type 'single'.
How to fix this ?
Wanbin Song
Wanbin Song le 18 Fév 2016
BTW, to use imgaussfilt, Image processing toolbox is required. The error message seems state that image processing toolbox is not installed.
Alternatively, try conv2().
How do you rotate the gaussian filter/kernel for different orientations? for example, for rotating the kernel in 12 different directions from -pi/2 to pi/2? Please help

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by