I'm trying to blur a grayscale image using Gaussian low pass filter( 5*5 kernal).I tried the following code.
I = imread('Lena.png');
G = fspecial('gaussian',[5 5],2);
Ig = imfilter(I,G,'same');
imshow(Ig);
But I'm getting an error in file 'meshgrid.m' as follows.
Error: File: meshgrid.m Line: 1 Column: 5
The input character is not valid in MATLAB statements or expressions.
Error in fspecial (line 145)
[x,y] = meshgrid(-siz(2):siz(2),-siz(1):siz(1));
Error in Untitled2 (line 2)
G = fspecial('gaussian',[5 5],2);
I'm not understanding what the error is.Can anyone help me please.The input image that I used is uploaded below('Lena.png').Thanks in advance