I rotated the image from the left to the image on the right using
image = cv2.warpAffine(image, R, dst_size, flags=cv2.INTER_LINEAR)
where dst_size
is (547, 363)
, and I've modified R so that the original image should fit in the new dimensions.
I show the image with cv2.imshow('rect post-rotation', img)
to show the image on the right. You can see that it appears clipped to a size of (363, 547)
, even though when I print out the img shape, I get (547, 363, 3)
.
Why does the shape of the image not reflect the shape of the displayed image?