是否有任何 opencv 函数可以计算重投影点?

Is there any opencv function to calculate reprojected points?

根据给定的世界点(原始坐标)、固有矩阵、旋转矩阵和平移向量计算重投影点、重投影误差和平均重投影误差的过程是什么?

是否有任何内置的 opencv 函数,或者我们应该计算 manuallay?

如果我们必须手动计算,获得重投影点的最佳方法是什么?

projectPoints 将 3D 点投影到图像平面。

calibrateCamera returns 最后重投影错误。 calibrateCamera 从校准图案的多个视图中找到相机的内部和外部参数。

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. The algorithm is based on [Zhang2000]1 and [BouguetMCT]2. The coordinates of 3D object points and their corresponding 2D projections in each view must be specified. That may be achieved by using an object with a known geometry and easily detectable feature points. Such an object is called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as a calibration rig (see findChessboardCorners() ).

The algorithm performs the following steps:

  1. Compute the initial intrinsic parameters (the option only available for planar calibration patterns) or read them from the input parameters. The distortion coefficients are all set to zeros initially unless some of CV_CALIB_FIX_K? are specified.

  2. Estimate the initial camera pose as if the intrinsic parameters have been already known. This is done using solvePnP().

  3. Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error, that is, the total sum of squared distances between the observed feature points imagePoints and the projected (using the current estimates for camera parameters and the poses) object points objectPoints. See projectPoints() for details. The function returns the final re-projection error.

1张正友。一种灵活的相机标定新技术。 模式分析和机器智能,IEEE Transactions on,2000 年,22.11:1330-1334。

2J.Y.Bouguet。 MATLAB 校准工具。 http://www.vision.caltech.edu/bouguetj/calib_doc/