interactivedetector.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:semi-auto-anno 作者: moberweger 项目源码 文件源码
def get_ind_under_point(self, event):
        """
        get the index of the vertex under point if within epsilon tolerance
        :param event: qt event
        :return: index of selected point
        """

        # display coords
        distances = numpy.hypot(event.xdata - self.curData[:, 0],
                                event.ydata - self.curData[:, 1])
        indmin = distances.argmin()

        if distances[indmin] >= self.epsilon:
            ind = None
        else:
            ind = indmin
        self.lastind = ind
        return ind
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号