# RSB: Robust Successive Binarization for Change Detection in Bitemporal Hyperspectral Images
## 2 Methodology
### Error Functions  
Many error functions could be used to assess possible changes; however, here, the following ones have been selected. * Euclidean distance (\(i=1\)): The difference between every spectral row vector in \(I_{1}\) and \(I_{2}\) is computed. Then, the second norm of the resulting difference vectors is calculated. The computational cost for this metric is proportional to \(O(pk)\). * Manhattan distance (\(i=2\)): The norm 1 is computed on the spectral difference vectors. The computational cost is proportional to \(O(pk)\). SAM-ZID (\(i=3\))--see [16]: Firstly, the sinus of the angle between every spectral row vector in \(I_{1}\) and \(I_{2}\) is computed and then scaled in \([0,1]\); secondly, the obtained result is multiplied by the standardized difference vector, again scaled in \([0,1]\). The computational cost is proportional to \(O(2 pk)\). * Spatial Mean SAM--in short, SAM-MEAN (\(i=4\)): The arithmetic mean of the angles between two pairs of spectral vectors (i.e., one row vector in \(I_{1}\) and another row vector in \(I_{2}\)) inside a local window is computed. The computational cost is \(O(4 pk+2d_{V}-1)\), where, by \(d_{v}\), we denote the chosen window size; see [28] for the details about this parameter. * Spatial Mean Spectral Angles Deviation Mapper--in short, SMSADM (\(i=5\)): The arithmetic mean of the deviation angles from their spectral mean is computed inside a local window, which slides through the considered image. The computational cost is \(O(4 pk+2d_{V}-1)\), where, again, by \(d_{v}\), we denote the chosen window size. * A complementary measure of the Pearson correlation coefficient, denoted in short as Pearson cc, (\(i=6\)): The Pearson correlation coefficient [29] is computed between every pair of spectral row vectors. This is not a common error function to measure changes, but it is experimentally proven to be insightful; see [30]. Here, we propose the following novel formulation. The Pearson coefficient, computed for every spectral row vector, is a value \(\rho\) between \(-1\) and \(1\). In particular, \(\rho=-1\) means a negative linear correlation, while \(\rho=1\) means a positive linear correlation. Values of \(\rho\) near the \(0\) mean either very low or no correlation at all. In order to use \(\rho\) as a suitable indicator for the change detection task, firstly, it is computed as \(|\rho|\), to eliminate any negative numbers (which would be meaningless in terms of pixel intensity values) and then it is mirrored with respect to one, so \(1-|\rho|\). In fact, a high correlation is expected among the unchanged pixels, in the background, since the same area is analyzed at two different time steps, and hence, for those pixels, the corresponding \(|\rho|\) should be close to \(1\). Meanwhile, regarding the changed pixels, it is unlikely to obtain any possible linear correlation, i.e., the \(\rho\) values should be small or even \(0\). Therefore, to obtain a suitable output that highlights changes, the \(|\rho|\) produced for every spectral row vector is mirrored with respect to one, so that \(0\) or close to \(0\) values will become closer to \(1\) and the corresponding pixels will have higher intensity values. The computational cost is \(O(6 pk)\). ```
Data: Given \(I_{1}\), \(I_{2}\) HS vectorized images Result: Binary change map for\(i=1,\ldots,6\)do
1 Compute \(\widetilde{I}_{i}\gets f_{i}(I_{1},I_{2})\); Compute \(\widetilde{I}_{i,s}\leftarrow Scale(\widetilde{I}_{i})\) %_Scale the values between \(0\) and \(1\); Compute \(M_{i}\leftarrow Binarize1(\widetilde{I}_{i,s})\); Compute \(M_{i,b}\leftarrow Binarize2(M_{i})\);
2
3 end for
4 Compute \(T\leftarrow\sum_{i}M_{i,b}\); output:\(Binarize3(T)\);
```  
**Algorithm 1**RSB pseudo-code  
The chosen error functions are selected by considering that both spatial and spectral changes should be detected.