ALGORITHMS FOR IMAGE SEGMENTATION