**6. Conclusions**

Since the development of anomaly detection algorithms for hyperspectral images includes a large number of applications, many researchers are motivated to develop efficient methods in this area. In this paper, a new method based on simultaneous sparse representation of local background signals using a sliding window was proposed to detect spectral anomalies. In this method, all of the signals located in the sliding window are voted through examining the estimated error of each signal to determine if there is any anomaly or not. As the precision of recovery for each pixel of the hyperspectral image is evaluated several times during the transition of the sliding window, this potential provides better conditions for evaluation of each signal from being an anomaly or background. The learned dictionary in each position of the sliding window is affected by the signals that are located in that window, and, practically, each pixel is being recovered many times with the help of a set of different background dictionaries.

The results of implementation of the proposed SWJSR method in five used datasets in this research proved its higher functionality when compared to the GRX, LRX, CRD, BJSR, CR-RXD, CK-RXD, and SLRX detectors. According to the obtained AUC, the results show the average improvement of efficiency (AUC) of about 7.5%, 14.25%, 8.2%, 8.25%, 6.45%, 6.5%, and 3.6%, respectively, in comparison to the mentioned algorithms. The implementation of this idea and its success showed that development of voting algorithms and the combination of the results could be considered as an effective approach to detect anomalies in hyperspectral signals. This idea could also be utilized in other hyperspectral image processing algorithms to evaluate the results by comparing prior methods. The results of SLRX, which show the average improvement of efficiency (AUC) of about 10% in comparison with traditional local RX, confirms this idea.

Automatic tuning of the proposed SWJSR algorithm parameters and developing parallel processing techniques to improve the running time of this algorithm are the focus of future research of the authors. Moreover, detecting spatial anomalies by the proposed approach and using spatial-spectral features in this field include other interested future works of the authors.

**Acknowledgments:** The authors would like to thank the Center for Imaging Science, Rochester Institute of Technology for the "HyMap" data set and also the Remote Sensing & Image Processing Group of University of Pisa for the "Viareggio 2013 Trial" data set used in our experiments to evaluate the proposed anomaly detection algorithm.

**Author Contributions:** All the authors listed contributed equally to the work presented in this paper.

**Conflicts of Interest:** The authors declare no conflict of interest.
