RawSat: Cloud Shadow Removal and Satellite Image Correction Before Photogrammetry
RawSat removes cloud shadows, haze, detector striping, color fringes from chromatic aberration and blur from Earth observation (EO) satellite images. It works on the original Level 1 (L1) PAN and MSS images, before orthorectification and pansharpening, where these defects can be corrected most accurately. The output is the same files, in the same format and with the same RPC model, so your photogrammetry software handles them as usual. On a mountain forest scene with 30 % cloud cover, the brightness step at the shadow edge fell from −0.67 to zero.


Figure 1. The original Level 1 multispectral (MSS) image and the same image after RawSat: mountain forest and clearcuts under cloud shadows, 2.4 × 1.4 km, 2 m per pixel. Drag the slider to compare.
Why correct the image before pansharpening
A high-resolution satellite captures a scene with two sensors: panchromatic (PAN, about 0.5 m per pixel) and multispectral (MSS, about 2 m per pixel, with blue, green, red and near-infrared bands). An orthomosaic is made from them in three steps: orthorectification with the RPC model and a terrain model, co-registration of PAN and MSS, and pansharpening.
In Level 1 data the brightness is still linear, the bands are not yet mixed, and each image column comes from a single detector. This is where shadows, haze, striping and fringes can be corrected exactly. After pansharpening, the defects of PAN and MSS are combined in one image and can be corrected only in part.
| Defect | On the original PAN and MSS | On a finished orthomosaic |
|---|---|---|
| Cloud shadows | All four MSS bands, including near infrared, are still separate: the color in shadow is restored accurately | The bands are mixed by pansharpening, and brightness is often stretched by a tone curve: color transitions remain at the shadow edge |
| Haze | Removed in the MSS and never reaches the orthomosaic | Haze is already part of the color of every pixel |
| Detector striping | Each detector is one image column: striping is removed by correcting each detector | Detector columns have been rotated and resampled: striping can no longer be removed exactly |
| Lateral chromatic aberration | The bands are re-aligned, edge colors are preserved | Color fringes can only be desaturated |
| Blur | Deconvolution on the original full-bit-depth values | Blur is mixed with the interpolation of orthorectification and pansharpening |
Features
RawSat processes the PAN and MSS of one scene and returns them in the same format, bit depth and size, with the same RPC model.
| Feature | Result |
|---|---|
| Cloud shadow removal without masks | Forest, roads and clearcuts in shadow look the same as in sunlight; no fringe at the shadow edge and no blue cast in shadow; no second image, terrain model or ground control points needed |
| Veil reduction at cloud edges | Fewer whitish areas around clouds |
| Color noise suppression in former shadows | No color blotches in brightened shadows; brightness and edges are unchanged |
| Sharpness in former shadows | Tree crowns and fine details in former shadows are nearly as sharp as in sunlight; shadows do not look milky |
| PAN correction matched to the MSS | Shadows do not come back in the orthomosaic with any pansharpening method, including PCA, Gram-Schmidt, HSV and Brovey |
| Haze removal | Contrast and color without a whitish cast, especially in the blue band and in dark areas |
| Flat-field correction (FFC) of detector sensitivity | No along-track striping; even brightness across the full image width |
| Lateral chromatic aberration correction | The bands coincide over the whole field of view: no color fringes at edges |
| Sharpness restoration (deconvolution) | Sharp edges and fine details without halos |
| Quality report | Scene-wide metrics before and after: brightness and color step at the shadow edge, brightness non-uniformity, noise, positional accuracy |
Where RawSat fits in image processing
RawSat sits between receiving the image from the satellite operator and your photogrammetry software. The original files are not modified: the result is written next to them, in the same format.
- Input data. Level 1 PAN and MSS, RPC models and acquisition metadata: date and time, sun elevation and azimuth, viewing angles, calibration coefficients.
- Detectors. Flat-field correction of detector sensitivity and dark signal: along-track striping disappears.
- Optics. Lateral chromatic aberration correction and sharpness restoration.
- Atmosphere and clouds. Removal of cloud shadows, the veil at cloud edges and haze; color noise suppression and sharpness restoration in former shadows; PAN correction matched to the MSS.
- Quality control. A report with scene-wide quality metrics before and after processing.
- Photogrammetry. Orthorectification, co-registration, pansharpening and stereo compilation in your software, as before, but on corrected data.
Results: cloud shadow removal
A Level 1 scene from a high-resolution satellite: mountain forest, 30 % cloud cover, forest in shadow almost black. The quality metrics were computed over the whole scene, excluding clouds, for the provider’s original orthomosaic and for an orthomosaic built from the PAN and MSS after RawSat.
| Metric | Original | After RawSat |
|---|---|---|
| Brightness step at the shadow edge, stops per stop of shadow depth (target 0) | −0.67 | 0.00 |
| Color shift at the shadow edge, blue/green (target 0) | +0.53 | 0.00 |
| Forest NDVI at the shadow edge, shadow minus sun (target 0) | −0.05 | 0.00 |
| Brightness non-uniformity across the scene, stops (lower is more uniform) | 0.76 | 0.41 |
| Fine detail in deep shadow / in sun (target: the same in shadow as in sun) | 0.057 / 0.094 | 0.097 / 0.106 |
| Positional offset from the original orthomosaic, median, m | — | 0.2 |
After RawSat the shadow edge disappears from the metrics: the brightness step and the color shift at the edge are zero, the brightness non-uniformity across the scene fell from 0.76 to 0.41 stops, and deep shadow holds almost as much fine detail as sunlit areas (0.097 and 0.106). All metrics, full-resolution crops and a comparison with correcting a finished orthomosaic are in the article Cloud shadows in multispectral satellite imagery: correction before pansharpening.


Figure 2. The same area in the Level 1 panchromatic (PAN) image, 1.2 × 0.7 km, shown at 1 m per pixel (the image is 0.5 m). Individual tree crowns and cut lines are visible in former shadows. The PAN is corrected consistently with the MSS, so shadows do not come back in the orthomosaic after pansharpening. Drag the slider to compare.


Figure 3. A forest road in a cloud shadow: the provider’s original orthomosaic and an orthomosaic built from the PAN and MSS after RawSat, 300 × 280 m, 0.5 m per pixel. The road is barely visible in the original and can be followed along its whole length after processing. Drag the slider to compare.
How cloud shadows are removed from Earth observation imagery
Cloud shadows in Earth observation imagery are removed in these ways: radiometric compensation, which restores brightness and color in shadow from the image itself; multitemporal compositing, which replaces shaded areas with parts of images taken on other dates; cloud and shadow masking, which marks shadows and excludes them from analysis; and physics-based correction with an atmospheric model. Neural networks are used within these methods, to build the mask or to restore brightness.
RawSat performs radiometric compensation without a mask, on the original Level 1 PAN and MSS. That is why there is no fringe at the shadow edge, the color in shadow is restored from all MSS bands, no second image, terrain model or ground control points are needed, and the geometry and RPC model stay the same.
Data and formats
- Input: Level 1 PAN and MSS without orthorectification or pansharpening, at the original bit depth (usually 11–16 bits): GeoTIFF, NITF, JPEG 2000.
- RPC models: as separate files (RPB, _RPC.TXT and others) or embedded in TIFF and NITF.
- Acquisition metadata: XML, DIM, IMD and others.
- Output: corrected PAN and MSS in the original format, bit depth and size, with the same RPC model; a quality report in PDF.
- A finished orthomosaic can also be processed, but the shadow edge and color are corrected less well than on the original data.
What RawSat does not do
- It does not build orthomosaics: orthorectification, pansharpening and stereo compilation are done by your photogrammetry software.
- It does not remove dense clouds: there is no data under them, and they can only be replaced with part of another image.
- It does not convert brightness to reflectance: the correction is relative, without conversion to physical units.
- It does not remove terrain shadows: slopes facing away from the sun need topographic correction with a terrain model.
Related software
- RawGeo Balance — brightness and color balancing of aerial survey frames before the orthomosaic is built
- RawGeo Processor — RAW processing of aerial images on the GPU, with chromatic aberration and motion blur removed in RAW
- ALTMapper — local contrast and shadow recovery for TIFF and JPEG
- Fastvideo SDK — GPU image processing modules for your own software
Frequently asked questions
How do you remove cloud shadows from satellite imagery?
The main approaches are radiometric compensation (brightness and color in shadow are restored from the image itself), multitemporal compositing (shaded areas are replaced with parts of images taken on other dates), cloud and shadow masking (shadows are excluded from analysis) and physics-based correction with an atmospheric model. If you need the image itself without shadows and there is no second image of the same place, radiometric compensation is the method to use. RawSat performs it without a mask, on the original PAN and MSS before pansharpening.
How is RawSat different from mask-based shadow removal?
A mask splits the image into shadow and non-shadow, so a fringe remains along its edge, and mask errors on dark objects and in haze carry over into the result. RawSat does not build a mask: the correction follows the shadow depth smoothly, from penumbra to deep shadow, and there are no masks to draw or edit by hand.
What is RawSat?
RawSat corrects original Level 1 satellite images before orthorectification and pansharpening: it removes cloud shadows, haze, detector striping, lateral chromatic aberration and blur. RawSat does not build orthomosaics; it prepares the data for them.
Does the image geometry change?
No. Only brightness values change: the corrected PAN and MSS keep their size and RPC model. The orthomosaic built from the corrected data matched the provider’s orthomosaic in position, with a median offset of 0.2 m.
Do I need a second image of the same place, a terrain model or ground control points?
Not for cloud shadow removal: the correction is computed from the image itself. A second image is needed only where dense clouds have to be replaced.
Can a finished orthomosaic be processed?
For cloud shadows, yes, but less well than the original data: the bands are already mixed by pansharpening. Detector striping and chromatic aberration cannot be corrected exactly on an orthomosaic; that needs the original PAN and MSS.
Does noise increase in former shadows?
Yes. In deep shadow the signal is weak, and brightening amplifies the noise along with it. RawSat suppresses color noise without changing brightness. Luminance noise remains: it comes from the PAN together with the fine detail.
Does RawSat use AI?
No. The algorithms are classical and deterministic: the same image always gives the same result, and no detail is painted in. For mapping this matters: everything in the image has to come from the satellite’s sensor.
Can I try it on my own imagery?
Yes. Send us an image, and we will process it and return the corrected PAN and MSS with a before-and-after quality report. Write to us through the contact form.