---
title: Gabor Surface Feature (GSF) for Face Recognition
url: https://www.emergentmind.com/topics/gabor-surface-feature-gsf
type: topic
---

# Gabor Surface Feature (GSF) for Face Recognition

Gabor Surface Feature (GSF) is a face representation methodology that utilizes the full local surface geometry of Gabor magnitude pictures (GMPs). GSF distinguishes itself by encoding not only the magnitude information, but also the pixel-wise slope and curvature, thereby enabling richer, multi-scale, and multi-orientation characterization of facial structure critical for recognition tasks. The framework modularly applies Gabor filtering, computes local derivatives, binarizes these features, and then encodes them into compact codes, which are aggregated spatially for subspace-based classification.

## 1. Foundation: Gabor Magnitude Pictures

Gabor filters are defined for extraction across scales and orientations:
\[
g_{\mu, \nu}(x, y) = \frac{\|k_{\mu, \nu}\|^2}{\sigma^2}
\exp\left(-\frac{\|k_{\mu, \nu}\|^2(x^2 + y^2)}{2\sigma^2}\right)
\left[e^{j k_{\mu, \nu}^T (x, y)} - e^{-\sigma^2/2}\right]
\]
with $\mu \in \{0, \ldots, S-1\}$ indexing scale and $\nu \in \{0, \ldots, O-1\}$ indexing orientation. The characteristic frequency vector $k_{\mu, \nu}$ is given by
\[
k_{\mu, \nu} = \frac{k_{\text{max}}}{f^\mu}
\begin{pmatrix}
\cos(\nu\pi/O) \\ \sin(\nu\pi/O)
\end{pmatrix}
\]
where $\sigma$ controls the Gaussian envelope and $f > 1$ is the scale factor. The convolution of the preprocessed face image $I(x, y)$ with $g_{\mu,\nu}$ results in complex responses, and GMPs are extracted as $|G_{\mu, \nu}(x, y)|$. Standard settings utilize $O=8$ orientations and $S=5$ scales, producing 40 GMPs per image [1409.2413].

## 2. Derivative Extraction: Local Slope and Curvature

GSF treats each GMP as a smooth surface $G(x, y)$ and computes discrete first-order derivatives (slope) using symmetric difference filters:
\[
G_x(i, j) = G(i, j+1) - G(i, j-1), \quad
G_y(i, j) = G(i+1, j) - G(i-1, j)
\]
Second-order derivatives (curvature/convexity) are subsequently calculated:
\[
G_{xx}(i, j) = G_x(i, j+1) - G_x(i, j-1), \quad
G_{yy}(i, j) = G_y(i, j+1) - G_y(i, j-1)
\]
\[
G_{xy}(i, j) = G_x(i+1, j) - G_x(i-1, j)
\]
This methodology captures both local spatial gradient and shape convexity—information not leveraged by prior methods limited to gradient encoding.

## 3. Binarization and Feature Encoding

A median-based binarization scheme is independently applied to magnitudes, first, and second derivatives for each GMP:
\[
T_G = \text{median}\{G(i, j)\}, \quad
T_{G_x} = \text{median}\{G_x(i, j)\}, \ldots
\]
Binary maps are formed such that
\[
B(i, j) = 1 \text{ if } G(i, j) \geq T_G, \text{ else } 0
\]
For convexity, the sum $C(i,j) = G_{xx}(i,j) + G_{yy}(i,j)$ is binarized in the same fashion:
\[
B_2(i, j) = 1 \text{ if } C(i, j) \geq \text{median}\{C\}, \text{ else } 0
\]
This step ensures uniformity and robustness to intensity variation—a documented strength of the approach.

Each pixel’s binary triplet (or quadruplet, depending on variant) is translated to an integer code by logical weighting. Notable variants:
- **GSF1** (magnitude + 1st + 2nd derivatives): $F(i,j) = 2^3 B(i,j) + 2^2 B_x(i,j) + 2^1 B_y(i,j) + 2^0 B_2(i,j)$ (16 codes).
- **GSF2** (only 1st + 2nd derivatives): $F(i,j) = 2^3 B_2(i,j) + 2^2 B_y(i,j) + 2^1 B_x(i,j) + 2^0 B_{yy}(i,j)$ (16 codes).
- **Three-bit version**: $F_3(i,j) = 2^2 B(i,j) + 2^1 B_x(i,j) + 2^0 B_y(i,j)$ (8 codes).

## 4. Regional Joint Histogram Aggregation

All 40 code maps per face are segmented into $M \times N$ non-overlapping grid regions, and each is further split into $S$ sub-regions. For each region $j$ and each sub-region $s$, histograms $H_{j,s}$ over the code values ($0$ to $L-1$, $L=16$) are constructed. The collection for region $j$ becomes a vector $X_j$ of length $40 \times S \times L$. The composite feature for the image is the concatenated set $\{X_1,\ldots,X_{MN}\}$.

| Variant | Bit composition | Number of codes |
|---------|----------------|-----------------|
| GSF1    | Magnitude + $G_x$ + $G_y$ + $B_2$ | 16             |
| GSF2    | $B_2$ + $G_y$ + $G_x$ + $B_{yy}$  | 16             |
| 3-bit   | Magnitude + $G_x$ + $G_y$         | 8              |

Joint histograms capture fine spatial and geometric details across orientations and scales, facilitating discriminative representation.

## 5. Subspace Classification via Ensemble of Piecewise FDA

Classification utilizes Ensemble of Piecewise FDA (EPFDA), operating regionwise:
- Training vectors $X_j$ for all gallery faces yield within-class scatter $S_w^j$ and between-class scatter $S_b^j$.
- The generalized eigenproblem $S_b^j w = \lambda S_w^j w$ is solved, with the top $R$ eigenvectors $W_j \in \mathbb{R}^{(40 S L) \times R}$ retained.
- Region features are projected: $F_j = W_j^T X_j$.
- Similarities between query and gallery face regions are quantified using the cosine metric, $s_j = \cos(F_j, F_j')$.
- The fused score is computed as $\text{Score} = \sum_{j=1}^{MN} w_j s_j$, where $w_j$ is optionally set to a region’s standalone accuracy.

## 6. Experimental Protocols and Performance

Experiments on FERET, ORL, and FRGC-1.0.4 databases used rank-1 recognition rate as the principal metric. Preprocessing for illumination normalization was optionally applied through gamma correction, Difference of Gaussians, and contrast equalization.

On FERET (no preprocessing), results for probe sets fafb/fafc/dup I/dup II:
- GSF1: 99.2 / 95.9 / 80.0 / 56.4%
- GSF2: 99.3 / 93.8 / 84.9 / 69.2%
- GSF2 + weighting: 99.3 / 94.3 / 84.6 / 71.4%

With illumination preprocessing and region weighting:
- IP + GSF1 + W: 99.6 / 99.5 / 94.0 / 91.5%
- IP + GSF2 + W: 99.4 / 97.9 / 93.9 / 90.2%

On ORL, GSF1 achieved 97.3%, compared to 97.0% (LGBP+EPFDA) and 95.7% (GFC). On FRGC-1.0.4:
- GSF2: 94.9%; IP + GSF1: 97.2% (LGBP+EPFDA: 96.4%; GFC: 76.8%).

## 7. Discussion and Conceptual Implications

Treating GMPs as continuous surfaces allows GSF to exploit both local magnitude, slope, and curvature, improving over methods such as LGBP (which encode only gradient information). Median-based binarization imparts code uniformity and resilience against intensity scaling. Joint histograms across grid regions provide nuanced spatial statistics at multiple scales and orientations. EPFDA reduces feature dimensionality while selectively enhancing class separation per region. Region weighting further magnifies the contribution of highly discriminative facial areas to overall classification.

A plausible implication is that GSF’s physically interpretable encoding and compact binarization facilitate robust and efficient face recognition, with demonstrated superiority on benchmark datasets over prior magnitude-only or gradient-only Gabor-based methods [1409.2413].

Source: https://www.emergentmind.com/topics/gabor-surface-feature-gsf