I am trying to remove cloud and composite all Landsat 5 TOA images available in a given year and region into a composite of final image. However, I noted that the quality of final composite image is not consistent and seamless over the large area after cloud masking and median composite.

I have also tried with Landsat 5 surface reflectance, but it is not much improved and the edge of each overlapping image is not consistent and seamless.

Here is my code https://code.earthengine.google.com/b58c843a3c1118495f53a88498089fdd:

/// Data Preprocessing: Landsat 2000 

var LS2000=LS5.filterBounds(VN).filterDate("2000-01-01","2000-12-31")
.filterMetadata("CLOUD_COVER","less_than",70)// Filter the study area, cloud and date range 
// Dissplay the raw image
Map.centerObject(VN,9) // Zoom in the given study area 
Map.addLayer(LS2000.median().clip(VN),{bands:["B3","B2","B1"],min:0.06,max:0.3},"Landsat 2000",false)

/// Cloud Masking
var threshold=50 // Set threshold for cloud masking 

var cloudmask=function(image){
  var cloudscore=ee.Algorithms.Landsat.simpleCloudScore(image)
  var cloudlikelihood=cloudscore.select("cloud").lt(threshold)
  return image.updateMask(cloudlikelihood)
} // Function to isolate cloud pixels each image

var LS2000_CloudMask=LS2000.map(cloudmask).median().clip(VN)
// Display Landsat cloud masked

Map.addLayer(LS2000_CloudMask,{bands:["B3","B2","B1"],max:0.20,min:0.09},"Landsat 5 Cloud Masked")

// 'Samples' geometry region is just example showing the inconsistency 
// and unsmoothness of the image after cloud masking and median composite.

What technique could I improve the quality of consistency and seamlessness of composite image?


1 Answer 1


Like Jon pointed out, this is difficult. You get twice the amount of acquisitions for pixels where Landsat scenes overlap. When you are in a cloudy area, with little cloud-free data to start with, these overlapping areas often stand out quite a lot. You can see this effect in the pixelCount I added to your script (https://code.earthengine.google.com/a45946c7d2b076c07b125e7eecda6c4b). The only way I know to solve this is to add more imagery, i.e. another year in your date range.

In addition to this, you have the BRDF effect, causing the left side of a scene to be a bit brighter, and the right side a bit darker. This also makes it difficult to get seamless mosaics. Adding more imagery will not help you with this. Luckily you can correct for this effect. It’s slow and far from perfect, but in areas where you got very visible BRDF effect, it tends to significantly improve the results. In your specific case, BRDF isn’t really the problem.

Here's a script for your area/date range, based on my standard processing script. It uses SR instead of TOA, very aggressive cloud masking, and BRDF correction. While it's also not seamless, maybe it can be of some use. https://code.earthengine.google.com/45c34f98b86ab9983744cc9a75ecd6db


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.