features.py 文件源码

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

项目:prototype 作者: chutsu 项目源码 文件源码
def extract_descriptors(self, frame, kps):
        """Extract feature descriptors

        Parameters
        ----------
        frame : np.array
            Image frame
        kps: list of KeyPoint
            Key points

        Returns
        -------
        des : list of np.array
            Descriptors

        """
        cv_kps = convert2cvkeypoints(kps)
        cv_kps, des = self.orb.compute(frame, cv_kps)

        # Convert OpenCV KeyPoint to KeyPoint
        kps = []
        for cv_kp in cv_kps:
            kps.append(KeyPoint(cv_kp.pt,
                                cv_kp.size,
                                cv_kp.angle,
                                cv_kp.response,
                                cv_kp.octave,
                                cv_kp.class_id))

        return kps, des
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号