def wall_filter(points, img):
    """
    Filters away points that are inside walls. Works by checking where the refractive index is not 1.
    """
    deletion_mask = img[points[:, 0], points[:, 1]] != 1
    filtered_points = points[~deletion_mask]
    return filtered_points