Automated Resolution Selection for Image Segmentation