Watershed segmentation algorithm to separate different areas in a given image