gpt4 book ai didi

python - 从 Homography 矩阵计算 Essential 矩阵

转载 作者:太空宇宙 更新时间:2023-11-03 21:39:59 24 4
gpt4 key购买 nike

在我的 Python/OpenCV 代码中,我使用随机单应性来模拟视点变化(我正在评估兴趣点检测器并希望避免搜索图像对)。

是否可以计算对极线和一幅图像及其扭曲版本之间的基本矩阵?我拥有的唯一信息是我应用的单应性。

还有其他帖子与我的问题有些相关:How to calculate Rotation and Translation matrices from homography? , How to calculate Rotation and Translation matrices from homography? , Find Homography atrix from Fundamental matrix ,但我不知道如何做 Homography matrix -> Essential matrix。

如果我尝试做的事情没有意义,请告诉我原因。

谢谢

最佳答案

我认为您不需要 Essential 矩阵:“Fundamental Matrix 包含与 Essential Matrix 相同的信息以及关于两个相机的内在信息,因此我们可以在像素坐标中关联两个相机。”

This tutorial可以帮助您了解如何根据单应性计算对极线。首先,您需要找到几个点来喂养 cv.findFundamentalMat。这些点可以从单应矩阵计算 - 只需取八个或更多随机点 (pts1) 并将单应矩阵应用于它们 (pts2)。

F, mask = cv.findFundamentalMat(pts1, pts2, cv.FM_LMEDS)

最后你可以从相应的图像中找到外线参数:

epilines1 = cv.computeCorrespondEpilines(pts2.reshape(-1,1,2), 2, F)
epilines2 = cv.computeCorrespondEpilines(pts1.reshape(-1,1,2), 1, F)

关于python - 从 Homography 矩阵计算 Essential 矩阵,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56732520/

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