Reputation: 81
I'm working on rotating the image. However, when I'm using the scipy.ndimage.rotate() function I can rotate the full image (reshape=True), but the shape of array will be changed. For instance, as the example of scipy.ndimage.rotate(), the result I'm looking for is the third picture but with the same shape of array as the origin (512, 512) not (724, 724).
Is there any other solution for this type of rotation? (I'm using python) Please help me with this.
Links for the example I mentioned: https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.rotate.html
Kind regards
Upvotes: 0
Views: 618
Reputation: 2013
You can't have a same-shaped image with a rotation like that: either you accept the cropping/spilling of the corners (second example image), or interpolate to rescale a result similar to the 3rd example.
Upvotes: 0