This function could be merged with `skimage.draw.draw.image_coords_…` and the merged version moved to skimage._shared.utils.