An implementation of the SLIC superpixel generation algorithm