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 to a 3d point knowing the
depth with
where is the focal length and the principal
point.
Note |
In the following, A1 to An are optional batch dimensions.
|
Args |
point_2d
|
A tensor of shape [A1, ..., An, 2] , where the last dimension
represents a 2d point to unproject.
|
depth
|
A tensor of shape [A1, ..., An, 1] , where the last dimension
represents the depth of a 2d point.
|
focal
|
A tensor of shape [A1, ..., An, 2] , where the last dimension
represents a camera focal length.
|
principal_point
|
A tensor of shape [A1, ..., An, 2] , where the last
dimension represents a camera principal point.
|
name
|
A name for this op that defaults to "perspective_unproject".
|
Returns |
A tensor of shape [A1, ..., An, 3] , where the last dimension represents
a 3d point.
|
Raises |
ValueError
|
If the shape of point_2d , depth , focal , or
principal_point is not supported.
|