算法小抄-CV3D-基本概念

1. 单个相机

旋转的定义

2. 两个相机几何

2.1 平面单应性

 仿射变换

             

已知2d点的对应关系(_{}x_{1}, x_{1}^{,})...(x_{n}, {x_{n}^{,}})

求解 Planar homography H (8 DOF) ?

 

 opencv: cv.getPerspectiveTransform(); cv.findHomography()需要4组点

                cv.decomposeHomographyMat() with camera matrix ---> R,t 

2.2 对极几何 Epipolar Geometry

极线约束

 Baseline:基线两个相机中心的距离; EpipolarPlane:极平面,X, C, C^{,} 形成的平面 ;极点:相机中心的投射点;     

Relative Camera Pose Estimation

Triangulation 三角化

Direct Linear Transforms (DLT)

def DLT(P1, P2, point1, point2):
 
    A = [point1[1]*P1[2,:] - P1[1,:],
         P1[0,:] - point1[0]*P1[2,:],
         point2[1]*P2[2,:] - P2[1,:],
         P2[0,:] - point2[0]*P2[2,:]
        ]
    A = np.array(A).reshape((4,4))
    #print('A: ')
    #print(A)
 
    B = A.transpose() @ A
    from scipy import linalg
    U, s, Vh = linalg.svd(B, full_matrices = False)
 
    print('Triangulated point: ')
    print(Vh[3,0:3]/Vh[3,3])
    return Vh[3,0:3]/Vh[3,3]

  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值