*2.1. JSRC*

The sparse representation classification (SRC) framework was first proposed for face recognition [32]. Then Chen et al. extended the SRC to pixelwise HSI classification, which relied on the observation that spectral pixels of a particular class should lie in a low-dimensional subspace spanned by dictionary atoms (training pixels) from the same class. But spatial information is not considered by Pixelwise Sparse Representation. Therefore, based on the observation that neighboring pixels belonging to the same class usually are strongly correlated with each other, JSRC is introduced to capture such spatial correlations by assuming that neighboring pixels within a region of fixed size can be jointly represented by a few common atoms from a structural dictionary. Concretely, let **y** ∈ R*M*×<sup>1</sup> be a pixel with *M* denoting the number of spectral bands and **D** = [**<sup>D</sup>**1, ··· , **D***<sup>c</sup>*, ··· , **<sup>D</sup>***C*] ∈ R*M*×*<sup>N</sup>* be a structure dictionary, where **D***c* ∈ R*M*×*Nc* , *c* = 1, ··· , *C* is the *c*th class subdictionary whose columns (atoms) are extracted from the training pixels; *C* is the number of classes; *Nc* is the number of atoms in subdictionary **D***c*; and *N* = ∑*Cc*=<sup>1</sup>*Nc* is the total number of atoms in **D**. Specifically, the size of a region

surrounding the test pixel **y**1 is denoted by *W* × *W*, and pixels within such a region can be denoted by a matrix **Y** = [**<sup>y</sup>**1, **y**2, ··· , **<sup>y</sup>***W*×*<sup>W</sup>*]. The matrix can be compactly represented as:

$$\begin{aligned} \mathbf{Y} &= [\mathbf{y}\_1, \mathbf{y}\_2, \dots, \mathbf{y}\_{W \times W}] = [\mathbf{DA}\_1, \mathbf{DA}\_2, \dots, \mathbf{DA}\_{W \times W}] \\ &= \mathbf{D}[\mathbf{A}\_1, \mathbf{A}\_2, \dots, \mathbf{A}\_{W \times W}] = \mathbf{DA} \end{aligned} \tag{1}$$

where **A** = [**<sup>A</sup>**1, **A**2, ··· , **<sup>A</sup>***W*×*<sup>W</sup>*] is the sparse coefficients matrix corresponding to **Y**. Since the indexes of the selected atoms in **D** are determined by the positions of nonzero coefficients in [**<sup>A</sup>**1, **A**2, ··· , **<sup>A</sup>***W*×*<sup>W</sup>*], the neighboring pixels [**<sup>y</sup>**1, **y**2, ··· , **<sup>y</sup>***W*×*<sup>W</sup>*] can be represented by a small set of common atoms by enforcing a few nonzero rows on the sparse coefficients matrix **A**. Then, matrix **A** can be obtained by solving the following optimization problem:

$$\dot{\mathbf{A}} = \arg\min\_{\mathbf{A}} \|\mathbf{Y} - \mathbf{D}\mathbf{A}\|\_{F} \quad \text{subject to } \|\mathbf{A}\|\_{\text{row},0} \leqslant \mathcal{K} \tag{2}$$

where **A**row,0 denotes the joint sparse norm, which is used to select a number of the most representative nonzero rows in **A**, and ·*F* is the Frobenius norm. A variant of the OMP algorithm called the simultaneous OMP (SOMP) [33,34], can be used to efficiently obtain an approximate solution. After **A**ˆ is recovered, the label of test pixel **y**1can be decided by the minimal total error:

$$\mathcal{E} = \arg\min\_{\mathcal{E}} \|\mathbf{Y} - \mathbf{D}\_{\mathcal{E}}\mathbf{\hat{A}}\_{\mathcal{E}}\|\_{F\_{\mathcal{I}}} \qquad \mathcal{E} = \mathbf{1}\_{\prime} \cdot \cdots \cdot \mathcal{E} \tag{3}$$

where **A** ˆ *c* denotes the rows in **A** ˆ associated with the *c*th class.
