# getGaborMaps

## PURPOSE

getGaborMaps - Compute S1 maps from images whose paths are specified in <imagePaths>.

## SYNOPSIS

function allfiltered = getGaborMaps(imagePaths,templateSize,allfilter)

## DESCRIPTION

     getGaborMaps - Compute S1 maps from images whose paths are specified in <imagePaths>.

## CROSS-REFERENCE INFORMATION

This function calls:

- applyfilterfftsameLocalNorm applyfilterfftsameLocalNorm - Filter image by a bank of filters with local normalization.

This function is called by:

- ABlearn ABlearn - Learns an active basis template from images.
- adaboostLearn LearnAdaboostTemplate - Learns an adaboost "template", i.e. strong classifier.

## SOURCE CODE

    0001 function allfiltered = getGaborMaps(imagePaths,templateSize,allfilter)
    0002 % getGaborMaps - Compute S1 maps from images whose paths are specified in <imagePaths>.
    0003 %
    0004
    0005 nimage = length(imagePaths); % number of example images
    0006 I = cell(1,nimage);
    0007 for i = 1 : nimage
    0008     tmpIm = imread(imagePaths{i});
    0009     if size(tmpIm,3) == 3
    0010         tmpIm = rgb2gray(tmpIm);
    0011     end
    0012     tmpIm = double(tmpIm);
    0013     I{i} = imresize(tmpIm,templateSize,'nearest'); % images are all resized to templateSize
    0014 end
    0015
    0016 allfiltered = applyfilterfftsameLocalNorm(I, allfilter); % Gabor filtering
    0017