gaborFilterMap - compute a gabor-filtered version of a map. result = gaborFilterMap(map,gaborParams,angle) Convolves the map data with a gabor filter with gaborParams at orientation angle. gaborParams is a struct with the following fields: filterPeriod - the period of the filter in pixels elongation - the ratio of length versus width filterSize - the size of the filter in pixels stddev - the standard deviation of the Gaussian in pixels See also makeGaborFilter, makeOrientationPyramid, defaultSaliencyParams.
0001 % gaborFilterMap - compute a gabor-filtered version of a map. 0002 % 0003 % result = gaborFilterMap(map,gaborParams,angle) 0004 % Convolves the map data with a gabor filter with 0005 % gaborParams at orientation angle. 0006 % 0007 % gaborParams is a struct with the following fields: 0008 % filterPeriod - the period of the filter in pixels 0009 % elongation - the ratio of length versus width 0010 % filterSize - the size of the filter in pixels 0011 % stddev - the standard deviation of the Gaussian in pixels 0012 % 0013 % See also makeGaborFilter, makeOrientationPyramid, defaultSaliencyParams. 0014 0015 % This file is part of the SaliencyToolbox - Copyright (C) 2006-2008 0016 % by Dirk B. Walther and the California Institute of Technology. 0017 % See the enclosed LICENSE.TXT document for the license agreement. 0018 % More information about this project is available at: 0019 % http://www.saliencytoolbox.net 0020 0021 function resultMap = gaborFilterMap(map,gaborParams,angle) 0022 0023 % create the filters 0024 gf = makeGaborFilter(gaborParams, angle); 0025 0026 % convolve the map with the filters 0027 for p = 1:length(gaborParams.phases) 0028 fres(:,:,p) = mexConv2PreserveEnergy(map.data,gf(:,:,p)); 0029 end 0030 0031 resultMap.origImage = map.origImage; 0032 resultMap.label = sprintf('Gabor%3.1f',angle); 0033 resultMap.data = sum(abs(fres),3); 0034 resultMap.date = timeString; 0035 resultMap.parameters.gaborParams = gaborParams;