---
title: Quaternion Representation of Color Images
url: https://www.emergentmind.com/topics/quaternion-representation-of-color-images
type: topic
---

# Quaternion Representation of Color Images

Quaternion representation of color images is a mathematical and algorithmic framework in which each pixel’s color channels (Red, Green, Blue) are encoded as a single quaternion algebraic entity—typically as a pure-imaginary quaternion—with many extensions involving “full” quaternions incorporating scalar information such as luminance or depth. This approach permits joint modeling of channel correlations and facilitates advanced image processing methodologies, including matrix/tensor completion, compression, enhancement, classification, and inpainting. Quaternion models are now prominent in computer vision tasks where cross-channel statistical structure is critical.

## 1. Mathematical Formulation of Quaternion-Based Encoding

A quaternion $q \in \mathbb{H}$ is defined as $q = a + b\,i + c\,j + d\,k$, where $a, b, c, d \in \mathbb{R}$ and $i, j, k$ satisfy $i^2 = j^2 = k^2 = ijk = -1$ with non-commutative multiplication (e.g., $ij = k$, $ji = -k$). In the canonical pure-imaginary encoding for color images, the RGB channels of a pixel at $(m, n)$ are mapped to a quaternion:
\[
q_{m,n} = 0 + R_{m,n}\,i + G_{m,n}\,j + B_{m,n}\,k
\]
In this representation, the real part vanishes and the three imaginary coefficients represent Red, Green, and Blue intensities. The entire image forms a quaternion matrix $Q \in \mathbb{H}^{M \times N}$, enabling holistic processing of color data [2503.16818][2012.15138][2001.10676][1909.06567].

Extensions such as the full quaternion representation incorporate scalar information (e.g., luminance average or depth) into the real part, yielding representations of the form:
\[
q_{m, n} = a_{m, n} + R_{m, n}\,i + G_{m, n}\,j + B_{m, n}\,k
\]
where $a_{m,n}$ may be zero, the luminance, or a depth value [2503.16818][2007.09758].

## 2. Preservation of Channel Correlations and Algebraic Advantages

Quaternion encoding couples the RGB channels, facilitating operations that naturally respect the geometric and statistical interdependence among color channels. Algebraic manipulation such as addition, unitary transforms, Hamilton product, and singular value decomposition act on all three channels simultaneously. This avoids per-channel artifacts and enables models to capture spatial–chromatic features otherwise lost in independent channel processing. Notably, quaternion representations preserve hue and saturation relationships during transformation, enhancement, or reconstruction tasks [1503.01657][2001.10676][1707.04781].

## 3. Low-Rank Quaternion Matrix and Tensor Models

Low-rank priors in the quaternion domain underpin state-of-the-art approaches to color image inpainting, denoising, deblurring, and recovery. The typical minimization seeks a low-rank quaternion matrix or tensor $X$ matching observed pixels:
\[
\min \|X\|_{*} \quad \text{subject to} \quad P_\Omega(X) = P_\Omega(Q)
\]
where $\|X\|_{*}$ is the quaternion nuclear norm (sum of quaternion singular values), and $P_\Omega$ restricts to observed indices [1909.06567][2001.10676]. Factorization surrogates are used to avoid the high computational cost of large-scale Quaternion SVDs (QSVD), relying on optimization over smaller quaternion matrix factors $U, V$:
\[
\min_{U, V} \frac{1}{2} \| U V - X \|_F^2 + \frac{\lambda}{2} (\|U\|_F^2 + \|V\|_F^2)
\]
Quaternions also permit higher-order color video or multispectral data modeling using tensor decompositions such as Tucker rank, tensor ring, and Quaternion HOSVD (QHOSVD) [2307.10620][2101.00364].

## 4. Depth-Augmented Quaternion Representation

In recent advances, scalar scene-depth is embedded in the real part of each quaternion pixel, forming "depth-aided" color image inpainting. The process involves preliminary restoration using conventional LRQMC, followed by depth estimation (typically via a pretrained network) and subsequent fusion into the real part:
\[
q_{m,n} = D_{m,n} + R_{m,n}\,i + G_{m,n}\,j + B_{m,n}\,k
\]
This depth-augmented encoding improves completion in regions where depth strongly predicts color structure. Empirical results confirm systematic gains in PSNR and SSIM over pure-imaginary schemes [2503.16818].

## 5. Quaternion Structure in Deep and Neural Architectures

Quaternion neural networks have emerged in classification and generative tasks, where quaternion convolutional layers perform joint rotation and scaling in RGB space. Quaternion-based principal component analysis (QPCA), Quaternion CNNs (QCNNs), and Generative Adversarial Networks (QGANs) extend real-valued architectures to exploit cross-channel structure via Hamilton product-based convolution and quaternion batch normalization. These models demonstrate superior convergence speed, robustness to noise, and accuracy—especially for color-sensitive recognition and inpainting [1903.00658][2406.11567][1503.01657][2512.08327].

## 6. Optimization, Regularization, and Efficient Algorithms

Matrix and tensor completion models employ regularizers tailored to quaternion structure. These include nuclear norm minus Frobenius norm (QNMF), truncated nuclear norm, and $L_{2,1}$-column sparse surrogates, all implemented via efficient ADMM schemes. Computational gains are achieved using QR over QSVD-based factorizations or deep implicit priors (untrained QCNN). Sparse regularization in the quaternion DCT or QDFT frequency domain preserves texture and edge fidelity [2409.07797][2204.08629][2211.12793][2309.03764][2305.00416].

## 7. Applications and Empirical Impact

Quaternion representation has demonstrated benefits in image inpainting, denoising, deblurring, classification, face recognition, video recovery, compression, and image enhancement:
- Image inpainting: Low-rank and tensor-completion quaternion schemes yield sharper restoration and less artifacting at lower sample ratios than channel-wise or tensor-based approaches [1909.06567][2307.10620][2005.02886][2406.11567].
- Compression: Full quaternion models via autoencoder-based transformation halve matrix width, preserve cross-covariance, and accelerate QSVD [2007.09758].
- Feature extraction, recognition, and classification: Weighted quaternion PCA/projection and LSQMM classification robustly extract discriminative color features, showing superior performance in small-sample or noisy scenarios [1503.01657][2512.08327][2010.01477].
- Denoising and fusion: QHOSVD and QNMF models deliver higher PSNR, SSIM, and perceptual quality than conventional matrix methods, with competitive runtime via efficient ADMM and factorization [2101.00364][2409.07797].

## Table: Common Quaternion Color Image Encodings

| Representation Type           | Formula (pixel)                       | Real part meaning       |
|-------------------------------|---------------------------------------|------------------------|
| Pure-imaginary quaternion     | $0 + R\,i + G\,j + B\,k$              | None (zero)            |
| Full quaternion (general)     | $a + R\,i + G\,j + B\,k$              | Luminance or depth     |
| Depth-augmented quaternion    | $D + R\,i + G\,j + B\,k$              | Depth (estimated)      |

These structural options offer flexibility in encoding auxiliary cues beyond color, such as geometry or illumination.

## Conclusion

Quaternion representation of color images provides an algebraically coherent, computationally efficient, and statistically robust framework for color image analysis. By encoding RGB vectors as unified entities and leveraging quaternion-specific optimization schemes, these models outperform conventional channel-wise and tensor methods across a range of vision applications. Recent integration of depth and advances in neural architectures suggest continued expansion of quaternion methodologies in multidimensional image processing [2503.16818][2012.15138][2001.10676][1503.01657][2512.08327][2007.09758][2406.11567].

Source: https://www.emergentmind.com/topics/quaternion-representation-of-color-images