A Rule-Based System for Improving on Image Segmentation