# Hyperspectral Super-Resolution Technique Using Histogram Matching and Endmember Optimization
## 2 Problem Formulation  
The goal of the HSR technique is to search for an image that has both high spectral and high spatial resolution. The image is formulated as \(\mathbf{Z}\in\mathbb{R}^{\text{B\times W\times H}}\) with B, W, and H representing the number of spectral bands, width and height of the image, respectively. The HSR task of this research takes two inputs, an HSI \(\mathbf{H}\in\mathbb{R}^{\text{B\times w\times H}}\) with high spectral resolution and low spatial resolution (w \(<\) W and h \(<\) H) and an RGB image \(\mathbf{I}\in\mathbb{R}^{\text{b\times W\times H}}\) with low spectral resolution and high spatial resolution (b \(<\) B). According to the LMM of [PERSON] et al. [28], the intensities \(z\in\mathbb{R}^{B}\) at a given pixel of \(\mathbf{Z}\) are described by an additive mixture:  
\[z=\sum\
olimits_{j=1}^{p}e_{j}\mu_{j},\ \mathbf{Z}=\mathbf{E}\mathbf{A} \tag{1}\]  
with a matrix \(\mathbf{E}\in\mathbb{R}^{\text{B\times P}}\) of endmembers and a matrix \(\mathbf{A}\in\mathbb{R}^{\text{p\times W\times H}}\) of per-pixel abundances. By this definition, most \(p\) endmembers (materials) are present in the image. The endmembers \(\mathbf{E}\) act as non-orthogonal bases to represent \(\mathbf{Z}\) in a lower dimensional space \(\mathbb{R}^{\text{P}}\) with rank \(\{\mathbf{Z}\}\leq\text{p}\).  
The actual high-resolution RGB image \(\mathbf{I}\) is a spectrally downsampled version of \(\mathbf{Z}\):  
\[\mathbf{I}=\mathbf{R}\mathbf{Z}=\mathbf{R}\mathbf{E}\mathbf{A} \tag{2}\]  
where \(\mathbf{R}\in\mathbb{R}^{\text{b\times B}}\) is the spectral response function of the sensor. The spatial response function \(\mathbf{S}\) of the hyperspectral camera and the spectral response function \(\mathbf{R}\) of the conventional camera form part of the camera specifications and are assumed to be known. The spectral response function of the Nikon D700 offered in the work of [PERSON] et al. [29] is used as \(\mathbf{R}\) for this research.  
The low-resolution HSI, \(\mathbf{H}\), is defined as:  
\[\mathbf{H}\ =\ \mathbf{E}\mathbf{A}^{\prime} \tag{3}\]where \(\mathbf{A}^{\prime}\in\mathbb{R}^{\mathrm{p}\times\mathrm{w}\times\mathrm{h}}\) is a low-resolution matrix of per-pixel abundances. The reason the per-pixel abundances of \(\mathbf{H}\) are defined not as a factorization of \(\mathbf{EA}\) and spatial downsampling operator, but as another form of matrix, is that the pixel location of the super-resolution result is not the same as that of \(\mathbf{H}\).  
The low-resolution RGB image \(\mathbf{L}\) is defined as:  
\[\mathbf{L}\ =\ \mathbf{REA}^{\prime}\] (4a) which represents the factorization of the spectral response function \[\mathbf{R}\] and the low-resolution HSI, \[\mathbf{H}\]. The constraint condition of this paper follows that of [PERSON] et al. [28]. The main assumption of the constraint is that the endmembers are reflectance spectra of individual materials, and the abundances are proportions of those endmembers. As a consequence, the factorization is subject to the following constraints: \[a_{ij}\geq 0\ \forall\ i,\ j\ (\mathrm{non-negative\ abundance}) \tag{4b}\] \[1^{\mathrm{T}}\mathrm{A}=1^{\mathrm{T}}\ (\mathrm{abundances\ sum\ to\ 1}) \tag{4c}\]  
with \(a_{ij}\) the elements of \(\mathbf{A}\). Here 1 denotes a vector of 1s compatible with the dimensions of \(\mathbf{A}\).