*2.1. Sparse Unmixing*

Let **Y** ∈ R*l*×*n* be the observed hyperspectral data, where *l* is the number of bands, and *n* is the number of pixels. The LMM for a hyperspectral image is based on the assumption that each pixel **y** ∈ R*<sup>l</sup>* in any given spectral band is a linear combination of *m* spectral signatures in the spectral library **A** ∈ <sup>R</sup>*l*<sup>×</sup>*m*, that is,

$$\mathbf{y} = \mathbf{A}\mathbf{x} + \mathbf{e} \tag{1}$$

 where **x** ∈ R*m* is the abundance vector, and **e** ∈ R*<sup>l</sup>* is the vector of noise and model error.

With sparse unmixing, it is assumed that the abundance vector **x** is sparse because the number of endmembers contained in a pixel is much lower than the number of spectral signatures in the library, which implies the vector **x** contains many intensities of zero. Figure 1 illustrates the LMM and sparse unmixing. Considering the ground truth, **x** has a constraint that needs to be imposed to the sparse unmixing model, i.e., the value of **x** can never be negative which is called the abundance nonnegativity constraint (ANC). The sparse unmixing problem based on the LMM for each mixed pixel can be formulated as

$$\min\_{\mathbf{x}} \qquad \|\mathbf{x}\|\_{0} \qquad \text{s.t.} \qquad \|\mathbf{y} - \mathbf{A}\mathbf{x}\|\_{2} \leq \delta, \quad \mathbf{x} \geq 0 \tag{2}$$

where **x**0 denotes the number of nonzero elements in **x** ∈ R*<sup>m</sup>*, and *δ* is the error tolerance value determined from the noise and model error. The nonconvexity of the *L*0 term induces an NP-hard problem; however, it has been proven that a nonconvex optimization problem can be relaxed to a convex one by replacing *L*0 with *L*1 [11,37]. Thus, the problem can be written as

$$\min\_{\mathbf{x}} \qquad \|\mathbf{x}\|\_1 \qquad \text{s.t.} \qquad \|\mathbf{y} - \mathbf{A}\mathbf{x}\|\_2 \le \delta\_\prime \quad \mathbf{x} \ge 0 \tag{3}$$

**Figure 1.** Illustration of hyperspectral image and sparse unmixing for pixel (**top**) and image (**bottom**).

Applying this formula to the whole image, we estimate the abundance matrix **X** ∈ R*m*×*n* for all the pixels in the hyperspectral data **Y** using the respective Lagrangian function as

$$\min\_{\mathbf{X}} \quad \frac{1}{2} \|\mathbf{A}\mathbf{X} - \mathbf{Y}\|\_{F}^{2} + \lambda \|\mathbf{X}\|\_{1} \qquad \text{s.t.} \qquad \mathbf{X} \ge 0 \tag{4}$$

where ·*F* denotes the Frobenius norm of a matrix, and *λ* is the sparsity regularizer. This problem can be solved through optimization by using alternating direction method of multipliers (ADMM).
