tf.contrib.image.matrices_to_flat_transforms

Converts affine matrices to tf.contrib.image projective transforms.

Note that we expect matrices that map output coordinates to input coordinates. To convert forward transformation matrices, call tf.linalg.inv on the matrices and use the result here.

Args
transform_matrices One or more affine transformation matrices, for the reverse transformation in homogeneous coordinates. Shape (3, 3) or (N, 3, 3).
Returns
2D tensor of flat transforms with shape (N, 8), which may be passed into tf.contrib.image.transform.
Raises
ValueError If transform_matrices have an invalid shape.

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/image/matrices_to_flat_transforms