Janus / Guides / CCDC

Change detection · every Landsat observation

CCDC, step by step.

CCDC models every band of every clear Landsat observation with a trend and the seasons, and starts a new model when the land stops looking like the old one. In Janus you see those models over a pixel's series, map the dates and sizes of the breaks, and predict the image of a date the clouds hid.

01The idea

CCDC (Continuous Change Detection and Classification, Zhu & Woodcock 2014) fits, for each band, a model made of a straight trend plus up to three harmonics of the year: the seasons. It starts on the first clear observations, then compares each new one with what the model predicts. When six observations in a row fall too far from it, over the green to SWIR2 bands together, that is a break: the model ends and a new one starts after it. A single odd observation (a cloud the mask missed) is an outlier, not a change.

Segment
A period with one model: the land as it was between two breaks.
Break
The date a segment ends because the observations stopped fitting it.
Magnitude
The jump between the model before and the model after, at the break, over the green to SWIR2 bands (reflectance × 10000).

CCDC works on surface reflectance, with every date a file of six bands (blue, green, red, NIR, SWIR1, SWIR2, and optionally thermal), and on real dates: every observation counts, not composites. It needs at least four observations a year and 24 in all.

02The example

125 Landsat 8 and 9 observations, February 2020 to August 2026, of a 30 × 30 km area of central Rondônia (the same landscape as the LandTrendr guide), as Collection 2 Level-2 surface reflectance with the QA_PIXEL band. Each date is a GeoTIFF of seven bands named Blue, Green, Red, NIR, SWIR1, SWIR2 and QA_PIXEL.

The Janus window: the last date of the series in SWIR1, NIR and red, forest in green and pasture in pink, three pins, and their NDVI series on the chart with many gaps.
The series in SWIR1 / NIR / red (forest green, pasture pink), the chart in NDVI. The gaps are the dates the clouds hid.

To open it: the folder with File → Open folder..., then, in the Display panel, NIR as the band and red for the normalized difference (the chart shows the NDVI), and SWIR1 / NIR / red as an RGB composite for the map.

Collection 2 digital numbers

Landsat Collection 2 Level-2 values are digital numbers: reflectance is DN × 0.0000275 − 0.2. CCDC detects them and converts them (Reflectance units), but an NDVI computed on the DNs themselves is wrong, because of the offset. Set the scale and offset in the files (GDAL's band scale and offset; Janus applies them), or export reflectance.

03Clouds and the quality band

CCDC needs to know which observations are clear. Janus finds a band named QA_PIXEL (or Fmask) and reads its bits: clouds, their shadows, cirrus and fill become unusable observations, on the chart (gaps) and for every tool. It is set in the Display panel, under Quality band, with the rule that reads it (Landsat C2 QA_PIXEL bits, Fmask codes...).

In this stack, as in most exports from Google Earth Engine, cloudy pixels were already masked to no data. Of 125 dates, a pixel typically has about 60 clear ones, nearly all from May to October: the dry season.

Masked dates are still observations

The original CCDC skips the pixels where fewer than half of the dates exist, a rule meant for the edges of a Landsat scene. A date masked to no data is an observation the clouds spoiled, not a missing one, and Janus passes it to CCDC as such: otherwise every pixel of a stack like this one, cloudier than clear, would get no model at all.

04The tool's window

Tools → Change detection → CCDC. Its window starts with the Bands: which band of each date plays each role. Janus guesses them from the band names (NIR, SWIR1, SR_B5...), and stacks of six or more unnamed bands are taken as blue to SWIR2; change any of them in the lists. The quality band in use is named under them.

ParameterDefaultWhat it does
Reflectance unitsautoCCDC's thresholds are in reflectance × 10000. Automatic: values with a median up to 2 are reflectance 0–1, above 6500 Collection 2 digital numbers.
Consecutive anomalies6Clear observations in a row beyond the threshold that make a break. Fewer: faster but more false breaks.
Change probability0.99The chi-square probability of the change threshold over the detection bands.
Outlier probability0.999999Above it, a single observation is an outlier, not change.
Max coefficients8The richest model: 4 (trend and one harmonic), 6 (two) or 8 (three). With few observations CCDC uses fewer by itself.
Max segments8Segments kept per pixel.

05On the chart

With Fit the cursor, pins and ROI series on, each segment is drawn over the series, in what the layer shows (here the NDVI computed from the models' red and NIR), with a vertical line at each break.

CCDC's window with its bands and parameters; on the chart the NDVI of the cleared pixel, CCDC's segments in magenta and breaks as vertical lines; the Statistics table with the segments and the break.
The forest cleared in 2022. Three segments; the first break, on 25 June 2022, is the clearing.
The chart: forest NDVI near 0.9 in 2020, a break in mid 2022, a low flat pasture segment until 2024, then a segment with wide seasonal swings.
The segments, each with its seasons.
The Statistics table: 3 segments, 61 observations of which 58 clear, units reflectance 0 to 1, segment 1 from 2020-05-26 to 2021-08-01 and a break on 2022-06-25 of magnitude 2393.
Its numbers: each segment, its clear observations and its break.

The forest's segment ends with a break on 25 June 2022, a jump of 2393 in reflectance and an NDVI change of −0.69: the clearing. A second break comes in April 2024, an NDVI change of +0.70. It is not regrowth: until 2024 every clear observation of the pasture was from the dry season, and the first ones of the rainy season, when the pasture is green, did not fit a model that had never seen them.

Seasons need observations all year

The harmonics describe the seasons only where there are observations. With clear dates only from May to October, the curve between November and April is a guess, and it can swing far (the last segment above). Read breaks next to a change of the observations' season with care, and prefer fewer coefficients when the series has a long cloudy season.

On the forest opened in 2021, partly back since, CCDC also breaks in 2022, into a model that stays between forest and pasture:

The chart of the opened forest: a forest segment until 2021, a break in 2022 and a segment oscillating between 0.45 and 0.65.
An opened forest. After the 2022 break, the NDVI stays between forest and pasture.

06Running it

CCDC is the slowest of the tools: here about half a minute for the whole area, 1.2 million pixels, on every core. Zoom in on what you want to see and run it on the Visible area (or on the ROI) first, then on the whole image once the parameters are right. The run of these screenshots, 261 × 196 pixels around the clearing, took 12 s.

07The maps

The date of the largest break over the visible area, from 2022 in dark blue to 2026 in yellow, over the fields; forest without breaks shows through in green.
Largest break date, 2022 (dark) to 2026 (yellow). The cleared fields of 2022 stand out as blocks; forest without breaks shows through.
The magnitude of the largest break over the same area, highest in the field cleared in 2022.
Largest break magnitude (reflectance × 10000): the clearing of 2022 is the largest.
MapMeaning
BreaksHow many breaks the pixel has.
Largest break dateThe date of the break with the largest magnitude (decimal year).
Largest break magnitudeIts jump over the green to SWIR2 bands, reflectance × 10000.
NDVI change at largest breakThe NDVI after it minus before it, from the models: negative is loss.
First / last break dateThe earliest and the latest break.
SegmentsHow many models the pixel has.

The NDVI change tells the direction the magnitude does not: a map of it with a threshold (below −0.3, say) keeps the losses and drops the seasonal artefacts and the regrowth.

08A synthetic image

The models describe every band on every day of each segment, so they can give the image of a date that has no observation, or a cloudy one. Tools → Change detection → CCDC synthetic image runs CCDC and predicts the date in Date (a decimal year; 0 follows the date on the map): every band, in the series' units, and what the layer shows.

The observed image of 16 January 2025: entirely covered by cloud.
Observed, 16 January 2025: clouds.
The synthetic NDVI of the same date predicted by CCDC: fields and forest without clouds, with some fields in saturated yellow.
Synthetic NDVI of the same date, from the models.

The fields and the forest are back; the saturated yellow fields are the caveat above at work: January is in the rainy season, where these models have no observation, and some of their curves overshoot.

09What next

  • Degradation apart from clearing: CODED works on the same kind of series, with the NDFI.
  • Validate the dates: the largest break date is a map of events; see the Validation guide.
  • Compare with LandTrendr or BFAST: Tools → Change detection → Agreement of change maps.
  • Script it: zeit.ccdc and zeit.predict_synthetic_image in Python.

10References

  • Zhu, Z., Woodcock, C. E. (2014). Continuous change detection and classification of land cover using all available Landsat data. Remote Sensing of Environment, 144, 152–171.
  • Zhu, Z., Woodcock, C. E., Holden, C., Yang, Z. (2015). Generating synthetic Landsat images based on all available Landsat data: predicting Landsat surface reflectance at any given time. Remote Sensing of Environment, 162, 67–83.
  • Zeit: its CCDC is a port of the original MATLAB code.