camera_intrinsics_estimation.py 文件源码

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

项目:esys-pbi 作者: fsxfreak 项目源码 文件源码
def calculate(self):
        self.calculated = True
        self.count = 10
        rms, camera_matrix, dist_coefs, rvecs, tvecs = cv2.calibrateCamera(np.array(self.obj_points), np.array(self.img_points),self.g_pool.capture.frame_size,None,None)
        logger.info("Calibrated Camera, RMS:{}".format(rms))
        camera_calibration = {'camera_matrix':camera_matrix,'dist_coefs':dist_coefs,'camera_name':self.g_pool.capture.name,'resolution':self.g_pool.capture.frame_size}
        save_object(camera_calibration,os.path.join(self.g_pool.user_dir,"camera_calibration"))
        logger.info("Calibration saved to user folder")
        self.camera_intrinsics = camera_matrix,dist_coefs,self.g_pool.capture.frame_size
        self.show_undistortion_switch.read_only=False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号