码迷,mamicode.com
首页 > 其他好文 > 详细

OpenCV-Triangulation

时间:2018-09-16 16:07:31      阅读:239      评论:0      收藏:0      [点我收藏+]

标签:ann   roman   points   min   函数返回   ros   ram   col   oid   

cv::triangulatePoints----Reconstucts points by triangulation

void cv::trangulatePoints (InputArray projMatr1, 
  InputArray projMatr2, 
  InputArray projPoints1, 
  InputArray projPoints2, 
  OutputArray points4D )

 

 

 

 

 

Python

 points4D=cv.triangulatePoints(projMatr1, projMatr2, projPoints1, projPoints2[, 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 homogeneout coordinates) by using their observations with a stereo camera. Projections matrices can be obtained from stereoRectify.

Note

Keep in mind that all input data should be of float type in order for this function to work.


 

在使用该函数进行三角化计算时,正如其Note所强调的,为了使该函数返回正常数值,所有的输入数据类型应该是float类型,且输出数据的类型也应该被当做float来使用,

实际操作中,在将齐次坐标points4D转换为非齐次坐标的过程中,由于使用double类型来操作,从而导致转换一直出错,该BUG找了好久才被找到,很心累。记录在此。

 

OpenCV-Triangulation

标签:ann   roman   points   min   函数返回   ros   ram   col   oid   

原文地址:https://www.cnblogs.com/buaawang/p/9655724.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!