## 2 Materials and Methods  
### Selective Search  
As a region possesses richer information than a single pixel, a selective search aims to make full use of global spatial information and spectral information in an his, and to achieve homogeneous segmentation of the HSI. The selective search process contains two main phases: over-segmentation and region merging. First, a graph-based image segmentation technique [35] is applied to the HSI to divide the image into a series of initial regions as the processing unit. The similarities between all neighboring regions are then calculated and recorded. Subsequently, the greedy algorithm is applied to iteratively merge the regions until the separation of different objects is achieved. The results of the selective search will be regarded as the basic judgment in CRD for more precisely representing background characteristics. Consider a 3-D HSI cube by \(HSI=(X,E)\) in \(R^{d}\), which is constituted by pixel spectra \(X=\left\{x_{i}\right\}_{i=1}^{N}\) and edges \(\left(x_{i},x_{j}\right)\in E\) representing the connection of the pairs of neighboring pixels. \(N\) is the total number of pixels in the image and \(d\) is the number of spectral bands. Each edge \(\left(x_{i},x_{j}\right)\in E\) has a corresponding weight \(w\big{(}x_{i},x_{j}\big{)}\) which is defined by the spectral difference of the two neighboring pixels \(x_{i}\) and \(x_{j}\), connected by the edge. To achieve homogeneous over-segmentation of the HSI, the edges between two contiguous pixels in the same region should have relatively low weights, meaning that they belong to the same class. Therefore, the weight is defined as the following dynamic similarity operator for comprehensively evaluating the difference degree of the pixel spectra, which simultaneously considers the amplitude and shape similarity of pixel spectral curves:  
\[w=Ent\times(1-r)+LD \tag{1}\]  
where \(Ent\) is the information entropy of the spectral difference curve [35], usually defined as  
\[Ent=-\sum_{t=1}^{d}P_{t}\text{lg}(P_{t}) \tag{2}\]and \(P_{t}=x_{t}/\sum\limits_{t=1}^{d}x_{t}\) is the probability of the \(t^{th}\) value in the spectral difference vector \(x\). \(r\) is the correlation coefficient, a common criterion to describe the shape similarity of two spectral vectors, which is generally defined as:  
\[r=\frac{\sum\limits_{t=1}^{d}(x_{it}-\overline{x_{i}})\cdot\sum\limits_{t=1}^{ d}\left(x_{it}-\overline{x_{j}}\right)}{\sqrt{\sum\limits_{t=1}^{d}\left(x_{it}- \overline{x_{i}}\right)^{2}\cdot\sum\limits_{t=1}^{d}\left(x_{it}-\overline{x _{j}}\right)^{2}}} \tag{3}\]  
\(\overline{x_{*}}\) represents the mean of the spectral vectors in all bands. \(LD\) represents Lance distance [36], which is a typical numerical index of spectral similarity featuring insensitivity to singular values and a high ability of noise suppression. The \(LD\) value ranges from 0 to 1, which is convenient for combining with the shape index \(r\). The Lance distance is denoted as:  
\[LD=\frac{1}{d}\sum\limits_{t=1}^{d}\frac{\left|x_{it}-x_{jt}\right|}{x_{it}+x _{jt}} \tag{4}\]  
Specifically, the smaller the \(LD\) and the closer \(r\) to 1 mean that the two spectra are more similar. When the shapes of the two spectra greatly differ, \(Ent\) is larger and the weight of \(1-r\) is larger at this time, which means that the shape index plays a greater role in measuring the similarity of the two spectral curves. When \(Ent\) is equal to 0, the shapes of the spectral curves are completely consistent. At this time, the difference in the spectral curve is mainly reflected in the numerical value, which is measured by \(LD\). Generally, the smaller the weight, the more similar the two pixels are, and the sooner the two pixels are combined into a component. In addition to the accurate description of spectral similarity, the criterion for determining whether two components can be the same is also critical.