Unprojects a 2d point in 3d.
tfg.rendering.camera.perspective.unproject(
point_2d: type_alias.TensorLike,
depth: type_alias.TensorLike,
focal: type_alias.TensorLike,
principal_point: type_alias.TensorLike,
name: str = 'perspective_unproject'
) -> tf.Tensor
Unprojects a 2d point (x′,y′) to a 3d point (x,y,z) knowing the depth z with
x=z(x′−cx)fx,y=z(y′−cy)fy,z=z,
where (fx,fy) is the focal length and (cx,cy) the principal point.
Note | |
---|---|
In the following, A1 to An are optional batch dimensions. |
Returns | |
---|---|
A tensor of shape [A1, ..., An, 3] , where the last dimension represents
a 3d point.
|