Computes projections of 3D points to the image plane given intrinsic and extrinsic camera parameters. Optionally, the function computes jacobians - matrices of partial derivatives of image points as functions of all the input parameters w.r.t. the particular parameters, intrinsic and/or extrinsic. The jacobians are used during the global optimization in cvCalibrateCamera2 and cvFindExtrinsicCameraParams2. The function itself is also used to compute back-projection error for with current intrinsic and extrinsic parameters.
Note, that with intrinsic and/or extrinsic parameters set to special values, the function can be used to compute just extrinsic transformation or just intrinsic transformation (i.e. distortion of a sparse set of points).

C# | Visual Basic | Visual C++ |
public static void cvProjectPoints2( IntPtr objectPoints, IntPtr rotationVector, IntPtr translationVector, IntPtr intrinsicMatrix, IntPtr distortionCoeffs, IntPtr imagePoints, IntPtr dpdrot, IntPtr dpdt, IntPtr dpdf, IntPtr dpdc, IntPtr dpddist )
Public Shared Sub cvProjectPoints2 ( _ objectPoints As IntPtr, _ rotationVector As IntPtr, _ translationVector As IntPtr, _ intrinsicMatrix As IntPtr, _ distortionCoeffs As IntPtr, _ imagePoints As IntPtr, _ dpdrot As IntPtr, _ dpdt As IntPtr, _ dpdf As IntPtr, _ dpdc As IntPtr, _ dpddist As IntPtr _ )

- objectPoints (IntPtr)
- The array of object points, 3xN or Nx3, where N is the number of points in the view
- rotationVector (IntPtr)
- The rotation vector, 1x3 or 3x1
- translationVector (IntPtr)
- The translation vector, 1x3 or 3x1
- intrinsicMatrix (IntPtr)
- The camera matrix (A) [fx 0 cx; 0 fy cy; 0 0 1].
- distortionCoeffs (IntPtr)
- The vector of distortion coefficients, 4x1 or 1x4 [k1, k2, p1, p2]. If it is NULL, all distortion coefficients are considered 0's
- imagePoints (IntPtr)
- The output array of image points, 2xN or Nx2, where N is the total number of points in the view
- dpdrot (IntPtr)
- Optional Nx3 matrix of derivatives of image points with respect to components of the rotation vector
- dpdt (IntPtr)
- Optional Nx3 matrix of derivatives of image points w.r.t. components of the translation vector
- dpdf (IntPtr)
- Optional Nx2 matrix of derivatives of image points w.r.t. fx and fy
- dpdc (IntPtr)
- Optional Nx2 matrix of derivatives of image points w.r.t. cx and cy
- dpddist (IntPtr)
- Optional Nx4 matrix of derivatives of image points w.r.t. distortion coefficients