www.gusucode.com > images 案例代码 matlab源码程序 > images/ConstructGaborFilterArrayAndApplyToInputImageExample.m
%% Construct Gabor Filter Array and Apply to Input Image % %% % Create a sample image of a checkerboard. % Copyright 2015 The MathWorks, Inc. A = checkerboard(20); %% % Create an array of Gabor filters. wavelength = 20; orientation = [0 45 90 135]; g = gabor(wavelength,orientation); %% % Apply the filters to the checkerboard image. outMag = imgaborfilt(A,g); %% % Display the results. outSize = size(outMag); outMag = reshape(outMag,[outSize(1:2),1,outSize(3)]); figure, montage(outMag,'DisplayRange',[]); title('Montage of gabor magnitude output images.');