gpt4 book ai didi

opencv - 如何解决带有鱼眼相机参数的 PnP?

转载 作者:行者123 更新时间:2023-12-02 17:26:33 40 4
gpt4 key购买 nike

我看到 OpenCV 的 solvePnP() 函数假定您的相机参数来自针孔模型。但是我使用 cv.fisheye 模块校准了我的相机,所以我想知道如何使用 solvePnP 以及从该鱼眼模块获得的参数。

如何通过 solvePnP() 使用我的鱼眼相机参数?

最佳答案

根据 docs.opencv.org,您有来自 cv::fisheye::calibrate() 的 {K, D, rvecs, tvecs}。

您可以使用 cv.fisheye.undistortPoints() 从输入坐标中移除 K 和 D 的影响 distorted 参见 here .

所以例程必须是:

  1. undistorted = cv.fisheye.undistortPoints(distorted, K, D)
  2. cv.solvePnP(objPoints, undistorted, I, D) 其中 I=np.eye(3), D=np.zeros((1,5))

祝你好运

关于opencv - 如何解决带有鱼眼相机参数的 PnP?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59062410/

40 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com