Makes sure labeling centroid stays within image