projection.py 文件源码

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

项目:LensCalibrator 作者: 1024jp 项目源码 文件源码
def project_image(self, image, size, offset=(0, 0)):
        """Remove parspective from given image.

        Arguments:
        image numpy.array -- Image source in numpy image form.
        size ([int]) -- Size of the output image.
        """
        translation = np.matrix([
            [1.0, 0.0, -offset[0]],
            [0.0, 1.0, -offset[1]],
            [0.0, 0.0, 1.0]
        ])
        matrix = translation * self.homography

        return cv2.warpPerspective(image, matrix, tuple(size))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号