Abstracted out Berkeley Segmentation utilities