This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GMeans Segmentation | |
var seg = ee.Algorithms.Image.Segmentation.GMeans(smooth.gt(demand_threshold), 3, 50, 10); | |
Map.addLayer(seg.randomVisualizer(), {opacity:0.5}, 'GMeans Segmentation'); | |
// SNIC Segmentation | |
var snic = ee.Algorithms.Image.Segmentation.SNIC(smooth.gt(demand_threshold), 30, 0, 8, 300); | |
Map.addLayer(snic.randomVisualizer(), {opacity:0.5}, 'SNIC Segmentation'); | |
// Uniquely label the patches and visualize. | |
var patchid = smooth.gt(demand_threshold) | |
.connectedComponents(ee.Kernel.plus(1), 256); | |
Map.addLayer(patchid.randomVisualizer(), {opacity:0.5}, 'Connected Patches'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment