Satellite Image Compositing and Mosaicking: Creating Cloud-Free Views from Multiple Scenes
Quick Answer: Individual satellite scenes contain clouds, shadows, haze, and sensor artifacts. Compositing combines multiple observations of the same area over a time window to produce a clean, cloud-free result. The median composite (pixel-wise median across dates) is the most common approach — it removes clouds and outliers automatically. Alternatives include medoid (selects the actual observation closest to the median, preserving spectral consistency), best-pixel (selects the least-cloudy observation per pixel), and harmonic fitting (models seasonal variation to predict cloud-free values). Compositing period affects the result: shorter periods (weekly) capture rapid changes but may retain clouds; longer periods (seasonal) are cloud-free but blur temporal dynamics. Mosaicking extends compositing spatially, stitching adjacent scenes into seamless large-area coverages.
No single satellite image is perfect. Clouds cover roughly 67% of the Earth's surface at any given time. Cloud shadows darken the ground beneath. Thin cirrus introduces haze. Sensor anomalies create stripe artifacts. The probability that any particular pixel is cloud-free on any particular date is often less than 50% in tropical and maritime regions.
Compositing solves this problem by combining multiple observations over time, selecting or calculating the best representation of the surface for each pixel. It's the technique that makes "cloud-free" satellite maps possible — from basemaps to annual land cover classifications.
Why Compositing Is Necessary
The Cloud Problem
For Sentinel-2 at 5-day revisit:
- Tropical humid regions: Only 10-30% of observations are cloud-free. A pixel may get 10-20 usable observations per year.
- Mediterranean/arid: 60-80% clear. 50-70 usable observations per year.
- Mid-latitude temperate: 30-50% clear during growing season. 15-30 usable observations.
Without compositing, any single-date map has gaps wherever clouds were present — which for many regions means more gaps than data.
Other Contamination
Beyond clouds:
- Cloud shadows: Dark areas on the ground beneath clouds. Often misclassified as water or dark vegetation.
- Cirrus and thin clouds: Semi-transparent clouds that reduce contrast and shift spectral values.
- Snow/ice: Seasonal coverage that obscures the land surface.
- Sensor artifacts: Occasional bad pixels, striping, or radiometric anomalies.
- Sun glint: Specular reflection from water surfaces at certain sun-sensor geometries.
Compositing Methods
Pixel-Wise Median
The most widely used approach:
For each pixel location, collect all observations within the compositing window (e.g., one month, one season), mask out clouds and shadows using quality flags, and compute the median value across the remaining observations — independently for each spectral band.
Why median works: The median is resistant to outliers. A cloud (very bright, spectrally different) or shadow (very dark) will be an outlier relative to the cloud-free observations and will be excluded by the median operation.
Limitation: The median computes each band independently, so the resulting composite pixel may combine the red value from one date with the green value from another date. This creates a "synthetic" observation that never actually occurred — potentially producing unrealistic band combinations.
Medoid Composite
Addresses the median's spectral inconsistency problem:
- Compute the median across all bands (as above)
- For each pixel, find the actual observation (date) that is closest to the median in multi-dimensional spectral space
- Use all bands from that single observation
The result: every pixel in the composite is an actual observation, preserving spectral consistency across bands. The medoid approach is used in the Landsat science products and is increasingly preferred for analysis applications.
Best Available Pixel (BAP)
Selects the single "best" observation per pixel based on a scoring function:
Scoring criteria (weighted combination):
- Cloud/shadow distance (farther from detected clouds = higher score)
- Day-of-year proximity to target date (closer = higher score)
- Sensor quality (clear observation = high; haze = medium; cloud edge = low)
- Sun/view angle (nadir-like geometry preferred)
Result: Each pixel comes from one actual observation, scored as the best available. Temporal consistency within the composite is not guaranteed (adjacent pixels may come from different dates).
Harmonic Fitting
Models the seasonal reflectance cycle:
- Fit a harmonic function (Fourier series) to the time series of cloud-free observations
- Predict the reflectance at any desired date from the fitted model
- The prediction is inherently cloud-free (the model ignores cloudy observations)
Advantage: Produces composites for any target date, including dates with no cloud-free observation. Captures seasonal dynamics smoothly.
Limitation: Assumes the seasonal pattern is predictable from the harmonic model. Sudden changes (harvest, fire, flood) that don't fit the harmonic pattern are smoothed out.
Maximum NDVI Composite (MVC)
A classic method used since the AVHRR era:
For each pixel, select the observation with the maximum NDVI value within the compositing window. The rationale: clouds and atmospheric contamination reduce NDVI, so the maximum NDVI is most likely to represent the clearest observation.
Limitation: Biased toward overestimating vegetation greenness. Does not work well for non-vegetated surfaces. Largely superseded by quality-flag-based methods.
Compositing Period
The choice of temporal window involves a trade-off:
Short Period (Weekly to Biweekly)
- Advantage: Captures rapid changes (crop growth, flooding, fire)
- Disadvantage: May not have enough cloud-free observations to produce a complete composite, especially in cloudy regions
- Use case: Operational monitoring, near-real-time applications
Medium Period (Monthly)
- Advantage: Good balance between temporal resolution and completeness
- Disadvantage: May blur events shorter than one month
- Use case: Monthly vegetation monitoring, water extent mapping
Long Period (Seasonal to Annual)
- Advantage: Nearly complete spatial coverage (enough observations to fill gaps)
- Disadvantage: Temporal variation within the period is lost. A "summer" composite doesn't distinguish June from August.
- Use case: Annual land cover maps, basemap generation
Spatial Mosaicking
Compositing operates in the temporal dimension (multiple dates for one area). Mosaicking operates in the spatial dimension (adjacent areas combined into one seamless product).
Challenge: Seam Lines
Adjacent satellite scenes acquired on different dates have different:
- Atmospheric conditions (brightness, haze)
- Sun angles (shadow direction, illumination)
- Phenological state (vegetation growth stage)
Simple edge-to-edge mosaicking creates visible seam lines at scene boundaries.
Solutions
Radiometric normalization: Adjust brightness and contrast of overlapping scenes to match in the overlap zone.
Feathering/blending: Gradually transition between scenes in the overlap area (weighted average that transitions from 100% scene A to 100% scene B across the overlap).
Temporal compositing first: If you temporally composite each scene location first (producing cloud-free composites), then mosaic the composites, seam lines are reduced because each composite represents a similar time period's average condition.
Global composites: Products like Sentinel-2 Global Mosaic (S2GM) and Google Earth Engine mosaics apply these techniques at planetary scale to produce seamless global imagery.
Quality Metrics
Good composites include quality information:
Observation count: Number of cloud-free observations used per pixel. Low counts indicate less reliable composite values.
Date of observation: For best-pixel and medoid composites, which date was selected for each pixel. Important for phenological interpretation.
Quality flags: Per-pixel indicators of potential issues (residual cloud, snow, shadow, atmospheric correction quality).
Temporal range: The spread of dates contributing to each pixel. A pixel composed from observations spanning 3 months has different temporal meaning than one from observations spanning 1 week.
Practical Considerations
Cloud masking quality: Compositing quality depends entirely on how well clouds and shadows are masked. Aggressive masking (removing anything suspicious) produces cleaner composites but fewer observations. Conservative masking retains more observations but may include residual contamination.
Terrain shadow: In mountainous areas, topographic shadows are persistent (same time of day, same geometry). These are not clouds but may be mishandled by compositing algorithms that expect shadow to be transient.
Water surfaces: Water reflectance varies naturally with wind, turbidity, and sun angle. Compositing water pixels requires different approaches than land pixels — median compositing may produce unrealistic water reflectance.
Urban areas: Built surfaces are relatively stable spectrally, making compositing straightforward. But construction changes within the compositing window will be smoothed out.
Compositing is one of those techniques that seems simple (just take the median!) but involves numerous subtleties that affect the quality and interpretability of the result. Understanding what your composite actually represents — temporally, spectrally, and in terms of quality — is essential for using it correctly in subsequent analysis.
