Tuesday, September 2, 2008

Clouds some more & principal components analysis

It’s not that I particularly like to ramble on and on about the same things, but this is going to be, in part at least, yet another post about clouds. I don’t want to repeat my self too much, but some of the nice datasets we have come from the Landsat missions. Unfortunately, these images are plagued with an abundance of clouds. Nevertheless, their hi resolution (both spatial and spectral) still make those Landsat dataset valuable assets. I’ve started to experiment with how these clouds, and their shadows, can be masked. I found a methodology online that I’ve tried on a Landsat tile from 2000 and it seems very conclusive. I basically used the same technique as Martinuzzi, Sebastián; Gould, William A.; Ramos González, Olga M. used in order to mask clouds in their publication Creating cloud-free Landsat ETM+ data sets in tropical landscapes: cloud and cloud-shadow removal.

The main steps are as follows:
  • Create two masks over potentially cloudy pixels. Pixels with values above 120 in the first band and pixels with values between 102 and 128 in the band 6.1 are considered as such.
  • Create a 3 pixel buffer around those mask to take into account pixels that are only partly cloudy
  • The intersection of those two should cover all the clouds.
  • Now to deal with the shadows, we need to relocate that mask over the shadows. This is done by finding a cloud with peculiar features over low land (where clouds are usually the further away from the ground) and measuring the offset of the shadows in relation to their respective clouds.
  • To take into account the influence of the topography, add a 10 pixel buffer to this relocated mask.
  • Now a mask with potential cloud shadows is created by considering all the pixels in band 4 with values between 17 and 66.
  • A 3 pixel buffer must be added. The shadows identified this way also include shadows of buildings and topography, so we’ll need to create a mask that is the intersection of this mask and the offseted cloud mask we previously created.
  • I added a 6 pixel buffer to that mask.
  • So now we have a mask for clouds and one for their shadows. By joining them both, we get our final cloud and cloud shadow mask.

Here is what it looks like:

Landsat 2000 color composite without the mask

And now with the mask applied

So the clouds and their shadows are fully covered, but my methodology still needs tweaking. Indeed, this final mask covers way more ground than needed. The threshold for obscured pixels must be adjusted. The size of my buffers must be fine-tuned. Maybe the translation offset as well. Also, my results would be more precise if I resampled the band 6.1 so that the pixel size matches that of the other bands. Furthermore, prior to all the previously described steps, it would be useful to do an atmospheric correction of the datasets.

Ideally, if we’re able to get our hands on additional Landsat snapshots, we could create composite images of our own that are a lot less affected by clouds.

With my new mask at hand, I proceeded to do a principal component analysis of a Landsat 2000 tile. Without the mask, the statistical abundance of clouds and shadows in my image would undermine the principal component analysis. Here’s what it looks like:

Color composite of the three principal
components of a Landsat 2000 image

As you can see, the types of fields and vegetation is very differentiated…

No comments: