本文主要是介绍imutils Rotation,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
代码
import imutils
import cv2
image = cv2.imread('')
# loop over the angles to rotate the image
for angle in range(0, 360, 90):# rotate the image and display itrotated = imutils.rotate(image, angle=angle)cv2.imshow("Angle=%d" % (angle), rotated)cv2.waitKey(0)
效果
参考
jrosebr1/imutils: A series of convenience functions to make basic image processing operations such as translation, rotation, resizing, skeletonization, and displaying Matplotlib images easier with OpenCV and Python.
https://github.com/jrosebr1/imutils
这篇关于imutils Rotation的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!