For users
For developers
This function segments the entire 2-D array into areas belonging to each identified maximum according to a watershed algorithm.