Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Simpler, non-deep-learning approaches to detecting change

You now know what makes two images comparable. This page uses two Landsat scenes over Knoxville, Tennessee, to run the simplest change detection methods available: subtracting pixel values, and comparing multi-band change vectors. Both work without any labeled training data, which makes them a useful baseline before the deep learning workflow later in this lesson.


1. Motivation

Not every project has, or needs, a trained deep learning model. Traditional methods are fast, fully interpretable (you can explain exactly why a pixel was flagged), and often good enough for a first look at a study area, or for projects where labeled training data simply is not available.


2. Core idea

Both methods treat every pixel independently: they compare spectral values between two dates and flag pixels whose difference exceeds a threshold. This makes them simple and transparent, but it also means they have no way to use spatial context, a limitation the next page’s deep learning approach addresses directly.


3. Workflow

A. Download and read two-date imagery

This is a Landsat scene from two different years over the same area. Reading the same band from both dates, here near-infrared (NIR), is the starting point for image differencing, since NIR reflectance is particularly sensitive to changes in vegetation and built structures.

B. Image differencing

Image differencing subtracts one date’s pixel values from the other’s, then thresholds the result.

Pixels with large absolute differences (positive or negative) are classified as changed; everything else is left as unchanged. This is the simplest possible change detection method, and it is worth visualizing all three pieces together: the raw difference, its histogram, and the resulting mask.

C. Change Vector Analysis

Change Vector Analysis (CVA) extends the same idea to multiple bands at once. Instead of one difference value per pixel, each pixel becomes a vector in multi-band spectral space, with a magnitude (how much it changed) and a direction (what kind of change it likely represents).

The direction component is what makes CVA more informative than single-band differencing: a transition from vegetation to bare soil produces a change vector pointing in a characteristic direction (rising red reflectance, falling NIR), which means you can begin to distinguish kinds of change from the vector direction, without needing any labeled training examples.

D. Choosing a threshold

Both methods depend entirely on the threshold you choose. A threshold that is too low floods the result with noise; one that is too high misses real changes. Common strategies include a fixed number of standard deviations (as used above), a percentile cutoff, automatic methods like Otsu’s thresholding, or empirical tuning against a small number of known change locations.


4. Python reactivation

np.std(diff) and np.percentile(magnitude, 95) are the same summary-statistics functions you have used on raster arrays throughout this course, applied here directly as thresholding rules. np.arctan2(delta_nir, delta_red) computes an angle from two components, the standard way to get a direction from a two-dimensional vector, and np.degrees() converts the result from radians to degrees for easier interpretation.


5. Common pitfalls


6. Mini task

Using the image-differencing output above, what would happen to change_mask.sum() if you changed the threshold from 2 * np.std(diff) to 1 * np.std(diff)? Reason through the direction of the change before checking.

Sample solution

Lowering the threshold from 2 standard deviations to 1 makes the criterion for “changed” easier to satisfy, so change_mask.sum() should increase substantially, since more pixels with moderate differences will now exceed the lower bar. This would likely include more genuine changes, but also more noise-driven false positives, exactly the threshold trade-off described in step D.


7. Key takeaways

Further reading