Returned the color segmentation algorithm to its original form