Added useBareRockMask in the water detection algorithm