Cloud shadows in multispectral satellite imagery: correction before pansharpening
Updated:
Cloud shadows in a satellite image are best corrected on the original multispectral image (MSS), in linear values and before pansharpening, and the orthomosaic is built only after that. On a high-resolution image (PAN 0.5 m, MSS 2 m, four bands) with cloud shadows over mountain forest, the brightness step at the shadow edge fell from −0.67 to +0.01 (target 0), the color shift at the shadow edge (blue to green) from +0.53 to 0.00, and the brightness non-uniformity across the image from 0.76 to 0.51 stops. The geometry is preserved: the orthomosaic built from the corrected MSS matches the original orthomosaic (built by the imagery provider’s software) in position, with a median offset of 0.2 m. For comparison, the shadows were also corrected on the finished orthomosaic. The correction is computed by Fastvideo software.

Key points
- Shadows are easiest to correct on the original MSS. Its values are linear, its color is the one the satellite measured, and all four bands, including near infrared (NIR), have not yet been mixed by pansharpening.
- The PAN needs correction if pansharpening takes brightness from it. Here pansharpening was done with a multiplicative method: the shadows stay in the PAN, but with this method they cancel out, and the final orthomosaic has no shadows without any PAN correction. If the pansharpening software also takes brightness from the PAN, the PAN must be corrected with the same factor as the MSS.
- The geometry does not change. Only brightness values change: the corrected MSS keeps its size and its RPC model.
- One image is enough. The correction is computed from the image itself: there was no elevation model, no other images of the same place and no ground control points.
- There is no data under dense clouds. Such areas stay clouds: they can only be replaced with another image of the same place, not painted in.
- Quality is measured with numbers over the whole image. GOST R 59328-2021 assesses shadows visually, so measures of the shadow edge, color, brightness non-uniformity, noise and sharpness were defined separately and checked on synthetic images with a known answer.
1. PAN, MSS and the orthomosaic
A high-resolution satellite captures the same place as two different images. The panchromatic image (PAN) is one wide band, a black-and-white image with a small pixel, here 0.5 m on the ground: individual tree crowns, paths and road edges are visible in it. The multispectral image (MSS) has four narrow bands: blue, green, red and near infrared. A narrow band collects less light, so the pixel is larger, 2 m. The MSS provides color, and NIR separates vegetation well from other surfaces.
The image is recorded not as a frame but line by line as the satellite flies. The PAN sensor line and the line of each MSS band sit side by side, so they see the same ground point at slightly different moments and from slightly different angles. In mountains this offset changes with elevation. Each image comes with an RPC model that converts the coordinates and elevation of a ground point into an image row and column.
To get an orthomosaic, three steps are needed:
- Orthorectification: move the PAN and the MSS onto the map grid using the RPC model and the terrain elevation.
- Co-registration: make the PAN and the MSS bands match pixel for pixel; otherwise colored fringes appear at edges.
- Pansharpening: take the color from the MSS and the fine detail from the PAN to get a color image with a 0.5 m pixel.
This is usually done by photogrammetry software. Cloud shadows can be corrected at two points in this chain: at the end, on the finished orthomosaic, or at the start, on the MSS before pansharpening. This article compares both options on one image.
The article continues the topic of brightness and color balancing of a series of aerial frames. There the same patch of ground is seen on several frames, in shadow and in sun. Here there is only one image, and everything the correction needs has to come from the image itself.
2. Why cloud shadows are hard to correct
- A shadow is not uniform. Clouds of different density cast shadows of different depth, from penumbra to deep shadow, and the boundaries are blurred.
- A shadow also changes color. In shadow mostly diffuse skylight remains, which has more blue and less red and infrared. So forest in shadow is not just dark but bluish gray, and the bands have to be corrected differently.
- A shadow is offset from its cloud. In this image the shadows lie about 2 km north of the clouds, and some shadows are cast by clouds outside the image.
- Deep shadow has little signal. The blue band there consists almost entirely of haze; brightening raises the noise and may produce colored blotches.
- Haze and veil. Haze lies over the whole image, and near cloud edges there is a semi-transparent veil; one point can be under both a shadow and a veil.
- Terrain. In mountains an elevation error shifts the ground point, so building one’s own orthomosaic that matches the original one without an elevation model is not easy.
3. Approach
For each point, the depth of the cloud shadow is determined from the image itself, using all four MSS bands at once; this is how a shadow is told apart from dark objects. Each band is then corrected in linear values according to its own dependence on shadow depth, so that an area in shadow gets the tone and color of the same kind of area in sun. The semi-transparent veil near cloud edges is reduced. Sunlit areas and dense clouds do not change.
Two options were compared:
- Correction of the finished orthomosaic: the same steps applied directly to the original orthomosaic, on the same grid and in the same format.
- MSS correction: the steps applied to the original MSS. The corrected MSS keeps its size and its RPC model. An orthomosaic is then built from the PAN and the corrected MSS on the grid of the original orthomosaic.
Each step was checked first on synthetic images with a known answer, then on fragments of the real image, and only then on the whole image.
3.1. Pansharpening and shadows
The shadows were corrected only in the MSS; they remained in the PAN. The orthomosaic from the corrected MSS was built with a multiplicative pansharpening method (SFIM type): each MSS band is multiplied by the ratio of the PAN to its smoothed copy. This ratio carries only fine detail: crowns, paths, edges. A cloud shadow is smooth and enters the PAN and its smoothed copy equally, so it cancels out in the ratio, and brightness and color come from the MSS. The final orthomosaic has no shadows even though the PAN was not corrected.
Methods that replace the image brightness with the PAN (PCA, HSV, Brovey, Gram-Schmidt) take brightness from the PAN together with its shadows; such methods were not used in this work. There are photogrammetry programs in which pansharpening of any type takes brightness from both the PAN and the MSS; then the PAN has to be corrected together with the MSS. It is enough to multiply the PAN by the same brightness correction as the MSS, resampled onto the PAN grid: no color is taken from the PAN, and the PAN geometry, like the MSS geometry, does not change.
Stereo pairs. Pansharpened images are used for stereo plotting, so the shadow correction is visible in stereo too. Both images of a stereo pair must be corrected the same way: the same ground must have the same brightness and color on both images after correction, otherwise the stereo view is tiring and falls apart. A fringe at the shadow edge and noise in deep shadow that differ between the two images look like false relief in stereo. The image in this article is a single image, not a stereo pair; a check on a stereo pair is still ahead.
4. Example: a satellite image with cloud shadows
4.1. Data
A level L1 image (not orthorectified) from a high-resolution satellite and the original orthomosaic built from it by the imagery provider’s software. There was no elevation model, no other images of the same place and no ground control points.
| Data | Size, pixels | Ground pixel | Bands | Notes |
|---|---|---|---|---|
| Panchromatic image (PAN) | 16,735 × 11,372 | ≈ 0.5 m | 1, 12 bits | RPC model |
| Multispectral image (MSS) | 4,167 × 2,831 | ≈ 2 m | blue, green, red, NIR; 12 bits | RPC model; bands co-registered to 0.5–0.8 pixel |
| Original orthomosaic (built by the imagery provider’s software) | 18,906 × 14,863 | 0.5 m | R, G, B, NIR; 16 bits (values 0–4095) | UTM projection |
- Capture conditions: early autumn, around local noon; sun elevation 40°, sun from the south; the satellite imaged almost at nadir.
- Clouds: cloud cover by metadata 30 %, dense clouds cover about 14 % of the area. The clouds are at about 1.8 km altitude, and their shadows are offset to the north by about 2 km.
- Terrain: mountains with elevations of 470–1,090 m, almost continuous forest with clearings, roads and glades; haze over the whole image and a veil near cloud edges.
- Main problem: on the original orthomosaic the forest in cloud shadows is almost black, with a bluish tint.
4.2. Geometry
The orthomosaic from the corrected MSS was built with the RPC models on the grid of the original orthomosaic; terrain elevations were recovered from the data itself. The positional offset from the original orthomosaic was measured on 913 cloud-free patches of 128 × 128 m across the whole image: median 0.2 m, 90th percentile 0.9 m. Correction of the finished orthomosaic does not change the geometry: the grid is the same.
4.3. Results
The table gives quality measures computed over the whole image, at the same places for all three options. The brightness step and the color shift at the shadow edge were measured on 54 thousand pairs of points of the same forest on both sides of the shadow boundary: how much the shadow side differs from the sunlit side, in stops per stop of shadow depth (a stop is a twofold change in brightness). Brightness non-uniformity is the spread of the mean brightness of 64 × 64 m patches, in stops; patches with clouds are excluded. Edge width was measured on about 1,250 edges of roads and forest margins in sun (the transition from 10 to 90 % of the step).
| Measure (what is better) | Original orthomosaic | Correction of finished orthomosaic | MSS correction, orthomosaic rebuilt |
|---|---|---|---|
| Brightness step at the shadow edge (target 0) | −0.67 | +0.03 | +0.01 |
| Color shift at the shadow edge, blue/green (target 0) | +0.53 | −0.04 | 0.00 |
| Brightness non-uniformity across the cloud-free image, stops (lower is more uniform) | 0.762 | 0.485 | 0.508 |
| Noise on flat areas, sun / shadow, % (lower is better) | 0.38 / 0.50 | 0.38 / 0.73 | 0.47 / 0.85 |
| Color blotches in deep shadow, color spread at a 1–4 m scale (lower is better) | 0.010 | 0.009 | 0.010 |
| Width of a sharp edge in sun, 0.5 m pixels (lower is sharper) | 2.02 | 2.06 | 2.37 |
| Positional offset from the original orthomosaic, median, m | — | 0 (same grid) | 0.2 |
| Contrast coefficient K per GOST R 59328-2021 cl. 10.4, R / G / B (norm 0.75–0.99) | 0.95 / 0.74 / 0.60 | 0.94 / 0.92 / 0.92 | 0.98 / 0.80 / 0.67 |
- Shadow boundary. In both options the shadow boundary stops being visible: the step at the shadow edge goes from −0.67 to +0.03 and +0.01, and the bluish tint of the shadow disappears. Brightness non-uniformity across the image falls by about one and a half times.
- Sunlit areas and clouds do not change. There is no data under dense clouds, and they remain.
- Noise. In former shadows the noise is higher than in sun: a weak signal is brightened together with its noise. The orthomosaic built from the corrected MSS also has higher noise in sun (0.47 % against 0.38 %).
- Sharpness. The orthomosaic from the corrected MSS is slightly softer than the original on sharp edges (2.37 against 2.02 pixels). The GOST sharpness requirement (edge width no more than 1.25 pixels) cannot be checked reliably on this scene: there are no straight high-contrast edges.
- Color range. In the original orthomosaic the contrast coefficient K of the blue and green bands is below the GOST norm (0.60 and 0.74); after correction it is higher: 0.92 and 0.92 with correction of the finished orthomosaic, 0.67 and 0.80 with MSS correction.
- Visual assessment. At a shadow edge in forest, correction of the finished orthomosaic leaves the shadow side slightly bluer, MSS correction leaves it more even. In deep shadow individual crowns, gaps and autumn trees become visible that were almost invisible on the original orthomosaic; roads, clearings and glades in shadow also get natural color.
There are no generally accepted numerical measures for cloud shadows: GOST R 59328-2021 assesses them visually. The measures of step, color, brightness non-uniformity, noise, color blotches and edge width were defined separately, and each was checked on synthetic images with a known answer.








5. Discussion and limitations
Both options remove the shadow boundary almost completely. MSS correction is better on the shadow edge and color, while correction of the finished orthomosaic is better on noise and sharpness, because it keeps its grid and its pansharpening. MSS correction gives one more result: a corrected MSS with the same geometry and RPC model. On this image correction of the finished orthomosaic also worked, because the original orthomosaic was built with a multiplicative method: its color matches the MSS to within a few units.
5.1. What needs more work
- Shadow under a semi-transparent cloud. Where one point has both a shadow and a veil, they cannot always be separated: the ground is brightened, but the veil rises with it and turns yellowish.
- The deepest shadow. There is little signal: brightened areas are slightly noisier than sunlit ones, and crown color there is flatter.
- Other scenes. The settings were tuned on one image, mostly forest; cities, fields and snow need checking.
- Dense clouds remain: they can only be removed with another image of the same place.


5.2. Next steps
- Checks on other scenes: cities, fields, snow.
- Separating shadow and veil where they lie at the same point.
- PAN correction with the same factor as the MSS, for software in which pansharpening takes brightness from the PAN.
- Stereo pairs: identical correction of both images and a check on the same ground in the left and right images.
- Computation speed: a C++ and CUDA version.
6. References
Pansharpening and its quality assessment
- Liu J.G. Smoothing Filter-based Intensity Modulation: a spectral preserve image fusion technique for improving spatial details. Int. J. Remote Sens. 21(18):3461–3472, 2000.
- Laben C.A., Brower B.V. Process for enhancing the spatial resolution of multispectral imagery using pan-sharpening. US Patent 6,011,875, 2000.
- Tu T.-M., Su S.-C., Shyu H.-C., Huang P.S. A new look at IHS-like image fusion methods. Information Fusion 2(3):177–186, 2001.
- Aiazzi B., Alparone L., Baronti S., Garzelli A., Selva M. MTF-tailored multiscale fusion of high-resolution MS and Pan imagery. Photogramm. Eng. Remote Sens. 72(5):591–596, 2006.
- Vivone G. et al. A Critical Comparison Among Pansharpening Algorithms. IEEE TGRS 53(5):2565–2586, 2015.
- Wald L., Ranchin T., Mangolini M. Fusion of satellite images of different spatial resolutions: assessing the quality of resulting images. Photogramm. Eng. Remote Sens. 63(6):691–699, 1997.
- Alparone L. et al. Multispectral and panchromatic data fusion assessment without reference. Photogramm. Eng. Remote Sens. 74(2):193–200, 2008.
Shadows and haze
- Richter R., Müller A. De-shadowing of satellite/airborne imagery. Int. J. Remote Sens. 26(15):3137–3148, 2005.
- Dare P.M. Shadow analysis in high-resolution satellite imagery of urban areas. Photogramm. Eng. Remote Sens. 71(2):169–177, 2005.
- Chavez P.S. An improved dark-object subtraction technique for atmospheric scattering correction of multispectral data. Remote Sens. Environ. 24:459–479, 1988. USGS
Quality requirements
- GOST R 59328-2021. Topographic aerial photography. Technical requirements (in Russian).


