A parallel and accurate method for large-scale image segmentation on a cloud environment