If said object is a calibration pattern like the chessboard used by OpenCV, then the camera calibration routine mentioned by ChrisO would give you both the camera intrinsics (focal length, principal point, and lens distortion) as well as the camera extrinsics (where they are relatively in space).
If you have general object, then you need to establish a set of 2D correspondences which you can feed into cvFindFundamentalMat. This finds the fundamental matrix which relates the two perspectives. Namely, for each point x in camera 1 and corresponding point x' in camera 2, x'Fx = 0. You can similarly find the epipoles, etc. This uses the 8 point algorithm which requires at least 8 point pairs of point correspondences.
You can get the correspondences either manually or with a robust feature extractor and matcher along the lines of MSER/Affine Harris + SIFT.
发布评论
评论(1)
如果所述对象是像 OpenCV 使用的棋盘这样的校准模式,那么 ChrisO 提到的相机校准例程将为您提供相机内在参数(焦距、主点和镜头畸变)以及相机外在参数(它们所在的位置)。相对空间)。
如果您有一般对象,那么您需要建立一组 2D 对应关系,您可以将其输入 cvFindFundamentalMat。这找到了将两个观点联系起来的基本矩阵。即,对于相机 1 中的每个点 x 和相机 2 中的对应点 x',x'Fx = 0。您可以类似地找到极点等。这使用 8 点算法,该算法需要至少 8 个点对的点对应关系。
您可以手动获取对应关系,也可以使用强大的特征提取器和匹配器(类似于 MSER/Affine Harris + SIFT)获取对应关系。
If said object is a calibration pattern like the chessboard used by OpenCV, then the camera calibration routine mentioned by ChrisO would give you both the camera intrinsics (focal length, principal point, and lens distortion) as well as the camera extrinsics (where they are relatively in space).
If you have general object, then you need to establish a set of 2D correspondences which you can feed into cvFindFundamentalMat. This finds the fundamental matrix which relates the two perspectives. Namely, for each point x in camera 1 and corresponding point x' in camera 2, x'Fx = 0. You can similarly find the epipoles, etc. This uses the 8 point algorithm which requires at least 8 point pairs of point correspondences.
You can get the correspondences either manually or with a robust feature extractor and matcher along the lines of MSER/Affine Harris + SIFT.