---
title: 'TBSD: Texture Basis Integrated Smooth Decomposition'
url: https://www.emergentmind.com/topics/texture-basis-integrated-smooth-decomposition-tbsd
type: topic
---

# TBSD: Texture Basis Integrated Smooth Decomposition

Texture Basis Integrated Smooth Decomposition (TBSD) is a methodology for decomposing images with complex textured backgrounds into smooth, texture, and anomaly components, optimally designed for anomaly detection tasks in high-dimensional, textured images with smooth backgrounds and potentially sparse anomalies. The distinguishing feature of TBSD is the explicit integration of quasi-periodic texture models into the decomposition, which robustly separates normal texture from true anomalies and reduces misidentification rates relative to prior approaches [2512.20432].

## 1. Mathematical Formulation and Decomposition Model

Let \( Y\in\mathbb{R}^{m\times n} \) represent the observed image. TBSD decomposes \( Y \) as follows:
\[
Y = C_{bg} + C_{tex} + C_a + e
\]
where:
- \( C_{bg} \): low-rank, smooth background,
- \( C_{tex} \): high-rank, quasi-periodic texture,
- \( C_a \): sparse anomaly component,
- \( e \): i.i.d. noise.

TBSD operates via a two-stage pipeline:
- **Texture Basis Learning:** Estimates texture bases from defect-free images.
- **Anomaly Detection:** Uses learned bases to decompose new images and isolate anomalies.

### Texture Basis Learning
Given defect-free \( Y \) and a smooth basis \( B \) (e.g., tensor-product B-splines), coefficients \( \theta \) and residual texture \( \widehat{C}_{tex} \) are estimated by minimizing:
\[
\min_{\theta, C_{tex}} \|Y - B\theta - C_{tex}\|_2^2 + \lambda\,\theta^\top R\,\theta + \gamma\,\|C_{tex}\|_1 \quad \text{s.t.} \; C_{bg}=B\theta,\, C_a \equiv 0
\]
with \( R \) a discrete roughness matrix (for smoothness). Updates use block coordinate descent with closed-form iterates:
\[
\theta \leftarrow (B^\top B + \lambda R)^{-1}B^\top (Y - C_{tex}),\quad C_{tex} \leftarrow S_{\gamma/2}(Y - B\theta)
\]
Here, \( S_\tau \) is the entrywise soft-thresholding operator.

Post extraction, \( \widehat{C}_{tex} \) is decomposed into directional subspaces, yielding an overcomplete dictionary \( B_t = \left\{ B_t^{(d)} \right\} \), where \( d \) indexes dominant texture directions identified through statistical tests.

### Anomaly Detection
For a new (possibly faulty) image \( \dot{Y} \), using learned \( B \) and \( B_t \), the following is solved:
\[
\min_{\theta, \theta_t, C_a} \|\dot{Y} - B\theta - B_t\theta_t - C_a\|_2^2 + \lambda \theta^\top R \theta + \gamma \|\theta_t\|_1 + \eta \|C_a\|_1
\]
with iterative updates for \( \theta \), \( \theta_t \), and \( C_a \), ultimately yielding the anomaly map \( \widehat{C}_a \).

## 2. Quasi-Periodicity in Texture Modeling

TBSD formally characterizes image textures via quasi-periodicity. For a finite 1D signal \( S \), periodicity is defined by strict repetition: \( s_{i+T} = s_i \). Quasi-periodicity generalizes this, permitting small bounded deviations:
\[
S \text{ is quasi-periodic of mode } S_{\tilde{T}} \text{ and tolerance } \sigma \text{ if for segments } S^{\tilde{t}_m}, \|S^{\tilde{t}_m} - S_{\tilde{T}}\|_2 \leq \sigma
\]
2D quasi-periodicity is constructed via orientations of 1D quasi-periodic samples. Linear combinations preserve quasi-periodicity, given appropriate coefficient and tolerance bounds (via Cauchy–Schwarz).

Detection of dominant directions exploits the difference in standard deviation of line samples (transverse vs. along ridges). These directions, \( D \), define the axes for dictionary construction, ensuring texture bases capture quasi-repetitive structure.

## 3. Algorithmic Workflow

The TBSD methodology proceeds through distinct algorithmic stages:

### a. Low-Rank Decomposition (Algorithm 1)
- Input: defect-free \( Y \), smooth basis \( B \), penalties \( \lambda, \gamma \).
- Alternate minimization:
  1. Update \( \theta \) via ridge regression on background.
  2. Refine \( \widehat{C}_{tex} \) via soft-thresholding.
- Convergence due to strict convexity.

### b. Direction Detection (Algorithm 2; LSERA + std-dev test)
- Rotate a sampling line by increments \( \Delta\theta \) through \([0, \pi]\).
- For each angle \( \alpha \), compute \( \Delta\sigma = \mathrm{std}(S_\alpha) - \mathrm{std}(S_{\alpha+\pi/2}) \).
- Select directions where \( \Delta\sigma \) exceeds threshold \(\phi\), yielding \( D \).

### c. Mode-Clustering (Algorithm 3)
- For each \( d \in D \), trace in direction \( d \), extract segments of length up to \( K \), and cluster patterns.
- Cluster centroids become dictionary atoms in \( B_t \).

Each subproblem (ridge, \( \ell_1 \)-soft-thresholding, density clustering) is convex, ensuring global convergence to a stationary point via block-coordinate descent.

## 4. Anomaly Detection Pipeline and Decision Rules

The detection pipeline is structured as follows:
1. Project \( \dot{Y} \) onto the background, removing \( B\theta \).
2. Reconstruct textures using sparse coding over \( B_t \):
   \[
   R = \dot{Y} - B\theta - B_t\theta_t
   \]
3. Apply soft-thresholding to the residual to obtain \( C_a = S_{\eta/2}(R) \).
4. Pixels with \( \widehat{C}_a(i,j) \neq 0 \) are labeled as anomalous. The fraction of anomalous pixels \( \rho_a \) may be used for image-level decisions versus a global threshold \( \phi_A \).

## 5. Benchmarking and Quantitative Performance

TBSD has been empirically evaluated across both simulated and real data settings. Key metrics are true-positive rate (TPR) and false-positive rate (FPR). The principal benchmarks are Robust PCA (RPCA), Sum of Squared Differences (SSD), and Fast Fourier Transform (FFT) baselines.

### Results Summary

| Dataset      | Method | TPR    | FPR    |
|--------------|--------|--------|--------|
| Simulation   | TBSD   | 0.43   | 0.09   |
|              | RPCA   | 0.28   | 0.25   |
|              | SSD    | 0.29   | 0.075  |
|              | FFT    | 0.066  | 0.10   |
| Real (MVTec) | TBSD   | 0.58   | 0.022  |
| TBSD (best 5)| TBSD   | 0.76±0.08 | 0.024±0.010 |
|              | RPCA   | 0.33   | 0.246  |
|              | SSD    | 0.43   | 0.242  |
|              | FFT    | 0.46   | 0.082  |

TBSD consistently achieves superior TPR and lower FPR, particularly notable on real-world MVTec wood patches, where it reduces mis-detection of quasi-periodic textures and improves anomaly recall [2512.20432].

## 6. Practical Considerations and Applications

Key characteristics of TBSD in practical deployments include:

- **Training Data Requirements:** Robust dictionary learning is achieved with small sets (5–10) of defect-free patches.
- **Robustness:** The method accommodates moderate variations in texture spacing, orientation, and illumination due to its quasi-periodic modeling.
- **Parameter Tuning:** Recommended ranges—
  - \( \lambda \) (background smoothness): 0.05–0.2,
  - \( \gamma \) (texture sparsity): 0.1–0.3,
  - \( \eta \) (anomaly sparsity): 0.01–0.1,
  - \( \Delta\theta \) (direction increments): \( 1^\circ–5^\circ \).
  Degradation with parameter deviation is gradual.

- **Application Domains:** Wood-grain inspection, steel-rolling defect detection, anomaly detection in 3D printed surfaces, and non-destructive testing of aviation composites.

- **Methodological Distinction:** TBSD augments classical smooth + sparse decompositions with a learned quasi-periodic texture prior, nearly eliminating misclassification of normal texture and yielding state-of-the-art detection performance.

## 7. Context and Significance

TBSD addresses the limitations of prior anomaly detection methods on textured images, notably their higher rates of misidentification and dependence on extensive, structured datasets. The incorporation of a learned quasi-periodic texture prior enables efficient operation with small training sets and robust discrimination between quasi-periodic normal textures and true anomalies. The approach is theoretically justified via the properties of quasi-periodic signals and empirically validated with benchmark beating results on both synthetic and real-world datasets. This suggests a significant advance in industrial applications where textured backgrounds complicate conventional defect detection workflows [2512.20432].

Source: https://www.emergentmind.com/topics/texture-basis-integrated-smooth-decomposition-tbsd