how can I rotate an image about an arbitrary point in that image
13 次查看(过去 30 天)
显示 更早的评论
how can I rotate an image about an arbitrary point in that image
采纳的回答
Srinath Tankasala
2018-5-18
The ability to rotate an image around a point is not available directly in MATLAB.
However, to work around this issue, rotating an image around a point is possible by first zero-padding the image (calculating how many rows and columns to pad to create a "virtual center"), rotating around its center (using "imrotate"), and then cropping to remove the initial padding ("un-pad" the image).
Download this file and add it to MATLAB's path before use. The provided example in the function's help documentation works fine:
imshow(rotateAround(imread('eight.tif'), 1, 1, 10));
1 个评论
Rik
2020-6-18
What if the rotation point is not an interger pixel location? This will introduce error
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!