如何以gnu八度旋转后显示图像?

问题描述 投票:0回答:1
I = imread("C:/Users/Hp/Desktop/download.jpg");
J = imrotate(I,90,nearest);
image(J);

这是我用来旋转图像的代码。该代码没有给出任何错误,但是没有显示;没有显示旋转的图像。帮助将不胜感激

image octave
1个回答
0
投票

您有一个错误。试试:

J = imrotate( I, 90, 'nearest' );

代替

J = imrotate( I, 90, nearest );

第一个使用字符串'nearest'作为选项。后者期望nearest是现有变量。

此外,可视化I以确保它位于您首先期望的方向。

© www.soinside.com 2019 - 2024. All rights reserved.