tf.image.rot90

Rotate image(s) counter-clockwise by 90 degrees.

Used in the notebooks

Used in the tutorials

For example:

a=tf.constant([[[1],[2]],
               [[3],[4]]])
# rotating `a` counter clockwise by 90 degrees
a_rot=tf.image.rot90(a)
print(a_rot[...,0].numpy())
[[2 4]
 [1 3]]
# rotating `a` counter clockwise by 270 degrees