1. 程式人生 > >opencv 函式triangulatePoints():Reconstructs points by triangulation.

opencv 函式triangulatePoints():Reconstructs points by triangulation.

C++:void triangulatePoints(InputArray projMatr1, InputArray projMatr2, InputArray projPoints1, InputArray projPoints2, OutputArray points4D)

Python:cv2.triangulatePoints(projMatr1, projMatr2, projPoints1, projPoints2[, points4D]) → points4D

C:void cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2

, CvMat* projPoints1, CvMat* projPoints2, CvMat* points4D)

Parameters:
  • projMatr1 – 3x4 projection matrix of the first camera.
  • projMatr2 – 3x4 projection matrix of the second camera.
  • projPoints1 – 2xN array of feature points in the first image. In case of c++ version it can be also a vector of feature points or two-channel matrix of size 1xN or Nx1.
  • projPoints2 – 2xN array of corresponding points in the second image. In case of c++ version it can be also a vector of feature points or two-channel matrix of size 1xN or Nx1.
  • points4D – 4xN array of reconstructed points in homogeneous coordinates.

The function reconstructs 3-dimensional points (in homogeneous coordinates) by using their observations with a stereo camera. Projections matrices can be obtained from

stereoRectify().