0

I am trying to make a timelapse video of images captured by USGS Landsat 7 Collection 1 Tier 1 and Real-Time data Raw Scenes using google earth engine. Somehow all the video results are just white images lasting 30 secs. The code I used is this:

*var collection = ee.ImageCollection("LANDSAT/LE07/C01/T1_RT")
// Philippines
//Manila 120.645, 14.794, 121.3761, 14.1345
//Tight Manila 120.8652, 14.7144, 121.1372, 14.5017
.filter(ee.Filter.eq('WRS_PATH', 116))
.filter(ee.Filter.eq('WRS_ROW', 50))
.filter(ee.Filter.lt('CLOUD_COVER', 40))
.filterDate('2001-01-01','2008-12-30')
.select(['B1', 'B2', 'B3'])
.map(function(image) {
return image.multiply(512).uint8();
});
var polygon = geometry2;
// Export (change dimensions or scale for higher quality).
Export.video.toDrive({
collection: collection,
description: 'PhilTimeLapse',
dimensions: 720,
framesPerSecond: 2,
region: polygon
});*

I don't know how to trace my mistakes as I am very new to coding and google earth engine. Can you explain where and why am I not getting the images? Thank you!

  • Could you link to your code editor using the "Get Link" button next to the "Save" button? – JonasV May 26 at 10:15
1

The RGB-visualization of your images isn't working well and returning values which are way too big. Those big values are then interpreted as white. For videos I like to use .visualize(), since you can try out what it will look like immediately.

You also needed to invert the band selection. Here's how it works (after my code the export function from your code should work):

var createTrueColor = function(image){
  return ee.Image(image).visualize({
    bands: ['B3', 'B2', 'B1'],
    min: 0,
    max: 256,
    gamma: 1.4
})
}

var collection = ee.ImageCollection("LANDSAT/LE07/C01/T1_RT")
// Philippines
//Manila 120.645, 14.794, 121.3761, 14.1345
//Tight Manila 120.8652, 14.7144, 121.1372, 14.5017
.filter(ee.Filter.eq('WRS_PATH', 116))
.filter(ee.Filter.eq('WRS_ROW', 50))
.filter(ee.Filter.lt('CLOUD_COVER', 40))
.filterDate('2001-01-01','2008-12-30')
.map(createTrueColor)

Map.addLayer(collection) 
| improve this answer | |
  • Thanks! this works well! Is this a common fix whenever I make videos that turns white? – Sadsquid May 28 at 9:45
  • Yes, this should work for most optical satellites. But you need to pay attention to the bands which are selected. The red, green and blue bands have different numbers on different satellites. You might also want to play around with the gamma value, to tweak your results. – JonasV May 28 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.