I have tested three methods to segment my image collection:


var l8sr = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR');

function maskL8sr(image) {
// Bits 3 and 5 are cloud shadow and cloud, respectively.
var cloudShadowBitMask = ee.Number(2).pow(3).int();
var cloudsBitMask = ee.Number(2).pow(5).int();
// Get the pixel QA band.
var qa = image.select('pixel_qa');

// Both flags should be set to zero, indicating clear conditions.
var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)

// Return the masked image, scaled to [0, 1].
return image.updateMask(mask);

// Map the function over one year of data and take the median.
var composite = l8sr//.select(bands)
           .filterDate('2017-05-01', '2017-10-1')

 // This method belongs to this 
 var boxcar = ee.Kernel.square({
 radius: 7, units: 'pixels', normalize: false });

 var smooth = composite.convolve(boxcar);
 Map.addLayer(smooth, {bands: ['B4', 'B3', 'B2'], max: 0.5}, 'smoothed');
 // These are the GEE methods for Object-based
 var objim= composite.connectedPixelCount();

 var patchid = composite.connectedComponents(ee.Kernel.gaussian(1), 256);
 Map.addLayer(patchid, {bands: ['B4', 'B3', 'B2'], min: 0, max: 0.3}, 'patches');

Unfortunately, the results visualization are not appropriate for me. Also, I need to classify this image collection using my own training data, so I don't want to use clustering or unsupervised methods. I was wondering if anybody could help me to solve it.

  • What is your question? Provide a clear explanations of what your desired output is and what was wrong when you did classification described.
    – Ruslan
    Jun 6 '18 at 17:38
  • Thank you for your response. The output should like an classified image (the boundaries should be clear), but these results only classifies water. Also, the accuracy of object-based classification is not as well as pixel-based. In fact Validation overall accuracy: for object-based is 20% weaker than pixel-based using my test data. Jun 6 '18 at 17:50
  • So what is a specific problem that you want help with? People here can help you if you can provide a specific description of issue with your classification method, but they will not do a classification for you. Water being the only good/accurate class is not a specific issue - it is present in almost any classification.
    – Ruslan
    Jun 6 '18 at 17:58
  • I want to do a object-based classification. At first, it is crucial to segment the image, as I know, these results are not segmented. Also, I did not say "please classify this image guys!!". Jun 6 '18 at 18:08
  • Then change the question title and content to reflect that. You need help with image segmentation: show what your output looks like and what you expect to see instead. I'm not being rude, nor do I think you are, just be specific.
    – Ruslan
    Jun 6 '18 at 18:15