Find the mechanism before the formula
A target spectrum can be close to a pixel in ordinary Euclidean distance and still be unconvincing if the difference lies along a background direction that varies all the time. Covariance-aware detectors ask a sharper question: does the pixel point toward the target after ordinary background variation has been discounted?
We will derive matched-filter and adaptive coherence estimator scores in whitened space, calculate a small example, and show why covariance estimation and regularisation often matter more than the final dot product.
This guide belongs to the Gold Standard of Remote Sensing, the Gold Standard of Education and the How X Works hub.
Choose a reading route
Start with the question closest to the decision you need to make. Every route returns to the same worked evidence and transfer checks.
| Route | Chapters | Use it when |
|---|---|---|
| 1 | 1–3 | You need the detection problem, centring and whitening. |
| 2 | 4–5 | You want MF and ACE formulas with a worked calculation. |
| 3 | 6–8 | You need covariance regularisation and a brightness transfer test. |
| 4 | 9–10 | You must control contamination, thresholds and misconceptions. |
| 5 | 11–12 | You want FAQs and a deployment evidence checklist. |
Chapter contents
Open the group you need, then use the chapter links. Teaching sections remain open on the page.
Build the model
Test the mechanism
1. Detection begins with two hypotheses
For a pixel spectrum y, a simple background hypothesis is H₀: y=μ+n. A target-present model is H₁: y=μ+a t+n, where μ is the background mean, t is a target direction, a is an unknown amplitude and n has covariance C.
The model is deliberately local. μ and C should describe the background that competes with the target in the scene. If training pixels mix water, vegetation, cloud and shadow indiscriminately, the covariance can describe scene geography instead of the detection problem.
- Record whether t is laboratory, field or image-derived.
- Keep radiance, reflectance and atmospheric-processing levels consistent.
- Separate target-free background training from pixels under test.
2. Centre the pixel and target on the same background
Define x=y−μ. A target signature may also be expressed relative to the same background mean, depending on the detector convention. The subtraction is not cosmetic: it turns absolute brightness into a departure from the estimated background.
Using different means for the pixel and target changes the direction being tested. Local means can adapt to spatial variation, but windows that include the target can subtract away part of the signal. Global means are stable but may be unrepresentative.
Every saved score should therefore be tied to the mean estimator, training mask and processing level that produced it.
3. Whitening changes the geometry
If C is positive definite, transform spectra with C−1/2. In whitened coordinates, a direction with large natural background variance is compressed, while a stable direction is retained. The Mahalanobis inner product uᵀC−1v is simply a Euclidean dot product after whitening.
This explains the detector more clearly than “invert the covariance”. The inverse is a geometry: it decides which spectral departures are surprising relative to the trained background.
| Background direction | Variance | Whitening effect |
|---|---|---|
| Common illumination drift | Large | Down-weighted |
| Stable absorption feature | Small | Up-weighted |
| Untrained artefact | Unknown | Potentially misleading |
4. Matched filtering estimates target amplitude
With centred target t and pixel x, a common covariance-normalised matched-filter score is MF=(tᵀC−1x)/(tᵀC−1t). It is the least-squares amplitude of t in whitened space.
MF keeps amplitude information. Doubling x along the same whitened direction doubles the score. That is helpful when abundance or strength matters, but it makes thresholds sensitive to scale, calibration and illumination assumptions.
Sign also matters. A negative score points opposite the target direction. Some implementations use related adaptive matched-filter statistics with different normalisation, so formulas and software names must be recorded, not inferred.
5. ACE measures whitened directional coherence
A common squared adaptive coherence estimator is ACE=(tᵀC−1x)²/[(tᵀC−1t)(xᵀC−1x)]. It is the squared cosine between whitened target and pixel vectors, normally between zero and one when the denominator is positive.
Use C=diag(4,1), t=(2,1) and x=(1,1). Then tᵀC−1x=1.5, tᵀC−1t=2 and xᵀC−1x=1.25. MF=0.75 and ACE=2.25/(2×1.25)=0.90.
| Quantity | Value |
|---|---|
| Whitened cross-product | 1.50 |
| Target energy | 2.00 |
| Pixel energy | 1.25 |
| Matched-filter amplitude | 0.75 |
| Squared ACE | 0.90 |
6. Sample covariance can be the weak link
With B bands and only K background pixels, the sample covariance has rank at most K−1 after centring. When K is not comfortably larger than B, inversion becomes singular or unstable. Highly correlated bands create the same numerical problem even with more samples.
Diagonal loading uses Cλ=C+λI. Shrinkage can use Cα=(1−α)C+ατI, with τ representing an average variance. These methods trade variance for bias and make the inverse less dominated by tiny estimated eigenvalues.
- Choose λ or α by a declared rule, not by maximising the test scene result.
- Standardise units before isotropic loading.
- Retain eigenvalues or a condition number before and after regularisation.
- Use spatial exclusion zones so target leakage does not train the background.
7. Local and global covariance answer different questions
A global covariance is stable and cheap, but it can merge distinct materials and illumination regimes. A local covariance adapts to the neighbourhood, but small windows reduce sample support and can be contaminated by the target or its halo.
A practical detector may segment the scene, use guard cells around the test pixel, pool similar backgrounds, or combine local covariance with shrinkage toward a global estimate. Those are modelling decisions, not neutral preprocessing.
Validate them by geography: split training and test areas so neighbouring pixels from the same object do not appear on both sides of the evaluation.
8. Transfer check: double brightness without rotating
Keep C and t fixed but change x from (1,1) to (2,2). MF doubles from 0.75 to 1.50 because it estimates amplitude. ACE remains 0.90 because both its numerator and pixel-energy denominator scale quadratically.
That invariance is the reason ACE is useful when target strength is unknown. It is also a limit: two pixels with very different target abundance can receive the same ACE if their whitened directions match.
Now change the direction instead of scale—for example x=(1,−1). The cross-product becomes −0.5 and squared ACE falls to 0.10. Direction, not raw brightness, controls the coherence score.
9. A score is not a probability
MF and ACE outputs are detection statistics. A score of 0.90 is not automatically a 90% probability of target presence. Thresholds depend on the null distribution, covariance estimation, number of tests, spatial dependence and the costs of misses and false alarms.
Report receiver-operating-characteristic or precision–recall behaviour on held-out labelled data. When labels are scarce, inject physically plausible targets only with a transparent mixing model and verify on real examples where possible.
Spatial filtering can improve map readability but changes the event definition. Evaluate both pixel-level and object-level performance when the intended decision is about objects.
10. Limits and misconceptions
- ACE is scale invariant, not atmosphere invariant; atmospheric correction can rotate spectra.
- Covariance regularisation does not repair a contaminated background mask.
- A high-dimensional inverse can fit noise even when it returns a number.
- Squaring ACE removes sign; use a signed convention if opposite directions matter.
- Matched filtering does not prove material identity; it tests a specified spectral model.
- A target library collected on one sensor may need spectral response convolution before use on another.
The safe claim is conditional: the pixel is coherent with this target direction relative to this trained background geometry.
11. Frequently asked questions
Why does ACE often use a squared score?
The squared cosine removes unknown amplitude sign and follows a common invariant detection formulation. Some implementations expose signed or unsquared variants, so confirm the convention.
How many background pixels are enough?
There is no universal count. It depends on band dimension, correlation, regularisation and background heterogeneity. Rank and held-out stability are more informative than a fixed rule.
Should bad bands be removed before covariance estimation?
Yes, when a band is known to be dominated by noise or absorption. The same band mask and spectral response must be applied to target and image.
12. A reproducible detector checklist
| Stage | Record |
|---|---|
| Spectra | Units, band centres, response functions and bad-band mask |
| Background | Mean, covariance, mask and guard region |
| Regularisation | Method, parameter and condition number |
| Statistic | Exact MF or ACE formula and sign convention |
| Threshold | Validation set, event definition and operating point |
| Transfer | Brightness, region and sensor-change checks |
The gold standard is a detector whose geometry is visible: centred spectra, a defensible background covariance, stable inversion, a worked score and a threshold validated away from the pixels that trained it.
Reading routes · Previous chapter · Contents · Continue reading
Continue through the Gold Standard ecosystem
Return to the Gold Standard of Remote Sensing, the Gold Standard of Education parent, or the How X Works hub.
Read next in this subject
- Linear Spectral Unmixing, Endmember Variability and Abundance Constraints
- Spectral Response Convolution, Bandpass Mismatch and Cross-Sensor Harmonisation
- Detector Cross-Talk, Spectral Smile and Band-to-Band Registration
- Detector Saturation, Blooming and Nonlinear Radiometric Response
