Advertisement
Guest User

Untitled

a guest
Oct 8th, 2015
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. // Band combinations
  2. var natural = ['B4', 'B3', 'B2'];
  3. var swir = ['B6', 'B5', 'B3'];
  4. var urban = ['B7', 'B6', 'B4'];
  5. var veg = ['B5', 'B4', 'B3'];
  6.  
  7. // Get a Landsat scene
  8. var scene = ee.Image('LANDSAT/LC8_L1T_TOA/LC80450332015263LGN00');
  9.  
  10. // Convert the RGB bands to the HSV
  11. var hsv = scene.select(urban).rgbToHsv();
  12.  
  13. // Add band 8 and convert back to RGB
  14. var sharpened = ee.Image.cat([
  15. hsv.select('hue'), hsv.select('saturation'), scene.select('B8')
  16. ]).hsvToRgb();
  17.  
  18. // Do a very basic color correction
  19. var imageRGB = sharpened.visualize({min: 0, max:0.18,
  20. gamma:[
  21. 1.05, // red
  22. 1.08, // green
  23. 0.8] // blue
  24. });
  25.  
  26. // Display the image and zoom to it
  27. Map.addLayer(imageRGB);
  28. Map.centerObject(sharpened, 9);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement