I = imread("C:/Users/Hp/Desktop/download.jpg");
J = imrotate(I,90,nearest);
image(J);
这是我用来旋转图像的代码。该代码没有给出任何错误,但是没有显示;没有显示旋转的图像。帮助将不胜感激
您有一个错误。试试:
J = imrotate( I, 90, 'nearest' );
代替
J = imrotate( I, 90, nearest );
第一个使用字符串'nearest'作为选项。后者期望nearest
是现有变量。
此外,可视化I
以确保它位于您首先期望的方向。