Last active
July 12, 2022 12:21
-
-
Save CLozy/debaab6bb1c1d9403b56191d3725df73 to your computer and use it in GitHub Desktop.
rotate image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image = Image.open('/content/gdrive/MyDrive/ComputerVisionEngineer/images/deadstar.jpg') | |
#plot original image | |
f = pyplot.figure(figsize=(30,30)) | |
f.add_subplot(131) | |
pyplot.imshow(image) | |
#45 degrees rotation | |
f.add_subplot(132) | |
pyplot.imshow(image.rotate(45)) | |
#90 degrees rotation | |
f.add_subplot(133) | |
pyplot.imshow(image.rotate(90)) | |
pyplot.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment