MATLAB 程序运行一直说我未定义函数或变量
附上程序:
img = imread('C:\Users\lenovo\Desktop\test\our saliency model\JuddSaliencyModel\JuddSaliencyModel\sampleimage.jpeg');
[w, h, c] = size(img);
dims = [200, 200];
img = imresize(img, dims);
Nsc = maxPyrHt(dims, [15 15])-1; % Number of scales
edges = 'reflect1';
pyrFilters = 'sp3Filters';
% Find the Steerable Pyramid elements
[pyr, ind] = buildSpyr(double(mean(img,3)), Nsc, pyrFilters, edges);
features = zeros(dims(1)*dims(2), length(ind)-1);
for b=1:length(ind)-1
out = pyrBand(pyr,ind,b);
absOut = abs(out);
% Low pass the band with a gaussian filter
gf = fspecial('gaussian', 6, 2);
absOutBlurred = imfilter(absOut,gf,'replicate');
absOutMean = absOutBlurred/mean(mean(absOutBlurred)); % Divide the band by the mean
absOutMeanResized = imresize(absOutMean, dims); %this reinterpolates the band to be the same size as the image.
% Fill in features
features(:, b) = absOutMeanResized(:);
end
if nargout<1
for b = 1:13
subband = reshape(features(:, b), dims);
subplot(3, 6, b); imagesc(subband); title(strcat('band=', num2str(b))); %colorbar;
end
end
然后显示“未定义函数或变量 'maxPyrHt'。”
额……请问问题是在哪里