4
ANOMALY DETECTION IN NON-STATIONARY BACKGROUNDS Nir Gorelnik, Hadar Yehudai and Stanley R. Rotman Ben-Gurion University of the Negev Dept. of Elec. and Comp. Eng. Beer-Sheva, ISRAEL ABSTRACT In this paper, several algorithms are considered as solutions for detecting anomalies in images which are inherently non- stationary, i.e., the images contain more than one type of background. We conclude that a recent algorithm suggested by A. Schaum [1] is most successful when coupled with several variations which we suggest. In particular, in concurrence with Schaum, for pixels in transition zones between two neighboring stationary areas, it is crucial to choose or construct a covariance matrix which is appropriate for that particular area. Methods to choose both the sample covariance matrix and the estimated local mean will be discussed. Index Terms— Hyperspectral, Subpixel point target detection 1. INTRODUCTION Matched filter subpixel target detection in spectral data is based on the philosophy that one wishes to find a pixel which is 1. unlike the neighbors, 2. not consistent with the standard trends of the noise in the image and 3. consistent with the target spectrum, when known. If the target spectrum is unknown, then one can employ the standard RX algorithm: 1 1 T GLOBAL G G G RX x m x m where x is the pixel being examined, m G is the global mean, and G is the covariance matrix of all the data. If the difference between the examined pixel and the global mean (to be referred to as the pixel remnant) is negligible, then the central pixel (the pixel being tested) belongs to the background and is not an anomaly; the inverse covariance matrix lowers significantly pixels which have spectral signatures in the direction of the natural background variance. Since the RX algorithm assumes that the target signature is unknown, it matches each pixel remnant to itself. Previous work by our group has found that the inherent non-stationarity of most remote sensing images leads to changes to Equation 1 [2], [3]. In particular, an accurate estimate for the background mean and variance should be based on pixels local to the pixel being examined, since the statistics of the global image can be quite different than that of the local environment in which the pixel is found. We have recommended using the mean of the eight surrounding pixels of the examined pixel in place of the global mean in Eq. 1. Given the mean of the eight surrounding neighbors as m 8, we obtain, 1 8 8 2 T LOCAL G RX x m x m We have also implemented algorithms which segment the image by a K-means type algorithm; we then calculate a covariance matrix based on the pixels in the segment to which the background belongs (in a clustered image) in place of the covariance matrix in Eq. 1. The implementation of this algorithm would then be: 1 (3) ( ) ( ) T SEGMENTED Si Si Si SRX x m x m or 1 8 8 (4) T LOCAL Si SRX x m x m where, in Equations 3 we use the mean of every segment mSi and in Equations 4, we use the mean of the eight surrounding neighbors m8. In both we use the covariance matrix of the segment Si. The accuracy of these estimates will be put to the test at the interfaces of the segments in the image. When two quasi-stationary areas meet, e.g., the sky-land boundary, a water-land transition etc…, the estimate of the mean and covariance to be made from the local surroundings may be faulty. A. Schaum has suggested [1] that one should estimate the pixel's background as being a linear combination of the mean of the segments which are present surrounding that pixel. Eq. 1 would then have a "combination" covariance matrix which would be a linear weighted sum of the covariance matrices of the background segments and a "combination" mean which would be a linear weighted sum of the segment means. The examined pixel can be described as: 1 2 5 (1 ) S S x f m f m 978-1-4244-8907-7/10/$26.00 ©2010 IEEE

[IEEE 2010 2nd Workshop on Hyperspectral Image and Signal Processing: Evolution in Remote Sensing (WHISPERS) - Reykjavik, Iceland (2010.06.14-2010.06.16)] 2010 2nd Workshop on Hyperspectral

Embed Size (px)

Citation preview

ANOMALY DETECTION IN NON-STATIONARY BACKGROUNDS

Nir Gorelnik, Hadar Yehudai and Stanley R. Rotman

Ben-Gurion University of the Negev Dept. of Elec. and Comp. Eng.

Beer-Sheva, ISRAEL

ABSTRACT

In this paper, several algorithms are considered as solutions for detecting anomalies in images which are inherently non-stationary, i.e., the images contain more than one type of background. We conclude that a recent algorithm suggested by A. Schaum [1] is most successful when coupled with several variations which we suggest. In particular, in concurrence with Schaum, for pixels in transition zones between two neighboring stationary areas, it is crucial to choose or construct a covariance matrix which is appropriate for that particular area. Methods to choose both the sample covariance matrix and the estimated local mean will be discussed.

Index Terms— Hyperspectral, Subpixel point target detection

1. INTRODUCTION

Matched filter subpixel target detection in spectral data is based on the philosophy that one wishes to find a pixel which is 1. unlike the neighbors, 2. not consistent with the standard trends of the noise in the image and 3. consistent with the target spectrum, when known. If the target spectrum is unknown, then one can employ the standard RX algorithm:

� � � � � �11 TGLOBAL G G GRX x m x m�� � �� � �

where x is the pixel being examined, mG is the global mean, and �G is the covariance matrix of all the data. If the difference between the examined pixel and the global mean (to be referred to as the pixel remnant) is negligible, then the central pixel (the pixel being tested) belongs to the background and is not an anomaly; the inverse covariance matrix lowers significantly pixels which have spectral signatures in the direction of the natural background variance. Since the RX algorithm assumes that the target signature is unknown, it matches each pixel remnant to itself.

Previous work by our group has found that the inherent non-stationarity of most remote sensing images leads to

changes to Equation 1 [2], [3]. In particular, an accurate estimate for the background mean and variance should be based on pixels local to the pixel being examined, since the statistics of the global image can be quite different than that of the local environment in which the pixel is found. We have recommended using the mean of the eight surrounding pixels of the examined pixel in place of the global mean in Eq. 1. Given the mean of the eight surrounding neighbors as m8, we obtain,

� � � � � �18 82 T

LOCAL GRX x m x m�� � �� � �

We have also implemented algorithms which segment the image by a K-means type algorithm; we then calculate a covariance matrix based on the pixels in the segment to which the background belongs (in a clustered image) in place of the covariance matrix in Eq. 1.

The implementation of this algorithm would then be: 1(3) ( ) ( )T

SEGMENTED Si Si SiSRX x m x m�� � �� � �or

� � � �18 8(4) T

LOCAL SiSRX x m x m�� � � �where, in Equations 3 we use the mean of every segment mSi and in Equations 4, we use the mean of the eight surrounding neighbors m8. In both we use the covariance matrix of the segment �Si.

The accuracy of these estimates will be put to the test at the interfaces of the segments in the image. When two quasi-stationary areas meet, e.g., the sky-land boundary, a water-land transition etc…, the estimate of the mean and covariance to be made from the local surroundings may be faulty. A. Schaum has suggested [1] that one should estimate the pixel's background as being a linear combination of the mean of the segments which are present surrounding that pixel. Eq. 1 would then have a "combination" covariance matrix which would be a linear weighted sum of the covariance matrices of the background segments and a "combination" mean which would be a linear weighted sum of the segment means.

The examined pixel can be described as:

� � 1 25 (1 )S Sx f m f m� � � � �

978-1-4244-8907-7/10/$26.00 ©2010 IEEE

where mS1 and mS2 are the averages of Segments 1 and 2, respectively, and f is the fraction between 0 and 1 that best matches the pixel. Let us define �S1 and �S2 as the covariance matrix of Segments 1 and 2, repectively. The correct weighting f would be determined by the weights which minimize the Mahanolobis distance of the pixel from the origin where the parameters for the Mahanolobis distance are:

� �� � � �

1 22 2

1 2

1

(1 )(1 )6

f S S

f S S

T

f f ff

m f m f mf f

f Min x m x m�

� � � � �

� � �� � � ��

� � �� � �� � �where mf is the combined means of the two segments, and �f is the combined covariance matrix of the two segments. (See Ref. 1 for the details of efficient algorithms to calculate the fraction f). Schaum's RX expression would now be given as:

� � � � � �17T

Schaum f f fRX x m x m�� � �� � �

Several questions arise with these algorithms which are worthwhile investigating: 1. Is the combination covariance matrix actually better

than selecting one of the segment covariance matrices or, perhaps, just using the global covariance matrix?

2. Is the weighted segment average actually better than using the local eight-neighbor mean or, perhaps, just the global mean?

3. How should the value of f be selected: by evaluating the central pixel or by evaluating the average of the surrounding eight neighbors? Note that if the target is present in the center pixel, it will affect the value of f. (We assume in all of our analyses that the target is only present in one central pixel; in actual implementation a null area would be constructed which would be defined as neither target nor background). It is the purpose of this paper to try to use our analysis

tools to answer these questions.

2. ANALYSIS METRIC

In our analysis (as extensively explained in Ref. 2), we calculate the scores for each pixel under two conditions: 1. there is no target present in the pixel and 2. a target signature t has been implanted in the pixel (with amplitude factor p, in this case p=0.007). When all the pixel values are taken together, this produces two histograms: a histogram distribution for the cube when no target is present and a distribution when the target is present in each pixel, sequentially. The common method to compare between two

different algorithms is by examining their respective ROC curves. The ROC curve presents the relationship between the probability for true target detection to the probability of false alarm detection. A reasonable single value quantitative evaluation of the ROC curve can be done by summing the area below each ROC Curve. A larger area indicates a more efficient algorithm, which means better target detection. See Ref 2 for details.

3. COMPARING GLOBAL ALGORITHMS

Let us start by examining a cube of a fairly simple area. Fig 1, the left side shows the segmentation of the cube into two areas. The right side shows the values of f calculated for each pixel. The degree that there is a transition area on either side of the segment line is clear.

Figure 1: On the left side there is a K-Mean segmentation method of the hyperspectral image. In the

right side there is a visual representation of f for all pixels in the image

We now will compare three algorithms: 1. Global RX, where the mean and the covariance is

calculated by using all the pixels in the image (Equation 1).

2. Global SRX, where the mean and the covariance matrix come from the segment to which the surrounding pixels are associated (see Ref. 3):

3. Schaum's algorithm, where the mean is a combination of the segments' means. See above (Equations 6 , 7).

Fig. 2: ROC curves for comparing the original Schaum algorithm to two global algorithms.

The conclusion on this cube (and on other cubes that we tested) were as follows: 1. The higher number of clusters used, the better were the

results; No optimum limit for the number of clusters was found. There is, of course, a limit on the minimum number of pixels we need in the cluster to establish a viable and invertible covariance matrix.

2. The algorithm proposed by Schaum was far-superior to the standard RX algorithm and considerably better than the SRX algorithm.

4. LOCAL MEAN

The previous results were based on the assumption that either a global or segment mean should be used as an estimate of the pixel background. At this point, we implemented the above algorithms, replacing in the Global RX algorithm and in the segmented algorithm the global estimate with the local m8 estimate. The algorithms are: � Local RX : (Eq 2) � Local SRX : (Eq 4)

� GSS-RX :

� � � �� � � �

1Schaum

1

(8)T

f f f

T

f f ff

RX x m x m

f Min x m x m

� � �� � �

� � �� � �� � �The ROC curves that were calculated:

Fig.3: ROC curves for comparing the original Schaum

algorithm to two local algorithms.

The Schaum algorithm now shows some serious weaknesses compared to the Standard and Segmented RX algorithms.

In the implementation of the Schaum algorithm, we need to find the minimum of the algorithm for all possible f . Two possible problems exist: first, if the pixel itself is used to estimate f, the presence of the target in the

pixel could change the position of our local estimate. This will affect both the weighting of the covariance matrices and the estimate of the background.

Second, the use of the segment averages, or even weighted sums of the segment averages, as good estimates of the background at the suspect pixel is itself questionable. There is a considerable amount of variation of background values within each segment; the local correlation of spatial values encourages us to use only the local pixels for such an estimate.

5. VARIATIONS OF THE SCHAUM ALGORITHM

Several possible changes to the Schaum algorithm can be suggested. First, the value of f should be calculated not by comparing the segment averages to the central pixel but rather by comparing the segment averages to the surroundings of the central pixel. Second, we suggest that the mean used in the Schaum algorithm may be taken directly from the neighboring pixels and not from the segmented means.

Let us examine each change separately and compare the results to those from the original Schaum's algorithm.

Starting with the original Schaum's algorithm (Eq 8),the first improvement should be used during the procedure of finding the optimum f : instead of using the pixel itself

� �fx m� , the local mean � �8 fm m� will be used, to reduce the

possible influence of the target on the f selection:

� � � �� � � �

1Improved 1

18 8

(9)T

f f f

T

f f ff

RX x m x m

f Min m m m m

� � �� � �

� � �� � �� � �The second improvement takes place in the phase of the

final calculation of the algorithm. Instead of using � �fx m� ,

the local mean 8( )x m� will be used as a better approximation of the possible presence of the target:

� � � �

� � � �

1Improved 2 8 8

1

(10) Tf

T

f f ff

RX x m x m

f Min x m x m

� � �� � �

� � �� � �� � �

Figure 4: Comparison of the ROC corves of Schaum algorithm, the improved algorithms and the segmented RX

It is easy to conclude from the graphs that each one of the improvements individually has better performances than the original algorithm. In particular, the use of the local mean had a major effect; the use of the surrounding pixels for selecting f showed a minor improvement. The algorithm now approaches the results given in Ref. 3 for the SRXLocal algorithm.

6. CONCLUSIONS

Since each hyperspectral cube has a different number of bands and pixels; the results can be quite different from one cube to the next. Nevertheless, there are certain definite trends in the data, based on the cube presented in this paper and on other datasets. 1. From the comparison between global (mean of all

picture/segment) RX and SRX with Schaum's algorithm, the latter gives the best performances.

2. From the comparison between local (mean of eight nearest neighbors) RX and SRX and Schaum's algorithm, the latter gives the worst performances.

3. Naturally, as there are more segments in the image, the detection ability of the algorithms using segmentation will be improved significantly. (In this paper, RX is the only algorithm we tested that doesn't use segmentation). However, the number of segments is limited by the ratio between number of spectral channels and number of pixels.

4. In all cases, our improvements of the Schaum's algorithm give significantly better performances than the original one.

7. REFERENCES

[1] A. Schaum, “A remedy for nonstationarity in background transition regions for real time hyperspectral detection” 2006 IEEE Aerospace Conference, p. 9 (2006)

[2] Charlene E. Caefer, Marcus S. Stefanou, Eric D. Nielsen, Anthony P. Rizzuto, Ori Raviv, and Stanley R. Rotman, “Analysis of false alarm distributions in the development and evaluation of hyperspectral point target detection algorithms”, Opt. Eng. 46, 076402 (2007)

[3] Charlene E. Caefer, Jerry Silverman, Oded Orthal, Dani Antonelli, Yaron Sharoni, and Stanley R. Rotman, “Improved covariance matrices for point target detection in hyperspectral data”, Opt. Eng. 47, 076402 (2008).