flow_homography.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:mrflow 作者: jswulff 项目源码 文件源码
def homography2flow(x,y,H):
    """ Convert homography to flow field

    """
    pt1_ = np.c_[x.ravel(),y.ravel()].astype('float32')
    uv = cv2.perspectiveTransform(pt1_[:,np.newaxis,:],H).squeeze() - pt1_

    return uv[:,0].reshape(x.shape), uv[:,1].reshape(x.shape)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号