OpenCV-Triangulation

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

projMatr13x4 projection matrix of the first camera.
projMatr23x4 projection matrix of the second camera.
projPoints12xN 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.
projPoints22xN 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.
points4D4xN 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找了好久才被找到,很心累。记录在此。

 

转载于:https://www.cnblogs.com/buaawang/p/9655724.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值