I am trying to extract gabor feature from an image using the gabor and imgaborfilt functions from image processing toolbox in matlab using the following code. But it keep giving me the error
Undefined function 'gabor' for input arguments of type
double
This code is from http://au.mathworks.com/help/images/texture-segmentation-using-gabor-filters.html just the image is changed.
A=imread('101.jpg');
A = imresize(A,0.25);
Agray = rgb2gray(A);
imageSize = size(A);
numRows = imageSize(1);
numCols = imageSize(2);
wavelengthMin = 4/sqrt(2);
wavelengthMax = hypot(numRows,numCols);
n = floor(log2(wavelengthMax/wavelengthMin));
wavelength = 2.^(0:(n-2)) * wavelengthMin;
deltaTheta = 45;
orientation = 0:deltaTheta:(180-deltaTheta);
g = gabor(wavelength,orientation);
gabormag = imgaborfilt(Agray,g);