【发布时间】:2020-11-02 13:05:18
【问题描述】:
我正在按以下方式旋转图片:
# Read in image
img = cv2.imread("pic.jpg")
height, width, _ = img.shape
print("height ", height)
print("width ", width)
# Rotate image by 90 degrees
augmentation = iaa.Affine(rotate=90)
img_aug = augmentation(image=img)
height, width, _ = img_aug.shape
print("Height after rotation ", height)
print("Width after rotation ", width
> height 1080
> width 1920
> Height after rotation 1080
> Width after rotation 1920
为什么图片的形状没有变化?
【问题讨论】:
-
您旋转的是内容,而不是图像。
标签: python image-processing computer-vision data-augmentation