spherical.py 文件源码

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

项目:monodepth360 作者: srijanparmeshwar 项目源码 文件源码
def backproject_rectilinear(depth, K, shape, face):
    u, v = tf.meshgrid(tf.linspace(-1.0, 1.0, shape[2]),
                       tf.linspace(-1.0, 1.0, shape[1]))

    u = tf.expand_dims(tf.tile(tf.expand_dims(u, 0), [shape[0], 1, 1]), 3)
    v = tf.expand_dims(tf.tile(tf.expand_dims(v, 0), [shape[0], 1, 1]), 3)

    A = (u - K[2]) * depth / K[0]
    B = (v - K[3]) * depth / K[1]
    C = depth

    x, y, z = switch_face(A, B, C, face)

    return tf.sqrt(x ** 2.0 + z ** 2.0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号