def pwa_point_in_pointcloud(pcloud, indices, batch_size=None):
    from menpo.transform.piecewiseaffine import PiecewiseAffine
    from menpo.transform.piecewiseaffine import TriangleContainmentError

    try:
        pwa = PiecewiseAffine(pcloud, pcloud)
        pwa.apply(indices, batch_size=batch_size)
        return np.ones(indices.shape[0], dtype=np.bool)
    except TriangleContainmentError as e:
        return ~e.points_outside_source_domain
Make sure that the decision of whether a point is inside or outside
dataset/ETHPy150Open menpo/menpo/menpo/image/boolean.py/pwa_point_in_pointcloud