Basic edge segmentation working