Resizing rotated image to be the flipped size of the original image
Show older comments
Hello, I'm trying to maintain the size of my image. You can see in this image, the rotated image is cut off. (i formed the original image with a freehand crop and rotated with 2d-2d rigid registration) How can I do this? Thanks

Accepted Answer
More Answers (1)
Image Analyst
on 16 Dec 2013
Edited: Image Analyst
on 16 Dec 2013
The 'Loose' option prevents clipping.
rotatedImage = imrotate(originalImage, 90, 'loose');
To get it to appear the same size, you're going to have to set the 'Position' or 'OuterPosition' properties of the axes so that they don't automatically take up exactly 1/2 of the width. The wide one should be wider than the tall one, but that's not how subplot works - it just gives each image an equal size rectangle and changes the magnification of the image so that it will fit in that rectangle, which it sounds like is not what you want. A few minutes of playing around with the size properties did not reveal to me exactly how to do it.
Categories
Find more on Geometric Transformation and Image Registration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!