vis_tools.py 文件源码

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

项目:baxter 作者: destrygomorphous 项目源码 文件源码
def __init__(self, img, min_match_count=10, flann_index=0, flann_trees=5,
            flann_checks=50):
        self.min_match_count = min_match_count
        self.thing = img
        self.rvr_comm,self.sdr_comm = multiprocessing.Pipe(duplex=False)

        # Initiate SIFT detector
        self.sift = cv2.xfeatures2d.SIFT_create()

        # Find keypoints and descriptors of thing with SIFT
        self.keypoints, self.descriptors = self.sift.detectAndCompute(img,
                                                                      None)
        print 'num keypoints =', len(self.keypoints)

        # Initiate FLANN matcher
        index_params = dict(algorithm = flann_index, trees = flann_trees)
        search_params = dict(checks = flann_checks)

        self.flann = cv2.FlannBasedMatcher(index_params, search_params)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号