put calculate edges into Segmentation method.