## 3 Technology Background
### Fun
```
1:Inputs:
2:\(M=[m_{1}\ \ldots\ m_{pixels}]\)\(\triangleright\) Input hyperspectral image
3:\(\alpha\)\(\triangleright\) Stop factor
4:Outputs:
5:\(E=[e_{1}\ \ldots\ e_{P}]\)\(\triangleright\) Endmembers
6:\(P\)\(\triangleright\) Number of endmembers
7:\(X\gets M\); \(X=[x_{1}\ \ldots\ x_{pixels}]\)\(\triangleright\) Auxiliary copy of the hyperspectral image
8:\(E\leftarrow[]\)\(\triangleright\) Endmembers matrix
9:\(Q\leftarrow[]\)\(\triangleright\) [PERSON] orthogonalization of Endmembers
10:\(U\leftarrow[]\)\(\triangleright\) [PERSON] orthogonalization (normalized) of Endmembers
11:\(e_{1}\gets x_{\text{init}}\); \(E\leftarrow[E\ e_{1}]\)\(\triangleright\) Select first endmember according to initialization criteria
12:\(q_{1}\gets e_{1}\); \(Q\leftarrow[Q\ q_{1}]\)
13:\(u_{1}\gets e_{1}/(e_{1}\bullet e_{1})\); \(U\leftarrow[U\ u_{1}]\)
14:\(P\gets 1\)
15:exit\(\gets 0\)
16:whileexit\(=0\)do
17:for\(i\gets 1\)to pixelsdo
18:\(x_{i}\gets x_{i}-(x_{i}\bullet q_{P})\cdot u_{P}\)
19:\(s_{i}^{2}\gets x_{i}\bullet x_{i}\)
20:endfor
21:\((s_{\text{max}}^{2},\ i_{\text{max}})\leftarrow\textsc{getmax}(S^{2})\); \(S^{2}=[s_{1}^{2}\ \ldots\ s_{pixels}^{2}]\)
22:if\(s_{\text{max}}^{2}\cdot 100^{2}\leq\alpha^{2}\cdot(m_{i_{\text{max}}} \bullet m_{i_{\text{max}}})\)then
23:exit\(\gets 1\)
24:else
25:\(P\gets P+1\)
26:\(e_{P}\gets m_{i_{\text{max}}}\); \(E\leftarrow[E\ e_{P}]\)
27:\(q_{P}\gets x_{i_{\text{max}}}\); \(Q\leftarrow[Q\ q_{P}]\)
28:\(u_{P}\gets x_{i_{\text{max}}}/(x_{i_{\text{max}}}\bullet x_{i_{\text{max}}})\); \(U\leftarrow[U\ u_{P}]\)
29:endif
30:endif
31:endwhile
```  
**Algorithm 1** FUN algorithm: endmember extraction ```
1:Inputs:\(M=[m_{1}\ \ldots\ m_{pixels}]\)\(\triangleright\) Input hyperspectral image \(E=[e_{1}\ \ldots\ e_{P}]\)\(\triangleright\) Endmembers \(P\)\(\triangleright\) Number of endmembers Outputs:\(A=[a_{1}\ \ldots\ a_{pixels}]\)\(A\leftarrow[E\ E]\)
2:\(Q\leftarrow[]\)
3:\(U\leftarrow[]\)
4:\(U^{*}\leftarrow[]\)
5:for\(k\gets 2\)to\(P+1\)do
6:\(q_{1}\gets e_{k}\); \(Q\leftarrow[Q\ q_{1}]\)
7:\(u_{1}^{*}\gets e_{k}/(e_{k}\bullet e_{k})\); \(U^{*}\leftarrow[U^{*}\ u_{1}^{*}]\)
8:for\(j\gets 2\)to\(P\)do
9:\(x\gets e_{k+j-1}\)
10:for\(i\gets 1\)to\(j-1\)do
11:\(x\gets x-(x\bullet q_{i})\cdot u_{i}^{*}\)
12:endfor
13:\(q_{j}\gets x\); \(Q\leftarrow[Q\ q_{j}]\)
14:\(u_{j}^{*}\gets x/(x\bullet x)\); \(U^{*}\leftarrow[U^{*}\ u_{j}^{*}]\)
15:endfor
16:\(U\leftarrow[U\ u_{P}^{*}]\)
17:\(Q\leftarrow[]\)
18:\(U^{*}\leftarrow[]\)
19:endfor
20:\(A\gets U^{t}\cdot M\)
```

**Algorithm 2** FUN algorithm: abundances computation

### Artico\({}^{3}\)

ARTICo\({}^{3}\)[18] is a hardware-based high-performance embedded processing architecture that enables user-driven adaptation at runtime, creating a dynamic solution space in which tradeoffs between computing performance, energy consumption, and fault tolerance can be established. The architecture relies on the use of Dynamic and Partial Reconfiguration (DPR) in Xilinx FPGAs to provide software-like flexibility while maintaining hardware-like performance during execution. The top-level block diagram of the ARTICo\({}^{3}\) architecture is shown in Figure 1.

ARTICo\({}^{3}\)-based computing platforms work in a processor-copro processor scheme, where the application code is executed in the host microprocessor, and only those program sections that exhibit significant levels of data parallelism (called kernels) are offloaded to the hardware accelerators. This execution model, based on data independences between blocks, provides transparent scalability in terms of computing performance when coupled with DPR-based hardware replication, since the available number of processing elements (i.e., hardware accelerators) for a given kernel can be altered on demand even during application execution.