watershed function

Compute watershed transform.