A tool for extracting contour-based mid-level features, and to extract contour segmentations from images