# applyfilterMultiScale

## PURPOSE

applyfilterMultiScale - Filter image by a bank of multiscale filters, with local normalization.

## SYNOPSIS

function allfiltered = applyfilterMultiScale(I, allfilter, nGaborOri)

## DESCRIPTION

     applyfilterMultiScale - Filter image by a bank of multiscale filters, with local normalization.

     I: input images
     allfilter: filter bank

## CROSS-REFERENCE INFORMATION

This function calls:

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

This function is called by:

- DisplayS3ScoreHistogram DisplayS3ScoreHistogram - Compare the distribution of S3 scores on natural images, vs.
- FindEgret FindEgret - A simple test case of detection using shape script.
- FindPelican FindPelican - A simple test case of detection using shape script.
- LearnS2Template LearnS2Template - Learns an active basis template for Ellipsoid, angle,
- dumpNeg dumpNeg - Precompute Gabor response maps on background/negative images.

## SOURCE CODE

    0001 function allfiltered = applyfilterMultiScale(I, allfilter, nGaborOri)
    0002 % applyfilterMultiScale - Filter image by a bank of multiscale filters, with local normalization.
    0003 %
    0004 % I: input images
    0005 % allfilter: filter bank
    0006 %
    0007
    0008 localRadius = 1; % local normalization: Gabor response divided by local mean, pooled from a local neighborhood with radius proportional to filter size
    0009 numFilter = length(allfilter);  % total number of filters
    0010 nGaborScale = numFilter / nGaborOri;
    0011
    0012 allfiltered = cell(numFilter,1);
    0013 for iScale = 1:nGaborScale % perform feature convolution per scale
    0014     allfiltered((iScale-1)*nGaborOri+(1:nGaborOri)) = ...
    0015         applyfilterfftsameLocalNorm(I, allfilter((iScale-1)*nGaborOri+(1:nGaborOri)), localRadius);
    0016 end
    0017
    0018
    0019