Commit segmentation

A good segmentation algorithm: The segmentation proceeds by identifying
clear objects with an edge finding algorithm, using the information on
these objects to define a threshold and a smoothing filter size.