Does anyone know how imrotate does the size change exactly? I assumed it was based on pythagorean geometry but when I plot the actual matrix size change compared to my "predicted" size change the imrotate function is clearly using some other cut offs as well because the size change is always in intervals of 4 (step function style).
Here is the tests i've been doing to see how the side differs with just a simple square:
eval(['sz = [sz; x y c',int2str(i),']; ' ]) end plot(sz) % where x&y in this example are always the same because i'm testing a square and c_i is the dimension of the square using the trig i thought matlab should be using.
Ultimately i want to be able predict how matlab adds this zero pad so that i can effectively remove it later. I am aware of the "crop" functionality, however, I need the full matrix (plus zeros) to perform a convolution on the rotated matrix and then I want to be able to get back the original size after rotating back to the original matrix orientation.