Filter Banks

A filter bank is a set of linear filters applied to the same image . Each pixel then carries a vector of responses , where is cross-correlation (2.1.1. Linear Filters). The result has numbers per pixel, more numbers than the image has pixels, which makes it an overcomplete representation. The numbers are redundant, and each channel reports one kind of local structure. Filter banks for texture copy the receptive fields of the early visual system.

The receptive field of a neuron is the region of the visual field where light changes the neuron’s firing rate. Retinal ganglion cells have center-surround receptive fields. An on-center cell fires more for light on a small central disk and less for light on the ring around it, and an off-center cell does the reverse. The receptive field is modeled as a Difference of Gaussians, a narrow Gaussian minus a wide one:

Here set the sizes of the center and the surround. Both Gaussians integrate to 1, so the DoG sums to zero and gives no response to uniform light. Its negative models an off-center cell.

Simple cells in the primary visual cortex (V1), found by Hubel and Wiesel, respond to a line or an edge at one orientation. A line detector has a central stripe of one sign between two flanks of the other sign. An edge detector has one positive half and one negative half. Both are modeled by elongated derivatives of a Gaussian. With the 1D Gaussian , the first-derivative and second-derivative filters are

where is odd (an edge detector) and is even (a line detector). Choosing stretches the filters along . A rotated copy evaluates the same function at with and . A bank uses several orientations and several scales . Gabor filters (a Gaussian window times a sinusoid) can replace the Gaussian derivatives.

The LM filter bank (Leung and Malik) has 48 filters. It holds first and second Gaussian derivatives at 6 orientations and 3 scales (36 filters), 8 Laplacian-of-Gaussian filters (round, center-surround) and 4 Gaussians.

Two Meanings of "DoG"

In this note and in SIFT, DoG means difference of Gaussians, a round center-surround filter. In 2.1.2. Edge Detection and Project 2, DoG means derivative of Gaussian, an oriented edge filter like here. The first is even and has no preferred direction. The second is odd and has one. Check which filter a question means before answering.

Intuition

Filter banks answer a question left open by Julesz’s texton theory, namely which local features early vision measures in a real photograph. The answer comes from single-cell recordings, which show what each neuron in the visual pathway responds to. Retinal ganglion cells respond to a spot of light on a small disk and respond less when light also falls on the ring around it. Simple cells in V1 respond to bars and edges at one orientation. Each response is a weighted sum of the light over the receptive field, with positive and negative weights. A weighted sum over a window is a linear filter, so each cell type becomes a kernel. The first figure shows the center-surround kernel as a narrow Gaussian minus a wide one.

\usepackage{tikz}
\begin{document}
\definecolor{hot}{HTML}{D9483B}
\definecolor{cold}{HTML}{2F80ED}
\begin{tikzpicture}[x=0.75cm,y=7cm,>=latex]
\draw[->] (-6.3,0) -- (6.5,0) node[right] {$x$};
\draw[->] (0,-0.25) -- (0,0.47);
\draw[thick,hot,domain=-6:6,samples=120] plot (\x,{exp(-\x*\x/2)/sqrt(2*pi)});
\draw[thick,cold,dashed,domain=-6:6,samples=120] plot (\x,{-exp(-\x*\x/8)/(2*sqrt(2*pi))});
\draw[very thick,black,domain=-6:6,samples=160] plot (\x,{exp(-\x*\x/2)/sqrt(2*pi)-exp(-\x*\x/8)/(2*sqrt(2*pi))});
\node[hot,right] at (0.9,0.36) {$G_{\sigma_1}$, narrow center};
\node[cold,right] at (2.2,-0.19) {$-G_{\sigma_2}$, wide surround};
\node[right] at (1.6,0.16) {$G_{\sigma_1} - G_{\sigma_2}$};
\node at (0,-0.31) {\small $\sigma_1 = 1$, $\sigma_2 = 2$ (1D slices)};
\end{tikzpicture}
\end{document}

A V1 simple cell can be built from ganglion-type cells. Line up several center-surround cells along a line and add their outputs. The sum responds best to a bright bar along that line. In the cortex, cells tuned to all orientations at one location sit together in a block called a hypercolumn. A filter bank is the computational copy of a hypercolumn. At every pixel it applies oriented filters at several orientations and scales, plus a few round filters. The second figure shows the two oriented filter types for three directions of differentiation . Red marks positive weights and blue marks negative weights.

\usepackage{tikz}
\begin{document}
\definecolor{hot}{HTML}{D9483B}
\definecolor{cold}{HTML}{2F80ED}
\begin{tikzpicture}
\foreach \a [count=\i from 0] in {0,45,90} {
  \begin{scope}[xshift=2.6*\i cm]
    \fill[gray!15] (-1.05,-1.05) rectangle (1.05,1.05);
    \begin{scope}[rotate=\a]
      \fill[hot!75] (-0.33,0) ellipse (0.3 and 0.85);
      \fill[cold!75] (0.33,0) ellipse (0.3 and 0.85);
    \end{scope}
    \node at ({-0.33*cos(\a)},{-0.33*sin(\a)}) {$+$};
    \node at ({0.33*cos(\a)},{0.33*sin(\a)}) {$-$};
    \node at (0,1.35) {$\alpha = \a^\circ$};
  \end{scope}
  \begin{scope}[xshift=2.6*\i cm,yshift=-2.5cm]
    \fill[gray!15] (-1.05,-1.05) rectangle (1.05,1.05);
    \begin{scope}[rotate=\a]
      \fill[hot!45] (-0.58,0) ellipse (0.2 and 0.75);
      \fill[hot!45] (0.58,0) ellipse (0.2 and 0.75);
      \fill[cold!75] (0,0) ellipse (0.28 and 0.9);
    \end{scope}
    \node at (0,0) {$-$};
    \node at ({-0.58*cos(\a)},{-0.58*sin(\a)}) {$+$};
    \node at ({0.58*cos(\a)},{0.58*sin(\a)}) {$+$};
  \end{scope}
}
\node[left] at (-1.25,0) {$f_1$ (edge)};
\node[left] at (-1.25,-2.5) {$f_2$ (line)};
\node at (2.6,-4.0) {\small $\alpha$ = direction in which the filter differentiates};
\end{tikzpicture}
\end{document}

Properties

(Band-Pass Behavior) A DoG keeps structure between two sizes and removes both uniform regions and fine detail.

Filtering with removes detail much finer than . Subtracting the -blurred image removes structure much coarser than . Along any direction, the frequency response of a normalized Gaussian is , where is angular frequency. The DoG’s frequency response is therefore . It is zero at , positive in between, and near zero at high frequency. One level of a Laplacian pyramid stores the same kind of band, the difference between a pyramid level and a blurrier copy of it. When is close to , the DoG is approximately proportional to the negative of the Laplacian of Gaussian. SIFT uses this approximation to find blobs.

(Building Simple Cells) Summing center-surround cells whose centers lie on a line gives an elongated line detector.

In the construction proposed by Hubel and Wiesel, retinal cells feed center-surround cells in the LGN (lateral geniculate nucleus, a relay between eye and cortex). Several LGN cells whose centers lie on a line feed one V1 simple cell. The sum of on-center DoGs along a line has a positive central stripe and negative flanks, which is a light-line detector. In filter terms, the simple cell is a DoG convolved with a line of impulses, which is still a linear filter. The elongation makes the cell orientation selective. A bar at the preferred orientation drives strong firing, and the same bar rotated away from it drives little or none.

(Odd and Even Pairs) The odd filter peaks at edges and the even filter peaks at lines, and the extremes of sit at the zeros of .

An odd filter () gives zero at the center of a symmetric bright line and opposite-signed peaks on its two sides. An even filter gives one strong peak at a line and a zero crossing at a step edge. The extremes of lie at , which are the zeros of . Since for , the filter is positive on its left half. Under cross-correlation it responds positively to light-to-dark edges and negatively to dark-to-light edges of the same strength. Texture descriptors therefore use absolute responses (9.3. Texture Histograms). The center of is negative, so is a dark-line detector and is a light-line detector.

(Orientations and Scales) Elongated filters are sharply tuned to orientation, so a bank needs several orientations, and texture elements come in several sizes, so it needs several scales.

With elongation , the response to an edge away from the filter’s preferred orientation drops to half (Hard example). The LM bank spaces its 6 orientations apart. Six orientations cover all directions, because a filter rotated by equals the original up to sign. Its derivative filters use elongation () at 3 scales. On a photo of a domed building with columns, filters elongated vertically respond on the columns, and filters elongated horizontally respond on the ledges of the dome. The large-scale filters respond only to coarse structure. The rotation formula evaluates at rotated coordinates, so the pattern itself turns by , as in inverse warping. A bank with equally spaced angles over contains the same filters either way.

(Gabor Alternative) A Gabor filter is a Gaussian window times a sinusoid, and its cosine and sine versions behave like the even and odd derivative filters.

In rotated coordinates , a Gabor filter is . Here is the wavelength of the stripes, is the phase, and sets how elongated the window is. With the filter is even and detects lines. With it is odd and detects edges. A Gaussian derivative has a fixed number of lobes. A Gabor filter can have more stripes when is small compared with . Its Fourier transform is concentrated near one spatial frequency and one orientation, so a Gabor bank tiles frequency and orientation in a controlled way.

(Learned Filters Look the Same) The first layer of a convolutional network trained on ImageNet learns oriented edge filters and blob filters similar to a hand-designed bank.

Visualizations of a network trained on ImageNet (Zeiler & Fergus) show first-layer filters that are oriented edges at many angles and scales, plus color blobs. Training on labeled images found the same kind of bank that neuroscience suggested. Higher layers combine these responses into larger patterns, which play the role of learned textons (5.2.4. CNNs).

Examples

(Easy) Edge and Line Responses

One scanline crosses a thin white cable against a dark sky, with samples . Another crosses the edge of a white page on a dark desk, with samples . Two 3-tap kernels stand in for the oriented filters: the light-line detector and the dark-to-light edge detector . Cross-correlation gives .

(Medium) The Spot-Size Experiment

An on-center ganglion cell is modeled by the 2D DoG with and (in units of visual angle). A centered disk of light of radius is shown, and the cell’s response is the integral of the DoG over the disk.

(Hard) Orientation Tuning of an Elongated Filter

A vertical step edge has for and otherwise. The rotated edge filter , with and , is cross-correlated with it at the origin.

See Also