• calculating islands

Question related to mission Calculate Islands

 

I tried the histogram approach in this one two but cannot come up with a descent algorithm for calculating when an island ends and another starts....hints?