Python OpenCV - Rotate Image

Опубликовано: 28 Июнь 2024
на канале: ProgramGuru
116
2

How to rotate an image using OpenCV in Python?

You can rotate an image by 90 degrees, 180 degrees, or 270 degrees, with OpenCV in Python, using rotate() function.

rotate() function can rotate the image with one of the following rotations:
1. ROTATE_90_CLOCKWISE rotates the image by 90 degrees clockwise.
2. ROTATE_180 rotates the image by 180 degrees.
3. ROTATE_90_COUNTERCLOCKWISE rotate the image by 90 degrees counter clockwise, or we can say 270 degrees clockwise.