[GIS] Binarization of water body extraction in Google Earth Engine

google-earth-enginejavascriptnormalized-difference-water-index

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.

Best Answer

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