2

I'm a new learner of Google Earth Engine.

What I am doing right now is to extract water bodies from Landsat 8 using such water index as NDWI(normalized difference water index) in GEE.

Is there any available function in the binarization of the water bodies to obtain the optimal threshold (such as the OTSU)?

I found it difficult to perform the binarization after calculating the NDWI.

1 Answer 1

4

Otsu's method for finding an optimal threshold has been implemented in Earth Engine. See the blog post: Otsu’s Method for Image Segmentation

2
  • Thank you very much for your answer. The blog you suggest does provide good references to me and it is very helpful. Another question that confuses me is that I imported a vector about the size of 10 km*2 km in size as a ROI(region of interst) for computing water bodies. After performing the water body extraction using MNDWI, I exported it to the drive and downloaded the result. I found that the size of the raster seemed to be larger than it should be (around 30 km*8 km). So what happened? What I am doing wrong? Thanks again for your answer.
    – qi huang
    Commented Jan 19, 2018 at 11:41
  • Because that is a different question, you should submit a new question so that others can propose answers. Be sure to include code that others can run to reproduce your current results. Commented Jan 19, 2018 at 16:20

Your Answer

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

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