spherical.py 文件源码

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

项目:monodepth360 作者: srijanparmeshwar 项目源码 文件源码
def backproject_cubic(depth, shape, face):
    a, b = tf.meshgrid(tf.linspace(-1.0, 1.0, shape[2]),
                       tf.linspace(-1.0, 1.0, shape[1]))
    A = depth * tf.expand_dims(tf.tile(tf.expand_dims(a, 0), [shape[0], 1, 1]), 3)
    B = depth * tf.expand_dims(tf.tile(tf.expand_dims(b, 0), [shape[0], 1, 1]), 3)
    C = depth

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

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


问题


面经


文章

微信
公众号

扫码关注公众号