I = imread('13.jpg');
Ir = I(:,:,1);
Ig = I(:,:,2);
Ib = I(:,:,3);
%# Create the gaussian filter with hsize = [5 5] and sigma = 2
G = fspecial('gaussian',[10 10],1);
%# Filter it
Ig = imfilter(I,G,'same');
%# Display
imshow(Ig);
PSF = fspecial('gaussian',7,10);
Irc = conv2(Ir,PSF,'same');
Igc = conv2(Ig,PSF,'same');
Ibc = conv2(Ib,PSF,'same');
Why am I getting this error?
Warning: CONV2 on values of class UINT8 is obsolete.
Use CONV2(DOUBLE(A),DOUBLE(B)) or
CONV2(SINGLE(A),SINGLE(B)) instead.
In uint8.conv2 at 11
In Gaussian_Filter_image at 19
Warning: CONV2 on values of class UINT8 is obsolete.
Use CONV2(DOUBLE(A),DOUBLE(B)) or
CONV2(SINGLE(A),SINGLE(B)) instead.
In uint8.conv2 at 11 In Gaussian_Filter_image at 20 Undefined function 'conv2' for input arguments of type 'double' and attributes 'full 3d real'.
Error in uint8/conv2 (line 18)
y = conv2(varargin{:});
Error in Gaussian_Filter_image (line 20)
Igc = conv2(Ig,PSF,'same');
Here I want to perform convolution of image and gaussian filter but I am unable to do that ?
I have even tried the modification after using
Ir = double(:,:,1);
Ig = double(:,:,2);
Ib = double(:,:,3);
then also I am getting the same error?
Ir = double(I(:,:,1)); ...
, notIr = double(:,:,1); ...
$\endgroup$