image_distort.py 文件源码

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

项目:openhmd_ros 作者: h3ct0r 项目源码 文件源码
def transform(self, img, k1=0.22, k2=0.24):
        """Apply barrel distortion using OpenCV's Undistort operation

        This counteracts the pincushion distortion that the Oculus lens
        applies. The distortion coefficients k1 and k2 are the main
        action here.

        [1]: http://docs.opencv.org/trunk/doc/py_tutorials/py_calib3d/\
                 py_calibration/py_calibration.html
        """
        return cv2.undistort(
            img,
            self.d_matrix,
            np.array([k1, k2, 0, 0, 0])
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号