【问题标题】:I am facing this error when running the camera-projector calibration script运行相机投影仪校准脚本时遇到此错误
【发布时间】:2021-12-22 00:53:00
【问题描述】:

Traceback(最近一次调用最后一次): 文件“calibration_ChArucoWithCircles.py”,第 255 行,在 distCoeffs=distCoeffs) cv2.error: OpenCV(4.5.3) :-1: error: (-5:Bad argument) in function 'estimatePoseCharucoBoard' 重载解析失败:

  • 找不到必需的参数“rvec”(位置 6)
  • 找不到必需的参数“rvec”(位置 6)

有人知道怎么解决这个问题吗,谢谢。

这是导致错误的脚本:

pose, rvec, tvec = aruco.estimatePoseCharucoBoard(
                charucoCorners=charuco_corners, 
                charucoIds=charuco_ids, 
                board=CHARUCO_BOARD, 
                cameraMatrix=cameraMatrix, 
                distCoeffs=distCoeffs)

【问题讨论】:

    标签: python camera mapping projection camera-calibration


    【解决方案1】:

    尝试在最后添加两个空数组,一个用于旋转矩阵,一个用于平移矩阵:

    pose, rvec, tvec = aruco.estimatePoseCharucoBoard(
        charuco_corners, 
        charuco_ids, 
        CHARUCO_BOARD, 
        cameraMatrix, 
        distCoeffs,
        np.empty(1),
        np.empty(1)
    )
    

    Documentation

    【讨论】:

    • 这些数组的大小应该是多少?
    • 没关系。它们只是两个输出数组的占位符。由于某种原因,从 python 到 C++ 的翻译在解析时需要它们。
    猜你喜欢
    • 2011-03-12
    • 2014-04-12
    • 2017-10-08
    • 1970-01-01
    • 2018-09-09
    • 1970-01-01
    • 1970-01-01
    • 2019-03-07
    • 1970-01-01
    相关资源
    最近更新 更多