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.

Level 1 MSS satellite image after cloud shadow removal in RawSat: forest and clearcuts are visible
Original Level 1 MSS satellite image with cloud shadows over forest
⇔
◀ Original MSSMSS after RawSat ▶

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.

Where to correct satellite image defectsCorrection on the original Level 1 PAN and MSS and on a finished orthomosaic
DefectOn the original
PAN and MSS
On a finished
orthomosaic
Cloud shadowsAll four MSS bands, including near infrared, are still separate: the color in shadow is restored accuratelyThe bands are mixed by pansharpening, and brightness is often stretched by a tone curve: color transitions remain at the shadow edge
HazeRemoved in the MSS and never reaches the orthomosaicHaze is already part of the color of every pixel
Detector stripingEach detector is one image column: striping is removed by correcting each detectorDetector columns have been rotated and resampled: striping can no longer be removed exactly
Lateral chromatic aberrationThe bands are re-aligned, edge colors are preservedColor fringes can only be desaturated
BlurDeconvolution on the original full-bit-depth valuesBlur 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.

RawSat featuresProcessing of the original Level 1 PAN and MSS; format, bit depth, size and RPC model are preserved
FeatureResult
Cloud shadow removal without masksForest, 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 edgesFewer whitish areas around clouds
Color noise suppression in former shadowsNo color blotches in brightened shadows; brightness and edges are unchanged
Sharpness in former shadowsTree crowns and fine details in former shadows are nearly as sharp as in sunlight; shadows do not look milky
PAN correction matched to the MSSShadows do not come back in the orthomosaic with any pansharpening method, including PCA, Gram-Schmidt, HSV and Brovey
Haze removalContrast and color without a whitish cast, especially in the blue band and in dark areas
Flat-field correction (FFC) of detector sensitivityNo along-track striping; even brightness across the full image width
Lateral chromatic aberration correctionThe bands coincide over the whole field of view: no color fringes at edges
Sharpness restoration (deconvolution)Sharp edges and fine details without halos
Quality reportScene-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.

  1. Input data. Level 1 PAN and MSS, RPC models and acquisition metadata: date and time, sun elevation and azimuth, viewing angles, calibration coefficients.
  2. Detectors. Flat-field correction of detector sensitivity and dark signal: along-track striping disappears.
  3. Optics. Lateral chromatic aberration correction and sharpness restoration.
  4. 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.
  5. Quality control. A report with scene-wide quality metrics before and after processing.
  6. 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.

Cloud shadow removal: quality metrics over the whole sceneOriginal: the provider’s orthomosaic; after RawSat: an orthomosaic built from the corrected PAN and MSS. The same locations for both, clouds excluded
MetricOriginalAfter
RawSat
Brightness step at the shadow edge, stops per stop of shadow depth (target 0)−0.670.00
Color shift at the shadow edge, blue/green (target 0)+0.530.00
Forest NDVI at the shadow edge, shadow minus sun (target 0)−0.050.00
Brightness non-uniformity across the scene, stops (lower is more uniform)0.760.41
Fine detail in deep shadow / in sun (target: the same in shadow as in sun)0.057 / 0.0940.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.

Level 1 panchromatic PAN satellite image after RawSat: tree crowns in former shadows are visible
Original Level 1 panchromatic PAN satellite image with cloud shadows
⇔
◀ Original PANPAN after RawSat ▶

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.

Forest road in a cloud shadow on the orthomosaic after shadow removal in RawSat
Forest road in a cloud shadow on the provider’s original orthomosaic
⇔
◀ Original orthomosaicNew orthomosaic ▶

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

What RawSat does not do

Related 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.

Why you can trust these results

Fastvideo has built GPU-accelerated image processing software since 2009. Our codecs comply with the standards they implement — JPEG (ITU-T T.81 / ISO IEC 10918) and JPEG2000 (ITU-T T.800 / ISO IEC 15444) — and our tools are open source on GitHub. Every performance figure we publish is reproducible: see our benchmark methodology, download the Fastvideo SDK benchmark report (PDF), and measure it on your own GPU.

Contact Form

This form collects your name and email. See our Privacy Policy for how we handle your personal data.