image_utils.py 文件源码

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

项目:tefla 作者: openAGI 项目源码 文件源码
def __init__(self, calibration=None, calib_data_path=None, rows=6, cols=9, cal_image_shape=None):
        """Helper class to remove lens distortion from images (camera calibration)

        Args:
            calibration: precalculated calibration matrices
            calib_data_path: path to data for camera calibration
            rows: number of rows on chessboard
            cols: number of columns on chessboard
            cal_image_shape: calibration image shape
        """
        if calibration is not None:
            self.ret, self.mtx, self.dist, self.rvecs, self.tvecs = cv2.calibrateCamera(
                calibration['objpoints'], calibration['imgpoints'], cal_image_shape, None, None)
        else:
            calibration = calculate_camera_calibration(
                calib_data_path, rows, cols, cal_image_shape)
            self.mtx = calibration['mtx']
            self.dist = calibration['dist']
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号