I am trying to filter an image in a spatial domain, so I use the conv2 function.
here is my code.
cd /home/samuelpedro/Desktop/APIProject/ close all clear all clc img = imread('coimbra_aerea.jpg'); %figure, imshow(img); size_img = size(img); gauss = fspecial('gaussian', [size_img(1) size_img(2)], 50); %figure, surf(gauss), shading interp img_double = im2double(img); filter_g = conv2(gauss,img_double);
I got an error:
Undefined function 'conv2' for input arguments of type 'double' and attributes 'full 3d real'. Error in test (line 18) filter_g = conv2(gauss,img_double);
Now I am wondering if I can not use a 3-channel image, i.e. a color image.
SamuelNLP
source share