|DigitalGlobe QuickBird image with cloud and shadows masked to NoData (shown in orange)|
The model replaces a cloud covered area of a (newer) image using data from another (older) image of the same area (but with no clouds in the areas which need updating). A linear regression based model is established between the two images using the new Linear Regression operator and then the model fills in the cloud areas in the first image based on the linearly-adjusted data from the second image. If the linear regression were not used to "color match" the older image to the newer image the substitution of older pixels in the cloud locations would likely result in a clearly visible line where the substitution had occurred because of variations in image collection parameters between the two dates (one image might be markedly brighter overall than the other).
|Simple DN substitution shows brightness differences||Cloud holes filled using the model (with Blend option On)|
This same technique can be used in a variety of applications, such as to correlate an NDVI image to field-measured Leaf Area Index (LAI) samples in order to extrapolate the LAI across the entire NDVI extent.
A raster which has a cloud covered area
The cloud locations (and other corrupted locations, such as cloud shadows) are assumed to have already been masked from the image and replaced with NoData
A second raster to be used for filling the NoData locations in the first raster with valid data
Clouds and other erroneous pixel locations should also have been removed from the second image so that the linear regression can do its job properly
The two images should have the same number of bands. The model checks for this via the Require Condition operator and will stop execution if the number of bands is found to be unequal.
The bands should correspond to the same wavelengths - don't try to use a NRG image to patch holes in an RGB!
The images can have differing data ranges - for example, the Older Cloud-free Image could be 16-bit and the Newer Cloudy Image could be 8-bit. The Linear Regression will take care of mapping the data range to that of the Newer Cloudy Image
The model was designed primarily for unsigned 8 to 16 bit dynamic range data, but should work for other ranges too.
Even with the color balancing applied via the linear regression there may still be visible edges where the clouds have been replaced (especially if the cloud mask did not fully exclude hazy edges of the clouds which will therefore have "brighter" responses compared to the filled areas). So the model includes an option to Blend Edges. If set to True this option first creates a buffer two-pixels wide around the NoData hole locations. In this buffer zone the output pixel values are modified such that in the 1 pixel distant ring the DNs are a blend of 67% regression-matched old image values / 33% new image values, and in the 2-pixel distant ring the DNs are a blend of 33% regression-matched old image values / 67% new image values. In this manner there is a gradual transition from older image values to new image values which acts to blur the transition.
|Raster Match Iterator sub-model|
Old Image: Name of image to be used to fill cloud holes
New Image with Cloud Holes: Newer image with NoData holes where clouds (and other corrupted data, such as shadows) were present. These holes will be filled using DN values derived from the Old Image input
Blend Edges?: If turned on (true or 1) this option causes the edges of the NoData holes to be gradually blended with the "fill" data inorder to smooth the edge
Output Filename: Name of the output raster image with NoData holes filled.