- #1
eddiethegreat
- 1
- 0
Hi,
I am working on a MATLAB assignment and I stuck in rotating image,
I got a code that allocates starting and ending points in matrix I got, works with no difficulties. (which means this code allows me to ignore the white(255) points and get he actual size of image, that is a rectangle or a square)
My problem is I needed to find maximum dimension of this picture when rotated, so that I will expand all of my rotations to maximum rotation size. I can't obtain that so simply.
I got a solution (probably incorrect) which is:
think that the image I got is a rectangle with width:a, length:b,
when I rotate to 45degrees I get the maximum size, so that with simple Pythagorean theorem we can say that one side comes from a is a*sqrt(2) and other is b*sqrt(2), then maximum size of my image when rotated should be a square, with one side equals to (a+b)*sqrt(2), which gives an incorrect result.
Can you help me out?
I am working on a MATLAB assignment and I stuck in rotating image,
I got a code that allocates starting and ending points in matrix I got, works with no difficulties. (which means this code allows me to ignore the white(255) points and get he actual size of image, that is a rectangle or a square)
My problem is I needed to find maximum dimension of this picture when rotated, so that I will expand all of my rotations to maximum rotation size. I can't obtain that so simply.
I got a solution (probably incorrect) which is:
think that the image I got is a rectangle with width:a, length:b,
when I rotate to 45degrees I get the maximum size, so that with simple Pythagorean theorem we can say that one side comes from a is a*sqrt(2) and other is b*sqrt(2), then maximum size of my image when rotated should be a square, with one side equals to (a+b)*sqrt(2), which gives an incorrect result.
Can you help me out?