How to apply Gaussian filter on images in MATLAB?

 Respuesta aceptada

Wanbin Song
Wanbin Song el 17 de Feb. de 2016
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 comentarios

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 el 18 de Feb. de 2016
BTW, to use imgaussfilt, Image processing toolbox is required. The error message seems state that image processing toolbox is not installed.
Image Analyst
Image Analyst el 18 de Feb. de 2016
Alternatively, try conv2().
anastasia
anastasia el 3 de Mzo. de 2017
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
Image Analyst
Image Analyst el 4 de Mzo. de 2017
You can use the rotation matrix https://en.wikipedia.org/wiki/Rotation_matrix

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 17 de Feb. de 2016

Comentada:

el 29 de Ag. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by